Printed matter defect analysis method

By using regular background boards and sensor measurements in print defect analysis, the problems of high cost and low efficiency of existing equipment are solved, and efficient and accurate print defect detection is achieved.

CN120451031APending Publication Date: 2025-08-08杭州谛瞳科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410086421.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing printing ratio equipment is cost-effective and inefficient, the manual detection efficiency of small and medium-sized enterprises is low and the error rate is uncontrollable, and the existing background difference method cannot accurately obtain the material area when the material color is similar to the background color.

Method used

The rule background board is used to obtain the rule picture, and the defect area is judged by calculating the distance and gradient similarity of edge points, and the density is calculated in combination with the sensor measurement area and mass. The binocular and mechanical sensors are used to achieve simultaneous measurement of area and mass.

Benefits of technology

It improves the accuracy and efficiency of print defect detection, reduces equipment costs, is suitable for small and medium-sized enterprises, and reduces the error rate of manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451031A_ABST
    Figure CN120451031A_ABST
Patent Text Reader

Abstract

The invention discloses a printed matter defect analysis method, and relates to the technical field of image processing, and the specific implementation scheme is as follows: obtaining a standard substance material area, and calculating an external rectangle Rect1 of the edge of the standard substance material area; calculating an external rectangle Rect2 of the edge of the new material of the printed matter, solving the distance, gradient size similarity and gradient direction similarity of the edge points of the new material of the standard material, and judging whether the new material is a defect area or not; calculating the density of the new printed material based on the area and the mass of the new printed material, and judging whether a density defect exists or not; and summarizing the information data about whether the new printed material has the defect area or not and whether the new printed material has the density defect or not. The problem that materials need to be fixed in position is solved by adding regular backgrounds; a regular picture is obtained by using a background plate with patterns arranged regularly, and a material area and a background area are better distinguished; area measurement and mass measurement are achieved at the same time by adding binocular sensors and mechanical sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for analyzing defects in printed matter. Background Art

[0002] Existing equipment for print comparison requires loading the material into a fixed position and flattening it using a vacuum pump or other suction device to ensure it is secure and flat before performing print defect inspection. After inspection, the cardboard is weighed using an electronic scale, and the printed material is measured with a ruler to determine its density.

[0003] Existing background subtraction methods place a background pattern to obtain an image of the background without a target and an image of the background with a target. Subtracting the two images, any identical backgrounds are reduced to zero, revealing the target area.

[0004] Existing equipment for printing comparison is complex in structure and high in cost, so it is only used by a few large enterprises; manual inspection by small and medium-sized enterprises is inefficient, costly, and has uncontrollable error rates.

[0005] The existing background difference method cannot guarantee that the material and background colors are different. When the colors of the two are similar, the material area cannot be accurately obtained. Summary of the Invention

[0006] Based on this, the present invention provides a printed product defect analysis method to solve the problem that the material area cannot be accurately obtained when the material color is similar to the background color.

[0007] The present invention provides a method for analyzing defects in printed matter, comprising:

[0008] Obtain a regular image and a corrected image, compare the regular image with the corrected image, obtain a standard material area, and calculate an outer rectangle Rect1 of the edge of the standard material area;

[0009] Calculate the outer rectangle Rect2 of the edge of the new printed material, align Rect1 and Rect2, calculate the distance, gradient magnitude similarity, and gradient direction similarity between the edge points of the standard material and the new material, and determine whether it is a defect area;

[0010] Use sensors to measure the area and mass of new printed materials, calculate the density of new printed materials, and determine whether there are density defects;

[0011] The information data of whether there is a defective area in the new printed material and whether the new printed material has a density defect are summarized.

[0012] The acquisition of the rule image includes:

[0013] Place a tunnel light source or multiple side light sources that shine downward on the device, and set the stage at an angle to the horizontal line;

[0014] When there is no printed material, a camera is used to shoot a background plate to obtain a background image M1, and the background plate is placed on the carrier to filter out the material area to obtain a regular image Map, where the background plate is provided with a regularly arranged pattern.

[0015] The acquisition of the corrected image includes:

