Abstract:To traditional visual detection system, not only time and manpower are wasted, but also detection accuracy is far from enough. Therefore, a visual detection system was proposed. Taking the coating deployment board as the research object, in-situ detection on the assembly line system was carried out. The overall scheme design of the detection system was done first. In terms of hardware, the selection and debugging of the camera, lens, light source of the detection system were mainly introduced. In terms of software, the key technologies were mainly introduced, such as camera calibration, image preprocessing and enhancement, edge detection and so on. According to the shape characteristics of spectral band, an algorithm combining cubic spline interpolation and polynomial fitting was proposed to extract the edge points of each spectral line segmentation line. At the same time, MATLAB programming was carried out in the environment of LabVIEW, so as to improve the efficiency of the algorithm.Then the coordinate values calculated by MATLAB were sent to the NC machine tool through the upper computer. The NC machine tool processed the data in real time, so as to scrape the same color area. Compared with manual detection, the detection system is superior to traditional methods in detection accuracy and speed.