A method for monitoring the quality of new printing materials based on computer vision

By calculating the edge roughness and background possible degree of the closed area in the image of the printed fresh material, combined with cluster analysis, accurately detecting speckle defects in the printed fresh material, the problem of inaccurate distinction between speckle and normal areas in the prior art is solved. , improves the stability of the printing process and resource utilization efficiency.

CN119169008BActive Publication Date: 2025-02-25BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411666804.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The prior art is difficult to accurately distinguish the speckle defect area and the normal area in the image of the printing fresh material, resulting in the inability to monitor and adjust the printing process in time, resulting in waste of resources.

Method used

By acquiring the edge roughness and location distribution of each closed area in the image of the printed fresh material, the degree of speckle was calculated; further obtaining the possible background degree based on the edge roughness and speckle degree in the closed area of ​​the suspected background; then based on clustering The distance clusters the closed area, obtains clustering clusters, and finally detects speckle defects based on the roughness of the edges within the clustering cluster.

Benefits of technology

Accurate detection of speckle defects in new printing materials is achieved, the stability and reliability of the printing process is improved, resource waste is reduced, and the market competitiveness of new materials is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169008B_ABST
    Figure CN119169008B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method for monitoring the quality of new printed materials based on computer vision. The method acquires an image of a new printed material; acquires the degree of speckle in the closed area according to the edge roughness and position distribution of the closed area in the image; acquires the background possibility degree according to the edge roughness and speckle degree of the closed area in each suspected background closed area; acquires the clustering distance of any two closed areas according to the difference in the background possibility degree and speckle degree of the suspected background closed area in which any two closed areas are located, and then clusters the closed areas to obtain cluster clusters; detects speckle defects according to the edge roughness of the closed area in the cluster cluster. The present invention accurately divides the closed areas in the image by acquiring the clustering distance, avoids the interference of normal areas on speckle defects, and is conducive to accurately identifying the speckle defect area.
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 monitoring the quality of new printing materials based on computer vision. Background Art

[0002] In the process of printing new materials, there may be problems such as improper printing process control or equipment failure, which may lead to speckle defects on the surface of the printed new materials, affecting the visual effect and overall quality of the new materials. In order to ensure the quality of the printed new materials, it is necessary to monitor the defects of the printed new materials in real time, discover and deal with the defects in time, avoid the occurrence of speckle defects in the subsequent printed new materials, improve the market competitiveness of new materials, reduce the waste of new material production costs, and ensure the stability and reliability of the new material printing process.

[0003] It is known that the speckle defects generated on new materials during the printing process have grayscale similarity and aggregation. Therefore, in the existing method, the area in the new material image is divided according to the grayscale value and distance of the pixel point, and then the speckle defects are identified. However, in actual situations, there is a small difference in the grayscale between the speckle defect and the normal area in the new material image, which makes it impossible to accurately distinguish the speckle area and the normal area in the new material image by the grayscale value, and thus it is impossible to accurately monitor the speckle defects in the new material, resulting in the inability to adjust the printing process in time, thereby generating more defective new materials and causing a large waste of resources. Summary of the invention

[0004] In order to solve the technical problem that the grayscale difference between the speckle defect and the normal area in the new material image is small, resulting in the inability to accurately distinguish the speckle area and the normal area in the new material image by the grayscale value, and thus the inability to accurately monitor the speckle defects in the new material, the purpose of the present invention is to provide a new printing material quality monitoring method based on computer vision, and the technical solution adopted is as follows:

[0005] The embodiment of the present invention provides a method for monitoring the quality of new printing materials based on computer vision, the method comprising the following steps:

[0006] Get images of new materials for printing;

[0007] Acquire the speckle degree of each closed area according to the edge roughness and position distribution of each closed area in the image;

[0008] According to the edge roughness and speckle degree of the closed area in each suspected background closed area, the possible background degree of each suspected background closed area is obtained;

[0009] According to the background possibility degree of the suspected background closed area where any two closed areas are located and the difference in the speckle degree of any two closed areas, the clustering distance of any two closed areas is obtained; the closed areas are clustered based on the clustering distance to obtain cluster clusters;

[0010] The speckle defects in the printed new materials are detected based on the edge roughness of the closed area within each cluster.

[0011] Furthermore, the method for obtaining the edge roughness is:

[0012] For any edge pixel point of any closed area, connect the preset neighborhood edge pixel points of the edge pixel point at intervals of a preset number of edge pixel points to obtain a reference connection line of the edge pixel point;

[0013] For any reference line, the curvature of each edge pixel point between two end points of the reference line is taken as the first curvature;

[0014] The result of negative correlation and normalization of the maximum first curvature is used as the reference degree value of the reference line;

[0015] The angle formed by two adjacent reference lines is used as the reference angle of the edge pixel;

[0016] For any reference angle, the smallest reference degree value among the reference degree values ​​of the two reference lines constituting the reference angle is used as the reference index of the reference angle;

[0017] According to the reference index of each reference angle and the difference with other reference angles, the roughness index of the edge pixel point is obtained;

[0018] The average value of the roughness index of all edge pixels of the closed area is taken as the edge roughness value of the closed area.

