| Computer vision detection technology is a kind of non-intrusive measuring techniques which is based on computer vision and integrated with the Modern Optical Technology, Pattern Recognition, Computer Graphics, Control Theory and other computer technology. The paper takes the parts of chain which is produced by Hangzhou Wulf Chain Limited Company as the detected object which are measured with computer vision technology. This paper mostly relates to the image collection, ROI extraction, image pre processing, edge detection, threshold fragmentation, sub-pixel location, roundness error, and system calibrati-on, and studies related technology.The paper discusses hardware as well as its selection principle of the visual detection system, and analyses light source function, camera, digital interface card, lens, computer and so on, discusses the evaluation standard of visual detection system. The appropriate hardware is selected for this system according to the parts of the chain, precision and speed demands and the existing experiment conditions.The paper studies the related image processing techniques which mainly include the ROI extraction, image smoothing, binary operation, image segmentation, edge detection, contour extraction and optimization, analyses the conventional filtering methods including neighborhood averaging, median filtering and edge-preserving filtering, discusses the purpose and means of the image segmentation. Histogram method and the maximum variance threshold method are mostly emphasized in the aspect of image segmentation. As to the edge detection, first-order and second-order differential edge detection operator and canny edge detection operator are studied and discussed carefully. It discusses the theory of the contour extraction and the edge optimization. At last, the related functions called from OpenCV are introduced. For the line and circle detection, the improving least-square linear fitting method is adopted.According to the special feature of the parts of chain, the paper advances a kind of algorithm for the extraction of ROI. The reliability of this algorithm under isolated noise and the effect of different threshold on the experimental result are analyzed. The anti-noise template was developed suitable for the chain board, this algorithm can inhibit isolated noise well and the bounding box including target image can be found fast and accurately.The ability of this algorithm have direct proportion with the area ratio of the object and backgrou- nd as well as the complexity of algorithm. The paper proposes a kind of profile optimization algorithm and designs a series of optimization template, this algorithm can not only let the profile have width of one pixel, but also make the discontinuous profile continuous. It also can decrease the time and improve precision.According to the characteristic of the geometric parameter, The paper proposes a algorithm that has the capacity to recognize pixels belonging to different lines or circles, and then locates the elements with sub-pixel precision, the approximate location of the profile is found by the algorithm with pixel precision, and then the unqualified pixel point is rejected according to the distance to the profile, which is selected beforehand. This algorithm can process the image fast and precisely with the properties of simple computation and stability.According to the measurement of roundness error of arc, the paper proposes the algorithm of roundness error, the improving the least square method to adapt the calculation of roundness error of inhomogeneous circle and arc. And researching the application of the minimum zone method on discrete points in the circle (or arc) of inhomogeneous distribute.The chain parts vision detection system is established in this article and the parameters measurement software is developed at the same time. According to the technical requirements, the high precision image is collected. The vision detection system integrates all the algorithms of the image preprocessing including the extraction of ROI, image preprocessing, contour extraction, contour optimization, the detection of holes parameters of chain board, the roundness error measurement, the detection of sleeve parameters. The whole consumption of time of this system is less than1second to process image, calculate parameters and output results, which meets the requirements of high speed and high precision. |