| With the progress of science and technology and the development of society,compression-molded optical lenses are widely used in the field of optics due to their large output and high precision.Defects in the lens can cause the imaging quality of the optical system to decrease or even damage the system,which seriously affects the performance of the optical system.Traditional manual testing has low efficiency,high work intensity.It is easily affected by human subjective factors,which can’t meet the requirements of enterprises for rapid production.Aiming at small-sized,large-batch molded lenses with a diameter of about 10 mm in the field of security.On the premise of ensuring certain detection accuracy,how to quickly and accurately detect the lens with defects in batch molded lenses is of great significance for optical production and processing.This paper mainly explores the detection system of machine vision mold lens defects.According to the overall research and development plan of the system,it focuses on the research and design of the system’s lighting module,optical imaging module and image processing module.Research on lighting modules,including analysis and selection of light sources,analysis and selection of lighting methods,and design of combined light source arrays in light source modules according to system detection requirements,the results show that the light source has good uniformity of illumination and meets experimental needs.In order to ensure that the system can obtain a clear inspection image,there is a large enough field of view to detect the entire lens with a diagonal edge size of 100 mm.This paper uses ZEMAX optical software to design an imaging optical system suitable for the detection of lens defects.According to correlation parameter of requirements of lens usage and samples to be tested,the specific parameters of the designed lens defect detection imaging optical system are: focal length f ′ =15 mm,object-line field of view 2 y =100 mm,working distance 140 mm,MTF> 0.4@145lp/mm.By analyzing and calculating the model of the test sample,it is further verified that the design of the imaging optical system is reasonable.The image quality analysis,tolerance analysis,and mechanical structure processing were performed on the system.The imaging effect meets the requirements of use.Through image processing algorithms,the system can detect lens defects.The content of image processing mainly includes the grayscale processing of the lens image,the connected domain marking processing of the lens position,the shape and area filtering,and the grayscale filtering to extract the information of a single lens.Finally,the morphological processing is used to extract the shape features of the defect and obtain a single Image information of defects such as bubbles,scratches,and pits contained in molded lenses.The expected goal is to build a molded lens defect detection system that is suitable for detecting defects in the entire disk and has a detection accuracy of 60/40,to improve the detection efficiency. |