[0019] Furthermore, the method for obtaining the roughness index is:

[0020] For any edge pixel point of any closed area, obtain the average of all reference angles of the edge pixel point as the target angle;

[0021] For any reference angle of the edge pixel point, a result of normalizing the difference between the reference angle and the target angle is used as the first eigenvalue of the reference angle;

[0022] The product of the reference index of the reference angle and the first eigenvalue is used as the irregularity degree value of the reference angle;

[0023] The result of accumulating the irregularity values ​​of all reference angles is taken as the roughness index of the edge pixel point.

[0024] Furthermore, the method for obtaining the speckle degree is:

[0025] For any closed area, all closed areas except the closed area are taken as reference closed areas, and the degree of defect aggregation of the closed area is obtained according to the edge roughness of each reference closed area and the distance from the closed area;

[0026] The speckle degree of the closed area is obtained according to the edge roughness and the defect aggregation degree of the closed area; wherein the edge roughness and the defect aggregation degree are both positively correlated with the speckle degree.

[0027] Furthermore, the method for obtaining the degree of defect aggregation is:

[0028] For any closed area, the shortest Euclidean distance between each reference closed area and the closed area is obtained, and each is taken as the first distance; wherein, when the reference closed area and the closed area are in a containment relationship, the first distance between the reference closed area and the closed area is 0 by default;

[0029] The result of negatively correlating and normalizing the first distance is used as the first weight corresponding to the reference closed area;

[0030] Normalizing the product of the first weight of each reference closed area and the edge roughness as the defect influence of the corresponding reference closed area on the closed area;

[0031] The average of the influence of all reference closed areas on the defects of the closed area is taken as the defect aggregation degree of the closed area.

[0032] Furthermore, the method for obtaining the suspected background closed area is:

[0033] All closed areas that contain at least one closed area are regarded as suspected background closed areas.

[0034] Furthermore, the method for obtaining the background possibility degree is:

[0035] For any suspected background closed area, all closed areas in the suspected background closed area are taken as target closed areas;

[0036] Obtain the difference in edge roughness between each target closed area and the suspected background closed area, and use them as the first difference;

[0037] When the first difference is greater than or equal to a preset difference threshold, the first difference is used as a first abnormality degree of the corresponding target closed area;

[0038] When the first difference is less than a preset difference threshold, the preset difference threshold is used as a first abnormality degree of the corresponding target closed area;

[0039] According to the first abnormality degree and the speckle degree of each target closed area, the background possibility degree of the suspected background closed area is obtained; wherein the first abnormality degree and the speckle degree are both positively correlated with the background possibility degree.

[0040] Furthermore, the clustering distance is obtained by:

[0041] For any two closed areas, the difference in speckle levels between the two closed areas is taken as the second difference;

[0042] The result of negatively correlating and normalizing the second difference is used as the first reference similarity value;

[0043] The smallest possible background degree among the possible background degrees of the suspected background closed regions where the two closed regions are located is used as the second reference similarity value;

[0044] The product of the first reference similarity value and the second reference similarity value is used as the similarity value of the two closed areas;

[0045] The result of negatively correlating and normalizing the similarity values ​​is taken as the clustering distance of the two closed areas.

[0046] Furthermore, the method for detecting speckle defects in the printed new material according to the edge roughness of the closed area in each cluster is:

[0047] For any cluster, the mean value of the edge roughness of all closed areas in the cluster is obtained as the defect degree of the cluster;

[0048] When the defect degree meets the preset defect degree range, the closed area in the cluster is a speckle defect.

[0049] Furthermore, the method for obtaining the closed area is:

[0050] The closed edge lines in the image are obtained by the Canny edge detection algorithm, and the area formed by the closed edge lines is taken as the closed area.

[0051] The present invention has the following beneficial effects:

[0052] In order to detect speckle defects in images, the present invention obtains the speckle degree of each closed area according to the edge roughness and position distribution of each closed area in the image, and preliminarily judges the possibility that each closed area is a speckle defect area; in order to more accurately analyze the speckle defect area in the image, the background possibility degree of each suspected background closed area is obtained according to the edge roughness and speckle degree of the closed area in each suspected background closed area, accurately reflecting the possibility that each suspected background closed area is a normal background area, avoiding the possibility that a normal area is misidentified as a speckle defect area, which is conducive to improving the accuracy of subsequent division of speckle defect areas; in order to accurately divide the speckle defect area in the image, the suspected background closed area where any two closed areas are located is further divided into two suspected background closed areas. The possible background degree of the domain and the difference in the speckle degree of any two closed areas can be accurately obtained, and the clustering distance of any two closed areas can be accurately obtained, which is conducive to the subsequent accurate division of the closed areas in the image; then the closed areas are clustered based on the clustering distance to obtain cluster clusters, and the speckle defect areas and normal areas in the image are accurately distinguished; further, according to the edge roughness of the closed areas in each cluster, it is accurately determined whether the closed area in each cluster is a speckle defect area, and then the speckle defects in the printed new materials are accurately detected, which is conducive to the accurate and timely discovery of speckle defects in new materials, and then timely adjustment of printing equipment and printing industry, avoiding the occurrence of speckle defects in the same position in the subsequent printed new materials, improving the quality of printed new materials, and reducing the waste of printing new materials costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 A schematic flow chart of a method for monitoring the quality of new printing materials based on computer vision provided by an embodiment of the present invention;