[0016] Compare the RGB value of each pixel of the background image M1 with the RGB value of each pixel of the regular image Map;

[0017] If the RGB value of each pixel of the background image M1 is equal to the RGB value of each pixel of the regular image Map, no processing is performed;

[0018] If the RGB value of each pixel of the background image M1 is not equal to the RGB value of each pixel of the regular image Map, then a difference map Diff between the background image M1 and the regular image Map is calculated;

[0019] The printed material is placed behind the background plate, and the material image is captured by a camera. The material image is corrected using the difference map Diff to obtain a corrected image M2.

[0020] Compare the RGB value of each pixel of the corrected image M2 with the RGB value of each pixel of the regular map Map to obtain the standard material area;

[0021] The area where the RGB value of the pixel of the corrected image M2 is equal to the RGB value of the pixel of the regular map Map is the background area;

[0022] The area where the RGB value of the pixel of the corrected image M2 is not equal to the RGB value of the pixel of the regular map Map is the standard material area.

[0023] include,

[0024] After obtaining the standard material area, find the outer rectangle Rect1 of the edge of the standard material;

[0025] Use the edge extraction algorithm to obtain the edge points of the standard material, retain the position (x1, y1), gradient size grad1, and gradient direction direction1 of the edge points of the standard material, and group the edge points of the standard material according to the distance to obtain n groups of edge points;

[0026] The specific calculation method is:

[0027]

[0028]

[0029]

[0030]

[0031] Among them, P(x1,y1) represents the pixel value at point (x1,y1), Δx1 and Δy1 represent the gradient size of (x1,y1) in the x and y directions respectively.

[0032] Also includes,

[0033] Find the outer rectangle Rect2 of the edge of the new material;

[0034] Use the edge extraction algorithm to obtain the edge points of the new material, retain the position (x2, y2), gradient size grad2, and gradient direction direction2 of the new material edge points, and group the new material edge points according to distance to obtain m groups of edge points;

[0035] The specific calculation method is:

[0036]

[0037]

[0038]

[0039]

[0040] Among them, P(x2,y2) represents the pixel value at point (x2,y2), Δx2 and Δy2 represent the gradient size of (x2,y2) in the x and y directions respectively.

[0041] For edge points, compare the position distance, gradient similarity, and direction similarity of (x1, y1) and (x2, y2) point by point.

[0042]

[0043]

[0044] direction similarity=abs(cos -1 (direction1-direction2)).

[0045] Also includes,

[0046] If the gradient similarity is greater than the first threshold and the direction similarity is greater than the second threshold, the match is considered successful, otherwise the match fails.

[0047] A secondary comparison is performed on the position where there is no edge point or the edge point fails to match, and the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are compared to see whether they are less than the set average value threshold and the set variance threshold. If the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are not less than the set average value threshold and the set variance threshold, the position where there is no edge point or the edge point fails to match is considered to be a defective area, and the defective area is recorded.

[0048] The operation of using sensors to measure the area and mass of new printed materials and calculate the density of new printed materials to determine whether there are density defects includes:

[0049] The actual area of each pixel of the new printed material is calculated using the number of pixels and the camera's field of view. The weight of the new printed material is obtained by adding a mechanical sensor to the bottom of the support plate to calculate the density of the new printed material.

[0050] The density of the new printed material is compared with the density setting value to determine whether there is a density defect.

[0051] Beneficial effects: The present invention solves the problem of materials needing to be fixed in position by adding a regular background; uses a background plate with a regularly arranged pattern to obtain a regular image to better distinguish the material area from the background area; uses a better AI correction method to solve the problem of materials needing to be flattened for detection; and adds binocular and mechanical sensors to simultaneously achieve area and mass measurement and calculate density.

[0052] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings are provided for a better understanding of the present invention and do not constitute a limitation of the present invention.

[0054] Figure 1 It is a schematic diagram of a process according to the present invention;

[0055] Figure 2 This is a schematic diagram of the tunnel light source provided by the present invention;

[0056] Figure 3This is a schematic diagram of side light source lighting provided by the present invention;

