# Real-Time Detection Method for Center and Attitude Precise Positioning of Cross Laser-Pattern
###### Abstract  
Optical metrology has experienced a fast development in recent years--cross laser-pattern has become a common cooperative measuring marker in optical metrology equipment, such as infrared imaging equipment or visual 3D measurement system. The rapid and accurate extraction of the center point and attitude of the cross-marker image is the first prerequisite to ensure the measurement speed and accuracy. In this paper, a cross laser-pattern is used as a cooperative marker, in view of the high resolution of the cross laser-pattern image in the project and the vulnerability to adverse environmental effects, such as stray light, smoke, water mist and other interference in the environment, resulting in poor contrast, low signal-to-noise ratio (SNR), uneven energy distribution. As a result, a method is proposed to detect the center point and attitude of cross laser-pattern image based on Gaussian fitting and least square fitting. Firstly, the distortion of original image is corrected in real time, the corrected image is smoothed by median filter, and the noise is suppressed while preserving the edge sharpness and detail of the image. In order to adapt to different environments, the maximum inter-class variance method of threshold automatic selection is used to determine the threshold of image segmentation to eliminate the background interference caused by different illumination intensities. To improve the real-time performance of the algorithm, the four cross laser edge pixels are obtained by line search, and then fitted by least square. With the edge lines, the transverse and portrait line of the cross-laser image are separated, then we calculate Gaussian center points of all Gaussian sections of transverse and portrait lines based on Gaussian fitting method, respectively. Based on the traditional line fitting method, the sub-pixel center of the transverse and portrait laser strip images are fitted by removing the Outlying Points, and the center coordinates and attitude information of the cross laser-pattern are calculated by using the center equation of the laser strip, realizing cross laser-pattern center and attitude accurate positioning. The results show that the method is robust, the center positioning accuracy is better than 0.6 pixels, the attitude positioning accuracy is better than \(\pm\)15\" under smoke and water mist environment and the processing speed is better than 0.1 s, which meets the real-time requirements of the project. cross laser-pattern; center and attitude positioning; line search; Gaussian fitting; least square fitting +
Footnote †: journal: Applied Sciences  
**Applied Sciences**
and all light is divided into two perpendicular planes by refraction of the shaping lens. The intersection line between the two planes and the imaging plane is cross-shaped, that are distributed along the X and Y directions, respectively [6]; Figure 1b shows the other form. The laser beams emitted by two laser sources form two planes through the refraction of the shaping lens, and the cross laser is formed when the two planes are perpendicular. The propagation direction of the two planes is Z, and the two beams are distributed along the X and Y directions, respectively. In general applications of scientific or commercial fields [7; 8], the image acquisition model is near the laser, and the laser projection distance is within decimeters, so that the image quality is less affected by the environment. Existing methods may realize the digital processing of the acquired image. However, the proposed method is applied in a shipboard environment, and the cross laser-pattern projection distance is a dozen meters to the measured surface, therefore, adverse environmental effects, such as stray light, smoke, water mist [9] and other interference [10] in the environment, may result in poor contrast, low signal-to-noise ratio (SNR), uneven energy distribution to the acquired image, which brings challenges to digital processing.