[0055] Figure 2 A flow chart of a method for obtaining a speckle degree provided by an embodiment of the present invention;

[0056] Figure 3 A structural diagram of a new printing material quality monitoring system based on computer vision provided by an embodiment of the present invention;

[0057] Figure 4 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a new printing material quality monitoring method based on computer vision proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0059] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0060] The following is a detailed description of a method for monitoring the quality of new printing materials based on computer vision provided by the present invention in conjunction with the accompanying drawings.

[0061] Embodiment 1:

[0062] The specific scenario of this embodiment is: in actual situations, there is a situation where the grayscale difference between the speckle area and the normal area in the printed new material is relatively small, resulting in the inability of the existing method to accurately monitor the speckle defects in the new material based on the distribution of grayscale values. Therefore, in order to accurately monitor the speckle defects in the printed new material, this embodiment analyzes the edge roughness of each closed area in the image of the printed new material and the position distribution of the closed area in real time, obtains the speckle degree of each closed area, and preliminarily determines the possibility that each closed area is the area corresponding to the speckle defect; considering that the closed area corresponding to the normal area in the image overlaps with the closed area corresponding to the speckle defect, it is easy to mistakenly identify the normal area as the speckle defect area, resulting in inaccurate monitoring of the speckle defects in the new material, and then this embodiment further analyzes each suspected background closed area in the image to obtain the speckle degree of each suspected background closed area. The possible background degree is determined, and then the similarity of any two closed areas is analyzed according to the possible background degree of the suspected background closed area in which any two closed areas are located and the difference in the speckle degree of any two closed areas, so as to accurately obtain the clustering distance of any two closed areas; finally, the closed areas in the image are clustered based on the clustering distance, and the clustering clusters are accurately obtained. In order to analyze the speckle defects, the distribution of speckle defects in the printed new materials is determined according to the edge roughness of the closed areas in each cluster, and then the quality of the printed new materials is accurately monitored, problems in the printing process are discovered in time and adjustments are made to avoid the continued occurrence of speckle defects in the new materials.

[0063] This invention proposes a new printing material quality monitoring method based on computer vision, please refer to Figure 1, which shows a schematic flow chart of a method for monitoring the quality of new printing materials based on computer vision provided by an embodiment of the present invention, the method comprising the following steps:

[0064] Step S1: Acquire an image of printed new material.

[0065] Specifically, in order to improve the quality of printed new materials, it is necessary to promptly detect speckle defects in the printed new materials, and then promptly adjust and repair the printing process or printing equipment to avoid the occurrence of speckle defects in the subsequent printed new materials. Therefore, in this embodiment, a fixed camera is arranged above the end of the production line for printing new materials, so that the lens of the fixed camera is aimed at the end of the production line, and the image of the printed new materials is obtained in real time. At the same time, the indoor light is adjusted to prevent the surface reflection of the printed new materials from affecting the monitoring of speckle defects in the new materials. Among them, the image captured by the fixed camera is an RGB image. In order to better monitor the speckle defects in the image, this embodiment grayscales the RGB image to obtain a grayscale image of the printed new material. It should be noted that the images that appear subsequently are all grayscale images of the printed new materials captured in real time.

[0066] Among them, the grayscale processing is a well-known technology and will not be described in detail.

[0067] Step S2: acquiring the speckle degree of each closed area according to the edge roughness and position distribution of each closed area in the image.

[0068] It is known that speckle defects are composed of several irregularly shaped speckle regions that are gathered, and each speckle region is a closed region. In order to analyze the speckle region in the image, this embodiment first obtains the closed edge lines in the image through the Canny edge detection algorithm, and the regions formed by the closed edge lines are all closed regions. Among them, the Canny edge detection algorithm is a well-known technology and will not be described in detail. In the image, text or patterns will also form closed regions. Therefore, the closed regions in the image may contain normal regions and speckle regions at the same time. It is known that the edge lines of the closed regions formed by normal regions such as text or patterns are relatively smooth, and the edge lines of the closed regions corresponding to the speckle defects are irregularly distributed and rougher. Therefore, when the edge roughness of a closed region is greater, the closed region is more likely to be the region corresponding to the speckle defect. On the other hand, considering that the speckle defect has aggregation, in order to more accurately analyze the accuracy of each closed region as a speckle region, and then analyze the influence of the defects of each closed region on the defects of other closed regions, that is, when the edge roughness of other closed regions closer to a closed region is greater, it means that the degree of defect aggregation of the closed region is greater, and the closed region is more likely to be the region corresponding to the speckle defect. Therefore, this embodiment obtains the speckle degree of each closed area according to the edge roughness and position distribution of each closed area in the image, wherein the greater the speckle degree, the more likely the corresponding closed area is a speckle defect area.

