| With the rapidly development of manufacturing automation technology,the demand for automatic inspection of parts is increasing.In the manufacturing process,the inspection of parts has long relied on coordinate measuring machines and manual inspection tools for inspection.For small defects of injection molded parts,manual visual inspection is largely dependent on the strength and low efficiency.As a non-contact measurement system,machine vision has attracted more and more attention in the field of industrial automation inspection due to its large field of view,high flexibility,and wide adaptability.In this paper,according to the industrial inspection requirements of electronic connector injection parts,the research of micro size detection based on machine vision has important rational significance and engineering practice value.The size detection system and image processing flow of injection molding parts based on industrial camera are established.The gray image of injection molding parts is obtained by high pixel industrial camera.The optical distortion is solved and the clear image is obtained by using telecentric lens and reasonable back light source.This paper proposes an improved BM3D algorithm based on a three-dimensional Gaussian function.The algorithm uses a three-dimensional Gaussian function to replace the hard threshold,and adaptively calculates the threshold according to the change in the image gray value.Compared with the traditional BM3D,it solves the problem that the hard threshold does not vary with the image.The problem of adaptive change due to gray value changes has a better effect on removing Gaussian noise,while retaining edge pixels to the greatest extent.The peak signal-to-noise ratio method is used to test the denoising effect of images collected under different conditions.The results show that the improved BM3D algorithm is better than the traditional algorithm.This paper proposes an improved Canny edge detection operator based on the Maximum.Between-Class Variance Method(OTSU),which solves the problem that the gradient threshold in the traditional Canny operator is set according to manual experience,and the appropriate gradient threshold cannot be accurately obtained.Experiments show that the improved Canny operator recognizes the edge area more accurately and produces fewer false edges;for the measurement requirements of the small features of electronic connectors,this paper proposes an improved Zernike moment sub-pixel edge detection algorithm based on the three-gray interval model.The three-gray interval model is used to simulate the actual edge gray value gradient feature.The experimental results show that the improved Zernike moment method is more accurate for sub-pixel edge location and the edge connection of small features is more complete.Dimension detection and calibration system is established.Calibration coefficients are calculated by standard checkerboard grid calibration plate.Polygon holes and circular holes are fitted by least square method.Pixel coordinates and small feature edge pixel sizes are calculated according to the equation.Pixel sizes are converted into actual physical sizes by calibration coefficients.By comparing with manual dimension measurement,the dimension detection system established in this paper has a detection error of mm,which meets the requirements of industrial testing. |