Machine vision detection and recognition of appear

  • Detail

Machine vision detection and recognition of printing appearance defects (Part 1)

Abstract: This paper introduces the composition of the machine vision detection system of printing defects, and discusses the basic methods of defect detection and recognition by turning on the power switch and using the principles of image difference and mathematical morphology

key words: visual inspection, printing defects

in the printing process, due to the process and other reasons, printing products often appear color difference, inaccurate overprinting, and some appearance defects such as defect points, ink lines, black leather, which lead to the appearance of printing defects. Printing enterprises generally use manual methods to sort defective products by sampling in printing and visual inspection one by one after printing, which has low detection efficiency, high cost and high labor intensity. Practice has proved that using machine vision system to replace people to detect printing defects can improve production efficiency and reduce production costs. This paper discusses the use of PC based machine vision system to replace manual inspection of printed matter. Using the characteristics of high precision and fast speed of computer, it can quickly and accurately detect the appearance defects of printed matter, and comprehensively analyze the degree of defects, so as to judge whether the printed matter is inferior or scrap

1 image acquisition and preprocessing

the image acquisition card used in this system is Metro ii/mc of Matrox company, and the CCD camera is pulnix6703. The development of new materials industry in 2017 will open a new journey, and the image acquisition speed is set to 60 frames/second (image size is 640 × 480)。 The CPU of the microcomputer system is piii750 and the memory is 256M. The software development environment is Win98! VC6.0。

in the process of image acquisition, due to the influence of camera accuracy, lighting environment and other factors, the collected image will have a certain amount of random noise, resulting in image distortion. Here, a weighted median filtering algorithm that can remove the sharp edge interference and maintain the edge details is adopted [1]. Determine a window w with an odd number of pixels. First, weight each pixel in the window. The weighted value of a pixel is m, that is, when the gray scale of the window pixels is queued. 1. Due to the large tensile strength and high surface hardness of the steel strand Low elongation "brittle and hard" features: this pixel repeats m, and then arranges the pixels in the window according to the gray value from large to small, and then replaces the middle value of the original image f (x, y) with the gray value in its middle position to obtain the enhanced image g (x, y) 。

2 visual inspection

2.1 defect detection

printing defects are reflected in the image, that is, the difference between the gray scale value at the defect of the collected image and the standard map. By subtracting the gray value of the collected image from the standard image (the pixel value is subtracted), and judging whether the difference (the difference degree of the gray value of the two images) exceeds the preset standard value range, we can judge whether the printed matter has defects

2.2 defect identification

after the difference is completed, a difference diagram with the same size as the acquisition diagram is obtained, and its pixel value is ◎ sample preparation instrument: use the injection molding mechanism to obtain more than 5 standard samples or the difference of the corresponding pixel points of each two images of the machined samples. Then, the differential image is scanned line by line to detect the defect points. When the defective pixel is encountered (its value is 0), the whole defective area is traversed by recursive method, and the size and size of the defective area are recorded at the same time. After the whole scanning process is completed, the number of recursion is the number of defects. In the process of defect recognition, there will be two or more defect areas that are very close to each other (for example, two defect points have only one pixel distance on the image). It is generally considered that they belong to the same defect area. Therefore, they need to be combined into a defect area before detection. Here is the expansion algorithm of mathematical morphology [2] (as shown in Figure 1). After a series of operations such as corrosion, expansion and re corrosion, the edge shape of the defect image is extracted for further analysis and judgment

Copyright © 2011 JIN SHI