[0069] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the edge roughness is: for any edge pixel point of any closed area, the preset neighborhood edge pixel points of the edge pixel point are connected at intervals of a preset number of edge pixel points to obtain a reference line for the edge pixel point. Among them, the method for obtaining the preset neighborhood edge pixel points of the edge pixel point is: in this embodiment, 5 edge pixel points are taken forward and backward respectively with the edge pixel point as the center on the closed edge line where the edge pixel point is located, and all of them are used as the preset neighborhood edge pixel points of the edge pixel point, that is, the edge pixel point corresponds to 10 preset neighborhood edge pixel points, and the implementer can set the preset neighborhood edge pixel points of the edge pixel point according to actual conditions, which is not limited here. In this embodiment, the preset number is set to 5, and the implementer can set the size of the preset number according to actual conditions, which is not limited here. As an example, taking the i-th edge pixel point of the a-th closed area as an example, the i-th edge pixel point and its 10 preset neighborhood edge pixel points are labeled 1, 2, 3...11 in a counterclockwise or clockwise order, where label 6 is the i-th edge pixel point; then the edge pixel points labeled 1 and 7 are connected to form a reference line for the i-th edge pixel point, where the 5 edge pixel points spaced between label 1 and label 7 are edge pixel points labeled 2, 3, 4, 5, and 6 respectively; and by analogy, the edge pixel points labeled 2 and label 8 are connected to form a reference line, the edge pixel points labeled 3 and label 9 are connected to form a reference line, the edge pixel points labeled 4 and label 10 are connected to form a reference line, and the edge pixel points labeled 5 and label 11 are connected to form a reference line, forming a total of 5 reference lines;

[0070] In actual situations, although the edge line of a closed area formed by a normal area such as text or a pattern is relatively smooth, there may be bending points on the edge line. In order to reduce the impact of the bending points and avoid affecting the analysis of the roughness of the edge line of the closed area, this embodiment uses the curvature of each edge pixel point between the two endpoints of any reference line of the edge pixel points as the first curvature; for example, taking the reference line formed by connecting the edge pixel points labeled 2 and 8 as an example, the edge pixel points between the two endpoints of the reference line include edge pixel points labeled 2, 3, 4, 5, 6, 7, and 8. The method for obtaining the curvature is a well-known technology and will not be described in detail. The larger the first curvature, the more likely the corresponding edge pixel point is the bending point on the edge line. In order to avoid the bending point on the reference line affecting the roughness of the edge, the smaller the reference degree of the reference line is, and then the maximum first curvature is negatively correlated and normalized as the reference degree value of the reference line; the larger the reference degree value, the smaller the maximum first curvature, indicating that the reference line is less disturbed by the turning point, and the reference line is more in line with the actual situation. The calculation formula of the reference degree value is: ; In the formula, is the reference degree value of the kth reference line of the ith edge pixel point of the ath closed area; exp is an exponential function with a natural constant as the base; is the maximum first curvature between the two endpoints of the kth reference line of the ith edge pixel point of the ath closed area;

[0071] The more the reference lines of the edge pixel point are not on the same line, the rougher the edge pixel point is. In order to analyze the roughness of the edge pixel point, the angle formed by the two adjacent reference lines is used as the reference angle of the edge pixel point. For any reference angle, the smallest reference degree value among the reference degree values ​​of the two reference lines forming the reference angle is used as the reference index of the reference angle. The larger the reference index is, the less interference the reference angle is subject to from the bending point, the more accurately the roughness of the edge pixel point reflected by the reference angle is, and the greater the reference degree of the reference angle can be used as a reference when analyzing the roughness of the edge pixel point. The greater the difference between the reference angle and other reference angles of the edge pixel point is, the less likely it is that the two reference lines corresponding to the reference angle are on the same line as the other reference lines of the edge pixel point, which indirectly indicates that the edge pixel point is rougher. The roughness index of the edge pixel point is obtained according to the reference index of each reference angle and the difference with other reference angles.

[0072] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the roughness index is: for any edge pixel point of any closed area, the average of all reference angles of the edge pixel point is obtained as the target angle; for any reference angle of the edge pixel point, the result of normalizing the absolute value of the difference between the reference angle and the target angle is used as the first eigenvalue of the reference angle; the larger the first eigenvalue is, the greater the difference between the reference angle and other reference angles is, which indirectly indicates that the reference line distribution of the edge pixel point is more irregular; in order to more accurately analyze the actual impact of the reference angle, the product of the reference index of the reference angle and the first eigenvalue is used as the irregularity value of the reference angle; the larger the irregularity value is, the more accurately it is explained that the difference between the reference angle and other reference angles is greater, the reference line distribution of the edge pixel point is more irregular, and the rougher the edge pixel point is; in order to accurately analyze the roughness of the edge pixel point, the result of accumulating the irregularity values ​​of all reference angles is used as the roughness index of the edge pixel point. The larger the roughness index is, the rougher the edge pixel is. The calculation formula of the roughness index is: ; In the formula, is the roughness index of the ith edge pixel point of the ath closed area; N is the number of reference angles of the ith edge pixel point of the ath closed area; is the reference index of the nth reference angle of the ith edge pixel point of the ath closed area; is the nth reference angle of the ith edge pixel point of the ath closed area; is the target angle of the i-th edge pixel point in the a-th closed area; is the absolute value function; is a sine function; is the first eigenvalue of the nth reference angle of the ith edge pixel point of the ath closed area; is the irregularity value of the nth reference angle of the ith edge pixel point of the ath closed area;