[0057] Figure 4 It is a comparison chart of the test results of the standard product and the test product provided according to the present invention. DETAILED DESCRIPTION

[0058] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0059] The present invention provides a method for analyzing defects in printed matter, comprising:

[0060] S1: Obtain a regular image and a corrected image, compare the regular image and the corrected image, obtain a standard material area, and calculate the outer rectangle Rect1 of the edge of the standard material area. It should be noted that:

[0061] The acquisition of the rule image includes:

[0062] Place a tunnel light source or multiple side light sources that shine downward on the device, and set the stage at an angle to the horizontal line;

[0063] When there is no printed material, a camera is used to shoot a background plate to obtain a background image M1, and the background plate is placed on the carrier to filter out the material area to obtain a regular image Map, where the background plate is provided with a regularly arranged pattern.

[0064] like Figure 2 As shown, a tunnel light source 1 that shines downward is placed on the top of the device, and the stage is set at an angle to the horizontal line. The use of a tunnel light source can provide a more uniform lighting effect, reduce shadows and dark areas, and better highlight the defect area;

[0065] like Figure 3 As shown, multiple side light sources 4 that shine downward are placed on both sides of the device, and the platform is set at an angle to the horizontal line; the symmetrical side light sources 4 can reduce the blind spots of the light, so that each area can be adequately illuminated.

[0066] Preferably, the background plate 3 is provided with a regularly arranged pattern. The pattern arrangement rule can be specified arbitrarily, but it is required that the RGB value of the pixel can be obtained from the pixel position under this rule. This can prevent the situation where the material area cannot be found when the material color and the background color are similar. For example, when four colors appear alternately, when the frequency of alternating is high enough, it can be guaranteed from a probabilistic perspective that the material and the background are identical.

[0067] The acquisition of the corrected image includes:

[0068] Compare the RGB value of each pixel of the background image M1 with the RGB value of each pixel of the regular image Map;

[0069] If the RGB value of each pixel of the background image M1 is equal to the RGB value of each pixel of the regular image Map, no processing is performed;

[0070] If the RGB value of each pixel of the background image M1 is not equal to the RGB value of each pixel of the regular image Map, then a difference map Diff between the background image M1 and the regular image Map is calculated;

[0071] After placing the printed material on the background plate 3 , the material image is captured by a camera and obtained, and the material image is corrected using the difference map Diff to obtain a corrected image M2 .

[0072] Compare the RGB value of each pixel of the corrected image M2 with the RGB value of each pixel of the regular map Map to obtain the standard material area;

[0073] The area where the RGB value of the pixel of the corrected image M2 is equal to the RGB value of the pixel of the regular map Map is the background area;

[0074] The area where the RGB value of the pixel of the corrected image M2 is not equal to the RGB value of the pixel of the regular map Map is the standard material area.

[0075] Different from the existing background difference method, the present invention can effectively obtain the material area by increasing the spatial frequency of the regular map. If the spacing between the four colors appearing alternately is 1mm, the error can be controlled within 1mm.

[0076] include,

[0077] After obtaining the standard material area, find the outer rectangle Rect1 of the edge of the standard material;

[0078] Use the edge extraction algorithm to obtain the edge points of the standard material, retain the position (x1, y1), gradient size grad1, and gradient direction direction1 of the edge points of the standard material, and group the edge points of the standard material according to the distance to obtain n groups of edge points;

[0079] The specific calculation method is:

[0080]

[0081]

[0082]

[0083]

[0084] Among them, P(x1,y1) represents the pixel value at point (x1,y1), Δx1 and Δy1 represent the gradient size of (x1,y1) in the x and y directions respectively.

[0085] S2: Calculate the outer rectangle Rect2 of the edge of the new printed material, align Rect1 and Rect2, calculate the distance, gradient size similarity, and gradient direction similarity between the edge points of the standard material and the edge points of the new material, and determine whether it is a defect area. It should be noted that:

[0086] Also includes,

[0087] Find the outer rectangle Rect2 of the edge of the new material;

