Abstract:In the surface measurement of metal workpieces based on line structured light, this paper proposes a laser stripe centerline extraction algorithm based on improved principal component analysis to address issues such as strong reflection and laser stripe breakage on the surface of metal workpieces. Firstly, for the irregular reflection of metal workpiece surface, the optical fringe region of image was extracted based on maximal variance between clusters (OTSU); Secondly, in response to the problems of high convolution operations, low efficiency, and poor real-time performance of the Steger algorithm, an improved Steger algorithm based on principal component analysis (PCA) was proposed. The covariance matrix of the gradient vector was constructed using PCA to estimate the normal direction of the stripe, and the second-order Taylor expansion was used in this direction to obtain accurate sub-pixel coordinates of the stripe center. The experimental results show that the algorithm proposed in this paper can effectively extract laser stripe areas under severe reflection conditions on the surface of metal workpieces. At the same time, the standard deviation of the extracted laser stripe centerline is reduced by about 0.25 pixels compared to the grayscale centroid method, and the speed is increased by nearly 13 times compared to the Steger algorithm. It can quickly and accurately extract the laser stripe centerline, meeting the realtime detection requirements of structured light 3D vision.