[0073] It is known that the larger the roughness index of the edge pixel point, the rougher the corresponding edge pixel point. In order to accurately analyze the edge roughness of the closed area, the average value of the roughness index of all edge pixels of the closed area is taken as the edge roughness value of the closed area.

[0074] At this point, the edge roughness value of each closed area is obtained.

[0075] Preferably, in one possible implementation of this embodiment, the method for obtaining the speckle degree is as follows: Figure 2 , which shows a flow chart of a method for obtaining the speckle degree provided in this embodiment, the method comprising the following steps:

[0076] Step S201: For any closed area, all closed areas except the closed area are taken as reference closed areas, and the degree of defect aggregation of the closed area is obtained according to the edge roughness of each reference closed area and the distance from the closed area.

[0077] It is known that speckle defects have clustering properties. Therefore, when the distance between other closed areas around a closed area is closer and the edge roughness is greater, it means that the closed area is more likely to be a speckle area. In order to analyze more clearly, for any closed area, this embodiment uses other closed areas except the closed area as reference closed areas, and then obtains the defect clustering degree of the closed area according to the edge roughness of each reference closed area and the distance from the closed area. Among them, the greater the defect clustering degree, the more likely the closed area is to be a speckle area.

[0078] Preferably, in a method that can be implemented in this embodiment, the method for obtaining the degree of defect aggregation is: for any closed area, the shortest Euclidean distance between each reference closed area and the closed area is obtained, and all are used as the first distance; wherein, the method for obtaining the Euclidean distance is a well-known technology and will not be repeated. The smaller the first distance, the closer the corresponding reference closed area is to the closed area, and the greater the degree of reference to the edge roughness of the corresponding reference closed area. Therefore, in this embodiment, the result of negative correlation and normalization of the first distance is used as the first weight of the corresponding reference closed area; the larger the first weight, the smaller the first distance, and the greater the degree of reference to the edge roughness of the corresponding reference closed area, and then the product of the first weight of each reference closed area and the edge roughness is normalized as the defect influence degree of the corresponding reference closed area on the closed area; the greater the defect influence degree, the more obvious the defect aggregation of the closed area. It should be noted that when a reference closed area is in an inclusion relationship with the closed area, the first distance between the reference closed area and the closed area is defaulted to be 0; the inclusion relationship here refers to both the case where the reference closed area contains the closed area and the closed area contains the reference closed area. In order to accurately indicate the degree of defect aggregation in the closed area, this embodiment uses the average of the degree of defect influence of all reference closed areas on the closed area as the degree of defect aggregation in the closed area. The greater the degree of defect aggregation, the more likely the closed area is a speckle defect. Among them, the maximum closed area in this embodiment is the edge of the image. It is known that the area corresponding to the edge of the image cannot be all speckle defects. Therefore, this embodiment does not analyze the maximum closed area, that is, does not obtain the degree of defect aggregation in the maximum closed area.

[0079] In order to accurately represent the degree of defect aggregation in each closed area, this embodiment specifically quantifies the degree of defect aggregation as a defect aggregation value. The larger the defect aggregation value, the more likely the corresponding closed area is a speckle area. The calculation formula of the defect aggregation value is: ; In the formula, is the defect aggregation degree value of the dth closed area; M is the total number of closed areas except the largest closed area; is the first distance between the dth closed area and the mth reference closed area; is the edge roughness value of the mth reference closed area; exp is an exponential function with a natural constant as the base; is the first weight of the mth reference closed area; norm is the normalization function. is the defect influence degree value of the mth reference closed area on the dth closed area.

[0080] At this point, the defect aggregation degree value of each closed area is obtained.

[0081] Step S202: acquiring the speckle degree of the closed area according to the edge roughness and the defect aggregation degree of the closed area; wherein the edge roughness and the defect aggregation degree are both positively correlated with the speckle degree.

[0082] It is known that the greater the edge roughness, the more likely the corresponding closed area is a speckle defect area; the greater the defect aggregation, the more likely the corresponding closed area is a speckle defect area. Therefore, this embodiment obtains the speckle degree of the closed area according to the edge roughness and defect aggregation of the closed area; wherein the edge roughness and defect aggregation are both positively correlated with the speckle degree. The greater the speckle degree, the more likely the closed area is a speckle defect area.

[0083] In order to accurately indicate the possibility that each closed area is a speckle defect area, the present embodiment specifically quantifies the degree of speckle as a speckle degree value. The larger the speckle degree value, the more likely the corresponding closed area is a speckle area. The calculation formula of the speckle degree value is: ; In the formula, is the speckle degree value of the dth closed area; is the edge roughness value of the dth closed area; is the defect aggregation degree value of the dth closed area.

[0084] At this point, the speckle degree value of each closed area is obtained.

[0085] Step S3: Obtain the background possibility degree of each suspected background closed area according to the edge roughness degree and speckle degree of the closed area in each suspected background closed area.

