Abstract:In order to realize the on-line detection of the size and deformation defects of special-shaped springs,a set of parts rapid positioning,measurement and defect detection methods were designed based on machine vision.The image processing algorithms were discussed in detail,such as image preprocessing,image positioning,size measurement and deformation defect detection algorithms.The part was positioned based on the shape-based template matching,and the size measurement of the part was completed by creating a measurement rectangle.Based on the idea of differentiation and self-contrast,the easy deformation area of the part was differentiated,and the rapid deformation defect detection of parts was implemented by comparing the small area of differentiation;the hardware composition and working principle of the system were briefly introduced.The results show that by using the proposed algorithm to detect parts,the false detection rate is about 2.5%,and the non-contact,fast and accurate detection is realized;the detection method is simple and practical,and can meet the needs of industrial production.