[0088] Use the edge extraction algorithm to obtain the edge points of the new material, retain the position (x2, y2), gradient size grad2, and gradient direction direction2 of the new material edge points, and group the new material edge points according to distance to obtain m groups of edge points;

[0089] The specific calculation method is:

[0090]

[0091]

[0092]

[0093]

[0094] Among them, P(x2,y2) represents the pixel value at point (x2,y2), Δx2 and Δy2 represent the gradient size of (x2,y2) in the x and y directions respectively.

[0095] For edge points, compare the position distance, gradient similarity, and direction similarity of (x1, y1) and (x2, y2) point by point.

[0096]

[0097]

[0098] direction similarity=abs(cos -1 (direction1-direction2)).

[0099] Also includes,

[0100] If the gradient similarity is greater than the first threshold and the direction similarity is greater than the second threshold, the match is considered successful, otherwise the match fails.

[0101] A secondary comparison is performed on the position where there is no edge point or the edge point fails to match, and the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are compared to see whether they are less than the set average value threshold and the set variance threshold. If the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are not less than the set average value threshold and the set variance threshold, the position where there is no edge point or the edge point fails to match is considered to be a defective area, and the defective area is recorded.

[0102] Furthermore, different inspection areas may have different standards based on customer needs. Local area scaling normalizes all defect standards to a pixels. For example, if defects in area A exceed 2a pixels, it will be considered unqualified, while defects in area B will be considered unqualified if they exceed a / 3 pixels. In this case, area A will be scaled down by half, and area B will be scaled up by three times. Using the same matching parameters when comparing edge matches speeds up calculations and enables automatic stitching of images from multiple areas, thus solving the problem of detecting defects of different sizes.

[0103] S3: Use sensors to measure the area and mass of the new printed material, and calculate the density of the new printed material to determine whether there are density defects. It should be noted that:

[0104] The operation of using sensors to measure the area and mass of new printed materials and calculate the density of new printed materials to determine whether there are density defects includes:

[0105] Using the number of pixels of camera 2 and the camera's field of view, the actual area corresponding to each pixel of the new printed material is calculated. By adding a mechanical sensor to the bottom of the support plate to obtain the weight of the new printed material, the density of the new printed material is calculated.

[0106] The force sensor is installed on the back of the background plate.

[0107] For example, if the field of view of camera 2 is 1200mm*1000mm and the image size captured by the camera is 1920mm*1080mm, then the actual size of each pixel is Area = (1200*1000) / (1920*1080)mm. 2 By counting the number of pixels a in the new printed material area, the actual area a*Area of the new printed material can be obtained; by adding a mechanical sensor at the bottom of the support plate to obtain the weight of the new printed material, the density of the new printed material can be calculated.

[0108] By adding binocular and mechanical sensors, the measurement of area and mass can be achieved simultaneously.

[0109] The density of the new printed material is compared with the density setting value to determine whether there is a density defect.

[0110] S4: Summarize the information data of whether the new printed material has a defective area and whether the new printed material has a density defect.

[0111] exist Figure 4 In the figure, the standard product is on the left and the product to be inspected is on the right. The edge of the colon is detected on the standard product, which belongs to the edge area. The position distance, gradient similarity, and direction similarity of (x1, y1) and (x2, y2) are compared point by point. The normal line does not find this edge on the product to be inspected. A second comparison is required to compare the mean and variance of all pixels around this pixel to see if they are less than the set mean and variance thresholds. Since there is a black part on the standard product and the product to be inspected is not black, the mean of the pixels around the product to be inspected is higher than that of the standard product, and the variance is lower than that of the standard product, so it is considered a defect.

[0112] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention shall be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for analyzing defects in printed matter, characterized in that: include: Obtain a regular image and a corrected image, compare the regular image with the corrected image, obtain a standard material area, and calculate an outer rectangle Rect1 of the edge of the standard material area; Calculate the outer rectangle Rect2 of the edge of the new printed material, align Rect1 and Rect2, calculate the distance, gradient magnitude similarity, and gradient direction similarity between the edge points of the standard material and the new material, and determine whether it is a defect area; Use sensors to measure the area and mass of new printed materials, calculate the density of new printed materials, and determine whether there are density defects; The information data of whether there is a defective area in the new printed material and whether the new printed material has a density defect are summarized.

