In the process of printing, the printing process and other reasons, often there will be color, misregister phenomenon, there will be some defects, line defects, such as black, leading to the emergence of printing products. Printing enterprises generally use artificial method, in India and India one by one sampling observation method for sorting defect detection, low efficiency, high cost, high labor intensity. Practice has proved that, instead of printing defects inspection based on machine vision system, can improve production efficiency, reduce production cost. Use instead of manual printing machine vision inspection system based on PC, using the characteristics of high precision, fast speed of the computer, quickly and accurately detect defects of printed matter, and make a comprehensive analysis of the defect degree, so as to judge whether printed as inferior or waste products.
One, the image acquisition
The image acquisition process, due to the impact of camera accuracy, lighting conditions and other factors, the image will have some random noise, which leads to image distortion. Here the spike interference can be removed, weighted median filter algorithm and can preserve edge details. Determine the number of a pixel is an odd number of windows W, the weight of each pixel in the window, a pixel weighting values for the m, namely the window pixel gray line of the pixel repeat m, then each pixel in the window according to the gray value is arranged from large to small, gray and the middle position of value generation for the original image f (x, y) of the intermediate value, enhanced image g (x, y).
Two, visual inspection
(a) defect detection
Printing defects in the image, which is difference with the standard graph of defect image gray value at. The image gray value with the standard difference (pixel value subtraction), judge the difference (two images grayscale values differ degree) is beyond the preset standard value range, can judge this print has no defect.
(two) defect recognition
The difference is completed, get a picture of the same size with the image difference image, the pixel value is the difference of corresponding pixels of each of two images. Subsequently, the difference image is progressive scanning, detection of defects. When the defect pixels (when the value of >0), using recursive method to traverse the entire defect area, at the same time recording the damage zone size, size. The scanning process is completed, the number of the number of recursive is defect. Defects in the recognition process, there will be two or more away from the defect region very close (such as two point defects in the image is only one pixel distance), usually think they belong to one and the same defect region, therefore, need to merge them into one defect region detection. Here is the use of expansion algorithm based on mathematical morphology (Fig. 1). After corrosion, expansion, corrosion and a series of operations, and extract the defect image edge shape, for further analysis and judgment.
To solve the next step, an online dynamic image capture and processing, such as color misregister, two defect detection and recognition of the problem is much more difficult for appearance defects. In addition, the evaluation of the printing quality is a comprehensive index, it is necessary to improve the intelligent information processing ability of the system.