Abstract : This paper introduces the composition of visual defect detection system for print defects and discusses the basic methods of defect detection and recognition based on the principles of image difference and mathematical morphology. Keywords: visual inspection, printing defect In the printing process, due to the process and other reasons, the prints often appear color difference, overprinting inaccurate phenomenon, there will be some defect spots, ink lines, black skin and the like appearance defects, resulting in the emergence of printing defects. Printing companies generally adopt manual methods to sort defective products by means of sampling in India and one by one after printing. The detection efficiency is low, the cost is high, and labor intensity is high. Practice has proved that the use of machine vision systems instead of people to detect print defects can increase production efficiency and reduce production costs. The use of a PC-based machine vision system to replace manual inspections of printed materials is discussed. Using the features of high accuracy and speed of the computer, the defects of the appearance of the printed matter are quickly and accurately detected, and a comprehensive analysis of the degree of defects is performed to determine whether the printed matter is secondary. Product or waste product. 1 Image Acquisition and Preprocessing The image acquisition card used in this system is Matrox's meteor II/MC, the CCD camera is Pulnix6703, and the system image acquisition speed is set to 60 frames per second (image size is 640×480). Microcomputer system CPU is PIII750, memory 256M. The software development environment is Win98!VC6.0. During the image acquisition process, due to factors such as the camera's accuracy and lighting environment, there will be some random noise in the captured image, which will result in image distortion. Here, a weighted median filtering algorithm [1] is used to remove sharp interference and maintain edge details. Determine a window with an odd number of pixels W, and weight each pixel in the window first. The weighted value of a certain pixel is m. That is, when the window pixel is gray-lined, the pixel repeats m times, and then each pixel in the window is grayed out. The values ​​are arranged from the largest to the smallest, and the gray value of the middle position is used instead of the middle value of the original image f(x,y) to obtain the enhanced image g(x,y). 2 visual inspection 2.1 Defect detection The print defect is shown on the image, which is the difference between the grayscale value and the standard image at the defect of the acquired image. The difference between the gray value of the acquired image and the standard image (subtracting the pixel value) and judging whether the difference (the degree of difference between the two grayscale values) exceeds the preset standard value range can be judged The print has no defects. 2.2 Defect Recognition After the difference is completed, a difference map with the same size as the collection chart is obtained, and the pixel value is the difference between the pixels corresponding to each two images. Subsequently, the differential image is scanned progressively to detect the defect point. When the defect point pixel is encountered (value>0), the entire defect area is traversed in a recursive manner, and the size and size of the defect area are recorded at the same time. After the entire scanning process is completed, the number of recursive times is the number of defects. In the process of defect identification, there will be two or more closely-spaced defect areas (eg, the two defect points have only one pixel distance in the image). They are usually considered to belong to the same defect area. Therefore, they need to be detected before testing. Merge into a defective area. This is a mathematical morphology expansion algorithm [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. Food Waste Disposers,Kitchenaid Garbage Disposal,Food Waste Processor,Food Waste Disposal Ningbo Ifilter Purification Equipment CO.,Ltd. , https://www.nbifiltor.com