[0086] Specifically, there will be text or patterns on the surface of the new material after printing, and the speckle defect may cover the text or pattern, that is, the closed area formed by the speckle will exist in the closed area formed by the text or pattern, resulting in the inability to accurately distinguish the speckle area from the normal area based on the speckle degree. In order to distinguish the speckle area from the normal background area, which is conducive to the subsequent accurate division of the speckle area, this embodiment regards the closed area containing at least one closed area as the suspected background closed area. When the edge roughness of the closed area contained in a suspected background closed area is greater and the speckle degree is greater, it means that the suspected background closed area is more likely to be a normal background area. Therefore, this embodiment obtains the background possibility degree of each suspected background closed area according to the edge roughness and speckle degree of the closed area in each suspected background closed area. The greater the background possibility degree, the more likely the corresponding suspected background closed area is to be a normal background area.

[0087] Preferably, in a manner that can be implemented in this embodiment, the method for obtaining the possible degree of background is as follows: for any suspected background closed area, for the convenience of description, the closed areas in the suspected background closed area are all taken as target closed areas; the difference between the edge roughness of each target closed area and the suspected background closed area is obtained, and all are taken as the first difference; the larger the first difference, the more likely the corresponding target closed area is to be a speckle defect area, and the more likely the suspected background closed area is to be a normal area. In order to avoid the influence of negative numbers, this embodiment sets a preset difference threshold as 0, and when the first difference is greater than or equal to the preset difference threshold, the first difference is taken as the first abnormality degree of the corresponding target closed area; when the first difference is less than the preset difference threshold, the preset difference threshold is taken as the first abnormality degree of the corresponding target closed area. When the first abnormality degree of the target closed area in the suspected background closed area is greater and the speckle degree is greater, it means that the target closed area in the suspected background closed area is more likely to be a speckle area, and the more likely the suspected background closed area is to be a normal background area. Then, according to the first abnormality degree and the speckle degree of each target closed area, the background possibility degree of the suspected background closed area is obtained; wherein the first abnormality degree and the speckle degree are both positively correlated with the background possibility degree.

[0088] In order to accurately indicate the possibility that each suspected background closed area is a normal background area, this embodiment specifically quantifies the background possibility degree as a background possibility degree value. The larger the background possibility degree value, the more likely the corresponding suspected background closed area is to be a normal background area. The calculation formula of the background possibility degree value is: ; In the formula, is the background possibility value of the tth suspected background closed area; is the total number of target closed areas in the tth suspected background closed area; is the speckle degree value of the vth target closed area in the tth suspected background closed area; is the maximum value function; is the edge roughness value of the vth target closed area in the tth suspected background closed area; is the edge roughness value of the tth suspected background closed area; is the first difference; is the first abnormality level value.

[0089] At this point, the background likelihood value of each suspected background closed area is obtained.

[0090] Step S4: obtaining a clustering distance between any two closed areas according to the background possibility degree of the suspected background closed area where any two closed areas are located and the difference in the speckle degree of any two closed areas; clustering the closed areas based on the clustering distance to obtain cluster clusters.

[0091] In order to divide the image into speckle areas, this embodiment uses a clustering algorithm to determine the speckle defect area in the image, but since the speckle exists on the surface of the new material after printing, the grayscale difference between the speckle and the background may be small, and directly using the grayscale of the pixel points and the distance between the pixels as the distance measurement of clustering may not accurately distinguish the speckle area from the normal area. This embodiment detects speckle defects, so it is necessary to cluster the speckle defect areas into the same cluster to distinguish the speckle defects from the normal area.

[0092] For any two closed areas, when the background probability of the suspected background closed area where the two closed areas are located is relatively large, it means that the two closed areas may exist near the area where the speckle is distributed, and the two closed areas are more likely to be the same type of speckle areas; when the speckle degrees of the two closed areas are closer, it means that the possibility that the two closed areas belong to the same type of area is greater. Therefore, this embodiment obtains the clustering distance of any two closed areas according to the background probability of the suspected background closed area where the two closed areas are located and the difference in the speckle degree of any two closed areas. The smaller the clustering distance, the more likely the two closed areas are to be the same type of area. Then, the closed areas are clustered based on the clustering distance to obtain cluster clusters, and the closed areas of the same type in the image are accurately divided. It should be noted that the maximum closed area does not participate in clustering.

[0093] Preferably, in an achievable manner of this embodiment, the clustering distance is obtained by: for any two closed areas, the absolute value of the difference between the speckle degrees of the two closed areas is used as the second difference; the smaller the second difference is, the more similar the two closed areas are, and the result of negatively correlating and normalizing the second difference is used as the first reference similarity value; the larger the first reference similarity value is, the smaller the second difference is, the more similar the two closed areas are, and the more likely the two closed areas are to be of the same category; at the same time, the minimum background possible degree among the background possible degrees of the suspected background closed areas where the two closed areas are located is obtained as the second reference similarity value; the larger the second reference similarity value is, the more likely the two closed areas are to be speckle areas, and the product of the first reference similarity value and the second reference similarity value is used as the similarity value of the two closed areas; the larger the similarity value is, the more likely the two closed areas are to be of the same category, and therefore, the result of negatively correlating and normalizing the similarity value is used as the clustering distance of the two closed areas. The smaller the clustering distance is, the larger the similarity value is, and the more likely the two closed areas are to be of the same category.

