High-precision real-time detection of light spot center based on machine vision
2026-04-06 05:14:22··#1
Abstract: Real-time acquisition and precise center localization of laser spots are key issues in laser applications and machine vision inspection. This paper uses DirectShow technology to acquire and process spot images in real time. First, the Sobel operator is used to obtain pixel-level image edges, then the second-order spatial moment operator is used for further refinement to obtain sub-pixel edge data. Finally, the least squares method is used for fitting to obtain the 0.1-pixel coordinates of the spot center. Experimental results show that the processing speed of this method meets the requirements of real-time systems, has good robustness, and high positioning accuracy. It has good applications in locating the center of moving laser spots and addressing deviations caused by different environmental influences. Keywords: Machine vision; Laser spot; Sub-pixel; Real-time detection; Second-order spatial moment; DirectShow Introduction Common spot detection methods include the centroid method, circle fitting method, and Hough transform method. The Hough transform method consumes large system resources, has low operating efficiency, and cannot meet the real-time requirements of the system. The centroid method can achieve high detection accuracy when the laser spot image quality is good and the signal-to-noise ratio is high. However, due to the optical path of the optical device, the spot image may have some small trailing noise points due to scattering and reflection. The centroid method has a larger error for spot images with low signal-to-noise ratios. This project uses Direct spot images, processes each frame of image data to extract its precise edges, and then obtains the sub-pixel coordinates of the spot center by minimizing the edges. This method can also be applied to detect laser stability, finding the amount of laser drift affected by airflow, sound, slight vibrations, etc., by analyzing the center shift. For details, please click: High-precision real-time detection of spot center based on machine vision.