Aiming at the problem of the low accuracy of projector calibration in a structured light system, an improved projector calibration method is proposed in this paper. One of the key ideas is to estimate the sub-pixel coordinates in the projector image plane using local random sample consensus (RANSAC). A bundle adjustment (BA) algorithm is adopted to optimize the calibration parameters to further improve the accuracy and robustness of the projector calibration. After system calibration and epipolar rectification, the mapping relationship between the pixel coordinates and the absolute phase in the projector image plane is established by using cubic polynomial fitting, and the disparity is rapidly solved by using the mapping relationship, which not only ensures the measurement accuracy, but also improves the measurement efficiency. The experimental results demonstrated that the average re-projection error after optimization is reduced to 0.03 pixels, and the proposed method is suitable for high-speed 3D reconstruction without the time-consuming homogenous point searching.
Aiming at the problem of camera pixel saturation caused by the high reflective area on the metal surface of a relay, we adopt speckle projection profilometry to detect the magnetic circuit drop height of the relay. The main problem is solved through a detailed analysis of characteristics according to different speckle gray values, speckle sizes, and shapes to effectively distinguish the confusion between the speckle reflection spots and background light reflection spots. The enhanced normalized cross-correlation sub-pixel algorithm is used to get a dense matching pair of points of the right and left images, and three-dimensional reconstruction is based on the triangulation parallax principle. The random sampling consensus algorithm and European clustering algorithm are used to segment the point cloud to obtain the core and yoke iron planes and measure the distance between the two planes. We measured two standard blocks with height difference of 1 mm, and the error is within 2% by the proposed method. The correctness is verified through real-time measurement for a magnetic circuit drop height of the relay assembly line.