[0094] The calculation formula of cluster distance is: ; In the formula, is the clustering distance between the xth closed area and the yth closed area; is the speckle degree value of the xth closed area; is the speckle degree value of the yth closed area; for the second difference; is the first reference similarity value; exp is an exponential function with a natural constant as the base; is the background possibility value of the suspected background closed area where the x-th closed area is located; is the background possibility value of the suspected background closed area where the yth closed area is located; is the minimum value function; is the absolute value function; is the second reference similarity value; is the similarity value between the xth closed area and the yth closed area.

[0095] At this point, the clustering distance between any two closed areas is obtained.

[0096] According to the clustering distance between any two closed regions, the closed regions in the image are clustered by using the DBSCAN density clustering algorithm to obtain cluster clusters. The DBSCAN density clustering algorithm is a well-known technology and will not be described in detail.

[0097] Step S5: Detecting the speckle defects in the printed new material according to the edge roughness of the closed area in each cluster.

[0098] In order to determine the speckle defects in the image, this embodiment analyzes each cluster. When the edge roughness of the closed area in a cluster is greater, it means that the closed area in the cluster is more likely to be a speckle defect area. Therefore, this embodiment detects the speckle defects in the new printing material according to the edge roughness of the closed area in each cluster.

[0099] In this embodiment, for any cluster, the mean value of the edge roughness values ​​of all closed areas in the cluster is obtained as the defect level value of the cluster; the defect level value is normalized, and when the normalized defect level value is greater than the preset defect level threshold, the closed area in the cluster is a speckle defect. In this embodiment, the preset defect level threshold is set to 0.8, and the implementer can set the preset defect level threshold according to the actual situation, which is not limited here. At this point, the speckle defect in the image is determined.

[0100] It should be noted that when there is no speckle defect in the image, the printing equipment can continue to print new materials; when there is a speckle defect in the image, printing is stopped, and the staff will make corresponding adjustments and repairs to the printing equipment or make corresponding adjustments to the printing process according to the location of the speckle defect, so as to avoid the occurrence of speckle defects in the same position in the subsequent printed new materials, improve the quality of printed new materials, and reduce the cost of printing new materials.

[0101] In summary, the present embodiment obtains an image of a printed new material; obtains the degree of speckle in a closed area according to the edge roughness and position distribution of the closed area in the image; obtains the background possibility degree according to the edge roughness and speckle degree of the closed area in each suspected background closed area; obtains the clustering distance of any two closed areas according to the difference in the background possibility degree and speckle degree of the suspected background closed area in which any two closed areas are located, and then clusters the closed areas to obtain cluster clusters; detects speckle defects according to the edge roughness of the closed area in the cluster cluster. The present invention accurately divides the closed areas in the image by obtaining the clustering distance, avoids the interference of normal areas on speckle defects, and is conducive to accurately identifying the speckle defect area.

[0102] Embodiment 2:

[0103] The present invention also proposes a new printing material quality monitoring system based on computer vision, please refer to Figure 3 , which shows a structural diagram of a printing new material quality monitoring system based on computer vision provided by an embodiment of the present invention, the system includes: an image acquisition module 10, a speckle degree acquisition module 20, a background possibility degree acquisition module 30, a cluster acquisition module 40 and a data processing module 50.

[0104] The image acquisition module 10 is used to acquire the image of the printed new material.

[0105] The speckle degree acquisition module 20 is used to acquire the speckle degree of each closed area in the image according to the edge roughness and position distribution of each closed area.

[0106] The background possibility degree acquisition module 30 is used to acquire the background possibility degree of each suspected background closed area according to the edge roughness and speckle degree of the closed area in each suspected background closed area.

[0107] The cluster acquisition module 40 is used to acquire the cluster distance between any two closed areas according to the background possibility degree of the suspected background closed area where any two closed areas are located and the difference in the speckle degree of any two closed areas; cluster the closed areas based on the cluster distance to obtain clusters.

[0108] The data processing module 50 is used to detect the speckle defects in the printed new material according to the edge roughness of the closed area in each cluster.

[0109] It should be noted that: the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the new printing material quality monitoring system based on computer vision and the new printing material quality monitoring method based on computer vision provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0110] Embodiment 3:

[0111] The present invention also proposes a new printing material quality monitoring device based on computer vision, the device includes a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a new printing material quality monitoring method based on computer vision provided in the embodiment of the present application. The device can be a chip, a component or a module, and the chip can include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a new printing material quality monitoring method based on computer vision provided in the above embodiment.

[0112] In addition, the present application embodiment also protects a computer device, see Figure 4The computer device includes a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402, wherein when the processor 402 executes the computer program 403, the computer device can execute any one of the above-mentioned methods for monitoring the quality of new printed materials based on computer vision.

[0113] Embodiment 4:

[0114] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a new printing material quality monitoring method based on computer vision provided in the above embodiment.