2. The printed product defect analysis method according to claim 1, characterized in that: The acquisition of the rule image includes: Place a tunnel light source or multiple side light sources that shine downward on the device, and set the stage at an angle to the horizontal line; When there is no printed material, a camera is used to shoot a background plate to obtain a background image M1, and the background plate is placed on the carrier to filter out the material area to obtain a regular image Map, where the background plate is provided with a regularly arranged pattern.

3. A printed matter defect analysis method according to claim 1 or 2, characterized in that: The acquisition of the corrected image includes: Compare the RGB value of each pixel of the background image M1 with the RGB value of each pixel of the regular image Map; If the RGB value of each pixel of the background image M1 is equal to the RGB value of each pixel of the regular image Map, no processing is performed; If the RGB value of each pixel of the background image M1 is not equal to the RGB value of each pixel of the regular image Map, then a difference map Diff between the background image M1 and the regular image Map is calculated; The printed material is placed behind the background plate, and the material image is captured by a camera. The material image is corrected using the difference map Diff to obtain a corrected image M2.

4. The printed matter defect analysis method according to claim 3, characterized in that: Compare the RGB value of each pixel of the corrected image M2 with the RGB value of each pixel of the regular map Map to obtain the standard material area; The area where the RGB value of the pixel of the corrected image M2 is equal to the RGB value of the pixel of the regular map Map is the background area; The area where the RGB value of the pixel of the corrected image M2 is not equal to the RGB value of the pixel of the regular map Map is the standard material area.

5. The printed matter defect analysis method according to claim 4, characterized in that: include, After obtaining the standard material area, find the outer rectangle Rect1 of the edge of the standard material; Use the edge extraction algorithm to obtain the edge points of the standard material, retain the position (x1, y1), gradient size grad1, and gradient direction direction1 of the edge points of the standard material, and group the edge points of the standard material according to the distance to obtain n groups of edge points; The specific calculation method is: Among them, P(x1,y1) represents the pixel value at point (x1,y1), Δx1 and Δy1 represent the gradient size of (x1,y1) in the x and y directions respectively.

6. The method for analyzing printed matter defects according to claim 5, wherein: Also includes, Find the outer rectangle Rect2 of the edge of the new material; Use the edge extraction algorithm to obtain the edge points of the new material, retain the position (x2, y2), gradient size grad2, and gradient direction direction2 of the new material edge points, and group the new material edge points according to distance to obtain m groups of edge points; The specific calculation method is: Among them, P(x2,y2) represents the pixel value at point (x2,y2), Δx2 and Δy2 represent the gradient size of (x2,y2) in the x and y directions respectively.

7. The method for analyzing printed matter defects according to claim 6, wherein: For edge points, compare the position distance, gradient similarity, and direction similarity of (x1, y1) and (x2, y2) point by point. direction similarity=abs(cos- 1 (direction1-direction2))。 8. The printed matter defect analysis method according to claim 7, characterized in that: Also includes, If the gradient similarity is greater than the first set threshold and the gradient direction similarity is greater than the second set threshold, the match is considered successful, otherwise the match fails; A secondary comparison is performed on the position where there is no edge point or the edge point fails to match, and the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are compared to see whether they are less than the set average value threshold and the set variance threshold. If the average value and variance of all pixels surrounding the pixel at the position where there is no edge point or the edge point fails to match are not less than the set average value threshold and the set variance threshold, the position where there is no edge point or the edge point fails to match is considered to be a defective area, and the defective area is recorded.

9. The method for analyzing printed matter defects according to claim 8, wherein: The operation of using sensors to measure the area and mass of new printed materials and calculate the density of new printed materials to determine whether there are density defects includes: The actual area of each pixel of the new printed material is calculated using the number of pixels and the camera's field of view. The weight of the new printed material is obtained by adding a mechanical sensor to the bottom of the support plate to calculate the density of the new printed material. The density of the new printed material is compared with the density setting value to determine whether there is a density defect.