In order to improve the dimensional accuracy of continuous fiber reinforced composite 3D printing(CFRC 3DP)parts of"independent extrusion type",an online optimization method based on image processing technology is proposed,an online feedback optimization model for the dimensional accuracy of CFRC 3DP is es-tablished,and the methods of image filtering,edge detection and edge geometric element extraction are studied.The error proportion coefficient of the printed part is solved by the error comparison between the actual size and the theoretical size of the CFRC 3DP printing layer,the motor step value is corrected,and the online optimiza-tion of the size accuracy of the CFRC 3DP is realized.Through the research on the print size of typical shaft sleeve parts before and after optimization,and the statistical analysis using hypothesis test,the experimental re-sults show that there are significant differences in the size of the printed sample before and after optimization,the diameter print accuracy of 8 mm shaft and 16 mm shaft has increased by 1.34%and 0.76%respectively,and the standard deviation has decreased,which verifies the feasibility and effectiveness of the online optimization method of size accuracy.