[0115] Embodiment 5:

[0116] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a new printing material quality monitoring method based on computer vision provided in the above embodiment.

[0117] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0118] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for monitoring the quality of new printing materials based on computer vision, characterized in that: The method comprises the following steps: Get images of new materials for printing; Acquire the speckle degree of each closed area according to the edge roughness and position distribution of each closed area in the image; According to the edge roughness and speckle degree of the closed area in each suspected background closed area, the possible background degree of each suspected background closed area is obtained; According to the background possibility degree of the suspected background closed area where any two closed areas are located and the difference in the speckle degree of any two closed areas, the clustering distance of any two closed areas is obtained; the closed areas are clustered based on the clustering distance to obtain cluster clusters; The speckle defects in the printed new materials are detected based on the edge roughness of the closed area within each cluster.

2. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the edge roughness is: For any edge pixel point of any closed area, connect the preset neighborhood edge pixel points of the edge pixel point at intervals of a preset number of edge pixel points to obtain a reference connection line of the edge pixel point; For any reference line, the curvature of each edge pixel point between two end points of the reference line is taken as the first curvature; The result of negative correlation and normalization of the maximum first curvature is used as the reference degree value of the reference line; The angle formed by two adjacent reference lines is used as the reference angle of the edge pixel; For any reference angle, the smallest reference degree value among the reference degree values ​​of the two reference lines constituting the reference angle is used as the reference index of the reference angle; According to the reference index of each reference angle and the difference with other reference angles, the roughness index of the edge pixel point is obtained; The average value of the roughness index of all edge pixels of the closed area is taken as the edge roughness value of the closed area.

3. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 2, characterized in that: The method for obtaining the roughness index is: For any edge pixel point of any closed area, obtain the average of all reference angles of the edge pixel point as the target angle; For any reference angle of the edge pixel point, a result of normalizing the difference between the reference angle and the target angle is used as the first eigenvalue of the reference angle; The product of the reference index of the reference angle and the first eigenvalue is used as the irregularity degree value of the reference angle; The result of accumulating the irregularity values ​​of all reference angles is taken as the roughness index of the edge pixel point.

4. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the speckle degree is: For any closed area, all closed areas except the closed area are taken as reference closed areas, and the degree of defect aggregation of the closed area is obtained according to the edge roughness of each reference closed area and the distance from the closed area; The speckle degree of the closed area is obtained according to the edge roughness and the defect aggregation degree of the closed area; wherein the edge roughness and the defect aggregation degree are both positively correlated with the speckle degree.

5. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 4, characterized in that: The method for obtaining the degree of defect aggregation is: For any closed area, the shortest Euclidean distance between each reference closed area and the closed area is obtained, and each is taken as the first distance; wherein, when the reference closed area and the closed area are in a containment relationship, the first distance between the reference closed area and the closed area is 0 by default; The result of negatively correlating and normalizing the first distance is used as the first weight corresponding to the reference closed area; Normalizing the product of the first weight of each reference closed area and the edge roughness as the defect influence of the corresponding reference closed area on the closed area; The average of the influence of all reference closed areas on the defects of the closed area is taken as the defect aggregation degree of the closed area.

6. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the suspected background closed area is: All closed areas that contain at least one closed area are regarded as suspected background closed areas.

7. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the background possibility degree is: For any suspected background closed area, all closed areas in the suspected background closed area are taken as target closed areas; Obtain the difference in edge roughness between each target closed area and the suspected background closed area, and use them as the first difference; When the first difference is greater than or equal to a preset difference threshold, the first difference is used as a first abnormality degree of the corresponding target closed area; When the first difference is less than a preset difference threshold, the preset difference threshold is used as a first abnormality degree of the corresponding target closed area; According to the first abnormality degree and the speckle degree of each target closed area, the background possibility degree of the suspected background closed area is obtained; wherein the first abnormality degree and the speckle degree are both positively correlated with the background possibility degree.

8. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the cluster distance is: For any two closed areas, the difference in speckle levels between the two closed areas is taken as the second difference; The result of negatively correlating and normalizing the second difference is used as the first reference similarity value; The smallest possible background degree among the possible background degrees of the suspected background closed regions where the two closed regions are located is used as the second reference similarity value; The product of the first reference similarity value and the second reference similarity value is used as the similarity value of the two closed areas; The result of negatively correlating and normalizing the similarity values ​​is taken as the clustering distance of the two closed areas.

9. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for detecting speckle defects in the printed new material according to the edge roughness of the closed area in each cluster is: For any cluster, the mean value of the edge roughness of all closed areas in the cluster is obtained as the defect degree of the cluster; When the defect degree meets the preset defect degree range, the closed area in the cluster is a speckle defect.

10. A method for monitoring the quality of new printing materials based on computer vision as claimed in claim 1, characterized in that: The method for obtaining the closed area is: The closed edge lines in the image are obtained by the Canny edge detection algorithm, and the area formed by the closed edge lines is taken as the closed area.

Citation Information

Patent Citations

  • Printing defect detection method based on machine vision

    CN117705815A

  • Inspection device, inspection system, method for inspection, and program

    JP2018155736A