CN117541588B - Printing defect detection method for paper product - Google Patents

Printing defect detection method for paper product Download PDF

Info

Publication number
CN117541588B
CN117541588B CN202410033449.1A CN202410033449A CN117541588B CN 117541588 B CN117541588 B CN 117541588B CN 202410033449 A CN202410033449 A CN 202410033449A CN 117541588 B CN117541588 B CN 117541588B
Authority
CN
China
Prior art keywords
gray
value
area
target area
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410033449.1A
Other languages
Chinese (zh)
Other versions
CN117541588A (en
Inventor
杨思侠
林桐
杨世发
董世贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian Jianfeng Printing Co ltd
Original Assignee
Dalian Jianfeng Printing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian Jianfeng Printing Co ltd filed Critical Dalian Jianfeng Printing Co ltd
Priority to CN202410033449.1A priority Critical patent/CN117541588B/en
Publication of CN117541588A publication Critical patent/CN117541588A/en
Application granted granted Critical
Publication of CN117541588B publication Critical patent/CN117541588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30144Printing quality
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the technical field of image processing, in particular to a printing defect detection method of paper products, which comprises the following steps: collecting gray images of paper printed matters; distinguishing a foreground region and a background region of the gray image by adopting an OTSU algorithm to obtain a binary image; performing mask superposition on the binary image and the gray level image to obtain each foreground pattern area; obtaining the possibility that the foreground pattern region is an interference region according to the gray level distribution in the foreground pattern region and the gray level gradient change of the edge pixel points, and screening out a target region based on a preset threshold value; obtaining morphological characteristics according to gray level distribution of a target area; obtaining a defect evaluation index of the target area according to the morphological characteristics and the gray gradient distribution of the pixel points in the target area; screening out a defect area according to the defect evaluation index; and comparing the area and the number of the defect areas with the preset area and the preset number to generate a printing defect detection result. The invention extracts the fuzzy printing area more accurately and completely.

Description

Printing defect detection method for paper product
Technical Field
The application relates to the technical field of image processing, in particular to a printing defect detection method for paper products.
Background
Various adverse conditions may occur in the paper product during printing, such as excessive printing speeds or wear of printer components, which may cause distortion or blurring of the partial print image during printing, affecting the quality and appearance of the printed product. Therefore, the defect paper product with printing fuzzy gradual change needs to be detected, so that the printing parameters are correspondingly adjusted or the printing operation flow is improved, and the stable product quality is ensured.
At present, when the printing quality of the paper product surface is judged by a computer vision technology, the blurring condition of the pattern is different, and the recognition accuracy of the pattern edge is affected due to the smooth gray level change of the edge generated by the gradual change of printing blurring. Therefore, it is necessary to determine whether there is a smooth gray level change in the pattern area, so as to accurately evaluate the print quality of the pattern area.
Disclosure of Invention
In order to solve the technical problems, the invention provides a printing defect detection method for paper products, which aims to solve the existing problems.
The printing defect detection method of the paper product adopts the following technical scheme:
one embodiment of the present invention provides a method for detecting printing defects in a paper product, the method comprising the steps of:
collecting gray images of paper printed matters;
distinguishing a foreground region and a background region of the gray image by adopting an OTSU algorithm to obtain a binary image; performing mask superposition on the binary image and the gray level image to obtain each foreground pattern area; obtaining a discrete coefficient according to gray level distribution in a foreground pattern area; obtaining a gray gradient change measurement according to the gray gradient change of the edge pixel points in the foreground pattern region; obtaining the possibility that the foreground pattern region is an interference region according to the discrete coefficient and the gray gradient change measurement of the foreground pattern region, and screening out a target region based on a preset threshold;
constructing an included angle cosine value sequence according to the gray distribution of the target area; acquiring morphological characteristics of the target area according to the cosine value sequence of the included angle; obtaining a defect evaluation index of the target area according to the morphological characteristics and the gray gradient distribution of the pixel points in the target area; screening out a defect area according to the defect evaluation index; and comparing the area and the number of the defect areas with the preset area and the preset number to generate a printing defect detection result.
Preferably, the distinguishing the foreground area from the background area by using the OTSU algorithm to obtain a binary image includes:
processing the gray image by adopting an OTSU algorithm to obtain an OTSU threshold value, and binarizing the gray image by the OTSU threshold value to obtain a binary image;
the pixel point with the gray value larger than the OTSU threshold value is used as the pixel point of the foreground region, the pixel point is marked as 1 in the binary image, the pixel point with the gray value smaller than the OTSU threshold value is used as the pixel point of the background region, and the pixel point is marked as 0 in the binary image.
Preferably, the obtaining the discrete coefficient according to the gray scale distribution in the foreground pattern area includes:
acquiring the gray standard deviation of a foreground pattern area and the entropy of a gray co-occurrence matrix;
calculating the reciprocal of the product of the gray standard deviation and the entropy;
and calculating a difference value between a maximum gray value and a minimum gray value in the foreground pattern region, and taking the ratio of the difference value to the reciprocal as a discrete coefficient of the foreground pattern region.
Preferably, the obtaining the measurement of the gray gradient according to the gray gradient of the edge pixel point in the foreground pattern area includes:
acquiring gradient amplitudes of all edge pixel points in a foreground pattern area by adopting a sobel operator, and calculating average gradient amplitudes of all edge pixel points in the foreground pattern area;
obtaining the maximum value and the minimum value of the average gradient amplitude in all foreground pattern areas;
and calculating the difference value between the maximum value and the minimum value as a first difference value, calculating the difference value between the maximum value and the average gradient amplitude as a second difference value, and taking the ratio of the second difference value to the first difference value as a gray gradient change measurement of the foreground pattern area.
Preferably, the obtaining the possibility that the foreground pattern area is the interference area according to the discrete coefficient and the gray gradient change metric of the foreground pattern area includes:
and calculating the product of the discrete coefficient and the gray gradient change metric, and taking the normalized value of the product as the possibility that the foreground pattern area is an interference area.
Preferably, the screening the target area based on the preset threshold includes:
and marking the foreground pattern areas with the possibility of being the interference areas larger than a preset threshold value as the interference areas, and obtaining the rest areas as each target area after the interference areas are excluded from all the foreground pattern areas.
Preferably, the constructing the sequence of angle cosine values according to the gray distribution of the target area includes:
obtaining the chain code of the target area by adopting 8-chain codes on the edge of the target area, and calculating the included angles of all adjacent two chain codes to form an included angle sequence;
and performing cosine transformation on each element in the included angle sequence to obtain an included angle cosine value sequence.
Preferably, the obtaining the morphological feature of the target area according to the cosine value sequence of the included angle includes:
for each element in the cosine value sequence of the included angle, calculating the sum value of the element value and 1;
the sum of the sum values of all elements is taken as the morphological characteristics of the target area.
Preferably, the obtaining the defect evaluation index of the target area according to the morphological feature and the gray gradient distribution of the pixel points in the target area includes:
for each pixel point in a target area, acquiring the direction of the pixel point with the largest gray value difference in the target area as the maximum gray value difference direction, and acquiring the maximum gradient direction in the eight neighborhood directions of the pixel point;
calculating the sum of absolute values of the differences between the gray values of the pixel points and all other residual pixel points;
calculating a cosine value between the maximum gray level difference direction and the maximum gradient direction of the pixel point;
and calculating the average value of the products of the sum value and the cosine value of all pixel points in the target area, and taking the product of the average value and the morphological characteristic as a defect evaluation index of the target area.
Preferably, the screening the defect area according to the defect evaluation index includes:
normalizing the defect evaluation indexes of each target area, and taking the corresponding target area as a defect area when the normalized value is larger than or equal to a preset super parameter, otherwise, not taking the corresponding target area as the defect area.
The invention has at least the following beneficial effects:
according to the invention, a foreground target is positioned through the difference of foreground and background gray levels, and then the edge gray level smoothing phenomenon generated by pattern printing fuzzy gradual change is screened in a foreground target area, so that a pattern area with printing fuzzy is obtained; and then, carrying out presence detection of fuzzy printing based on the pattern area, reducing the detection range and the calculation cost of detecting the global image by the step, improving the defect that the fuzzy area identification is inaccurate caused by the phenomenon that the traditional method for directly carrying out printing quality through the area segmentation result can not accurately identify the edge gray level smoothing phenomenon, and avoiding the problem that the local gray level smoothing change characteristic is diluted by the gray level change condition in the global image, thereby more accurately and completely extracting the fuzzy printing area.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for detecting printing defects in a paper product according to the present invention;
FIG. 2 is a flow chart of a print defect detection method index construction for paper products.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description refers to the specific implementation, structure, characteristics and effects of a printing defect detection method for paper products according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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.
The following specifically describes a specific scheme of the printing defect detection method for paper products provided by the invention with reference to the accompanying drawings.
The embodiment of the invention provides a printing defect detection method for paper products.
Specifically, a method for detecting printing defects of a paper product is provided, referring to fig. 1, and the method comprises the following steps:
step S001, collecting a gray image of the paper print using the high resolution camera.
Firstly, the embodiment collects the surface image of the paper printed matter printed by a manufacturer through the high-resolution camera, flatly places the paper printed matter on a horizontal conveyor belt during shooting, then fixes the camera right above the conveyor belt to ensure that the collected image is clear and high-quality, thereby shooting to obtain the surface image of the paper printed matter, and carrying out graying pretreatment to obtain a gray image.
At present, various color printing patterns generally exist on paper printed matters, but the problems of abrasion of printing equipment and setting of printing parameters in the printing process may cause a fuzzy gradual change phenomenon of partial printed patterns, and the fuzzy printed patterns may affect the yield of the whole product. The subsequent steps analyze and detect the defects to remove defective products.
Step S002, the areas with pattern are screened from the gray image, then defect evaluation is calculated for each pattern area and the areas with possible blurred defects are screened.
The printed fuzzy area exists in the pattern of the paper product, in order to obtain a more accurate fuzzy defect area, the distinction between the foreground pattern area and the background paper area is needed, and the photographed image can be processed by using an OTSU algorithm to obtain a binary image of the foreground area.
However, due to the fact that part of the wrinkle shadow or ink stain interference may exist on the surface of the paper product, the segmented foreground region in the binary image contains both the pattern region and other interference regions. Therefore, the method needs to further screen the pattern, exclude irrelevant interference areas and obtain accurate and complete pattern areas. Then, analysis is performed based on the pattern area, corresponding defect existence evaluation is calculated, and an area with possible fuzzy defects is obtained according to the evaluation.
Therefore, the specific process of screening the area of the pattern and extracting the area with the fuzzy defect comprises the following steps:
and processing the gray image by using an OTSU algorithm to obtain an OTSU threshold value, so as to binarize the gray image to obtain a binary image. And setting the pixel point with the gray value higher than the OTSU threshold value as a foreground pixel point and setting the pixel point with the gray value lower than the threshold value as a background pixel point. Therefore, all foreground pixel points form a foreground region, and all background pixel points form a background region. The OTSU algorithm is a known technique, and this embodiment is not described in detail.
And selecting pixel points of all foreground areas to be subjected to mask overlapping to the original gray level image, namely, performing mask overlapping on the binary image and the gray level image to obtain a plurality of possible foreground areas, and then analyzing and screening all the foreground areas to obtain a foreground pattern area.
In the gray image of the paper printing product, because the pattern is attached to the surface of the paper product through mechanical spray printing, the gray in the area is generally smooth, few outlier gray value pixel points exist, and the edge change is severe, namely the edge gray gradient change is obvious. Whereas the internal gray scale variation of the shadow or stained interference area is relatively discrete and the edge gray scale gradient variation is smoother and less pronounced than the pattern edges. Thus, an abnormality evaluation index is established for each foreground pattern region based on the above features.
For each foreground pattern area obtained after mask superposition, constructing the following evaluation criteria, wherein any one foreground pattern area is taken as an example for calculation:
in the method, in the process of the invention,for this region as interference region possibility, +.>Is the standard deviation of the gray values of the pixels in this region, and (2)>Entropy value of gray level co-occurrence matrix for pixel value in the region, < >>Representing the maximum gray value and the minimum gray value of this region, respectively,/->The average gradient amplitude of all edge pixels of this region,/-, for>For the maximum value of the average gradient amplitude of all foreground region edge pixels, +.>Is the minimum value of the average gradient amplitude of all foreground region edge pixels. Wherein (1)>For the first difference, +>The method for calculating the gradient amplitude values of all the edge pixel points in the region is as follows: all edge pixel points in the area are calculated by adopting a sobel operator, wherein the sobel operator is a known technology, and the embodiment is not repeated.
Wherein,the discrete coefficient of the gray distribution in the region is represented, wherein the gray standard deviation of the region +.>Entropy of gray level co-occurrence matrix>The distribution dispersion of the pixel gray level in the region can be measured, thus +.>The larger the gray distribution representing this region is, the more discrete the gray distribution is, and +_ is added thereto for positive correlation>The more likely it is to belong to the interference region.
Maximum gray value span of simultaneous bonding areasIf the span is larger, the difference in the gradation distribution of the pixel points is larger, and the pixel points are more likely to belong to the disturbance region.
As a measure of the gray gradient change of the edge pixels of the region due to interferenceThe edge gradient change of the region is smoother than that of the pattern region, so the gradient amplitude of the edge pixels is smaller. The measure of the average gradient amplitude of the region edge points is calculated here, the average gradient amplitude +.>Gradually decrease, then the corresponding metricThe probability of this area as an interference area increases gradually.
Finally useFunction pair->Normalization is carried out, will->Controlled at [0,1 ]]Within the interval of (2), may be selected empirically>The corresponding region is an interference region.
The method is used for processing the interference area, screening out possible interference areas, and then removing the interference areas to obtain the target area with the pattern.
After obtaining the areas with pattern targets, analyzing each target area, wherein the defect areas with fuzzy gradual change are not necessarily in each target area, so that the defect existence evaluation needs to be calculated by analyzing the gray level smooth characteristics and the morphological change characteristics of each target area, and the target areas with fuzzy gradual change are screened according to the size of the defect existence evaluation.
In this analysis of the defect characteristics of the blurred graded region, if there is a blurred graded condition, the gray level of the pixels in the region is more uneven than the gray level distribution of the normal printed region, there is a clear gray level grading trend, and the edge lines of the normal printed region converge more flatly from the external morphological edge, while the morphological edge of the blurred graded region is not flat enough, and there is a possibility of edge concave-convex fluctuation. Based on the above features, a defect evaluation index is defined for each target area.
Firstly, based on morphological characteristics, the embodiment uses 8-chain codes to process the edges of all target areas, and the number of the chain codes corresponding to a certain target area is assumed to beThen, the calculation of the included angle between two adjacent chain codes is started, and an included angle sequence +.>,/>. Then, cosine transforming the included angle in the sequence to obtain the cosine value sequence +.>. The 8-chain code technique and the cosine transform are known techniques, and the description of this embodiment is omitted.
Based on the gradation characteristics of the gradation, the maximum gradient direction of some local pixel points in the target area may be similar to the gradation direction; in the region where no gradation exists, any pixel pointThe gray maximum gradient direction of (2) is random and has no obvious trend.
Thus, the maximum gray-scale difference direction and the maximum gradient direction in 8-neighbor of each pixel point of the target area are calculated, wherein the pixel points in the target area are usedFor example, distance pixel point +.>The direction of the pixel with the largest gray value is taken as the pixel +.>Is +.>Simultaneously acquire at pixel point +.>Maximum gradient direction of 8 neighborhoods of +.>If there is a gradual change in the region, the direction of maximum gray scale difference of the pixel point +.>And its maximum gradient direction in 8 neighborhoods>And the included angle is smaller. And meanwhile, combining the statistical characteristics of the gray level differences of the pixel points in the target area to obtain a defect evaluation index.
For any one target area, the defect evaluation index can be defined as:
in the middle ofIs a defect evaluation index of the target area, +.>For the total number of pixel points of the target area, +.>For pixel point in target area +.>Gray value of +.>Except for the pixel point in the target area>Gray value of outer jth pixel, < >>As a function of the cosine of the wave,is pixel dot +.>The direction of maximum gray scale difference in the target area,/->Is pixel dot +.>Maximum gradient direction in eight neighborhood directions, < >>For morphological features of the target region>For the number of chain codes surrounding the target area, < +.>To enclose the k-th and k+1-th angles between adjacent chain codes of the target region.
Wherein,the sum of gray differences between any pixel points in the target area is representative of the gray difference statistical characteristics of all pixels in the area, and if the gray distribution in the target area is more uneven, the gray difference of the pixels is larger, thenThe region is more likely to be a defective region.
The local maximum gradient direction difference characteristic of any pixel point in the target area represents the significance of the gray gradient trend of the pixels in the area, if the condition of fuzzy gradient exists in the target area, the obvious gray gradient direction exists, the larger the value is, the more obvious the condition of fuzzy gradient in the target area is, and the greater the possibility that the target area is used as a defect area is.
Representing the morphological characteristics of the target region, passing all adjacent chain code included angles through +.>Mapping is performed. If the target area is a fuzzy gradient area, more concave-convex fluctuation exists on the edge lines of the target area relative to the normal texture edge, the corresponding edge chain codes are more complex, and therefore the sum of cosine values of included angles of all adjacent chain codes is larger, and the possibility that the target area is used as a defect area is higher.
So far, the corresponding defect evaluation indexes are obtained by the method aiming at all the target areas, and the target areas with defects can be screened according to the sizes of the defect evaluation indexes in the follow-up step.
The defect evaluation indexThe method comprises indexes such as pixel gray scale difference characteristics, gray scale gradient trend, edge morphology difference and the like of a target area, if the defect evaluation of the target area is larger, the defect evaluation of the target area is more likely to be a fuzzy gradient defect, and otherwise, the defect is less likely to be a fuzzy gradient defect.
Therefore, the present embodiment uses all defect evaluationsFunction normalizationTo [0,1 ]]Between which the superparameter ++can be defined empirically>And when the target area is a defect area with fuzzy gradual change. Wherein,the function is a well-known technique, and this embodiment will not be described in detail.
And S003, generating defect evaluation according to the fuzzy defect area on the surface of the paper product.
So as to obtain all defect areas, and according to the area and the number of the defect areas detected on the surface of a certain paper product, wherein the area of the defect areas is the total number of pixel points in the defect areas, the number of the defect areas with the area larger than the preset area is counted, and when the number is larger than the preset number, the product is taken as a defective product; otherwise, the product is used as a good product. The preset area and the preset number in this embodiment set the empirical values to be 50 pixels and 5, respectively, and the practitioner can set the empirical values by himself.
And optimizing relevant parameters of printing equipment according to the grade of good products and defective products in the defect evaluation of the paper products so as to improve the yield. The index construction flow chart of the printing defect detection method of the paper product is shown in fig. 2.
The present invention has been completed.
According to the embodiment of the invention, the foreground target is positioned through the difference of the foreground gray level and the background gray level, and then the edge gray level smoothing phenomenon generated by the fuzzy gradual change of pattern printing is screened in the foreground target area, so that the pattern area with fuzzy printing is obtained; and then, carrying out presence detection of fuzzy printing based on the pattern area, reducing the detection range and the calculation cost of detecting the global image by the step, improving the defect that the fuzzy area identification is inaccurate caused by the phenomenon that the traditional method for directly carrying out printing quality through the area segmentation result can not accurately identify the edge gray level smoothing phenomenon, and avoiding the problem that the local gray level smoothing change characteristic is diluted by the gray level change condition in the global image, thereby more accurately and completely extracting the fuzzy printing area.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment mainly describes differences from other embodiments.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; the technical solutions described in the foregoing embodiments are modified or some of the technical features are replaced equivalently, so that the essence of the corresponding technical solutions does not deviate from the scope of the technical solutions of the embodiments of the present application, and all the technical solutions are included in the protection scope of the present application.

Claims (7)

1. A method for detecting printing defects in a paper product, the method comprising the steps of:
collecting gray images of paper printed matters;
distinguishing a foreground region and a background region of the gray image by adopting an OTSU algorithm to obtain a binary image; performing mask superposition on the binary image and the gray level image to obtain each foreground pattern area; obtaining a discrete coefficient according to gray level distribution in a foreground pattern area; obtaining a gray gradient change measurement according to the gray gradient change of the edge pixel points in the foreground pattern region; obtaining the possibility that the foreground pattern region is an interference region according to the discrete coefficient and the gray gradient change measurement of the foreground pattern region, and screening out a target region based on a preset threshold;
constructing an included angle cosine value sequence according to the gray distribution of the target area; acquiring morphological characteristics of the target area according to the cosine value sequence of the included angle; obtaining a defect evaluation index of the target area according to the morphological characteristics and the gray gradient distribution of the pixel points in the target area; screening out a defect area according to the defect evaluation index; comparing the area and the number of the defect areas with the preset area and the preset number to generate a printing defect detection result;
the obtaining the discrete coefficient according to the gray level distribution in the foreground pattern area comprises the following steps:
acquiring the gray standard deviation of a foreground pattern area and the entropy of a gray co-occurrence matrix;
calculating the reciprocal of the product of the gray standard deviation and the entropy;
calculating a difference value between a maximum gray value and a minimum gray value in a foreground pattern region, and taking the ratio of the difference value to the reciprocal as a discrete coefficient of the foreground pattern region;
the obtaining the possibility that the foreground pattern area is an interference area according to the discrete coefficient and the gray gradient change measurement of the foreground pattern area comprises the following steps: calculating the product of the discrete coefficient and the gray gradient change measurement, and taking the normalized value of the product as the possibility that the foreground pattern area is an interference area;
obtaining a defect evaluation index of the target area according to the morphological characteristics and the gray gradient distribution of the pixel points in the target area, wherein the defect evaluation index comprises the following steps:
for each pixel point in a target area, acquiring the direction of the pixel point with the largest gray value difference in the target area as the maximum gray value difference direction, and acquiring the maximum gradient direction in the eight neighborhood directions of the pixel point;
calculating the sum of absolute values of the differences between the gray values of the pixel points and all other residual pixel points;
calculating a cosine value between the maximum gray level difference direction and the maximum gradient direction of the pixel point;
and calculating the average value of the products of the sum value and the cosine value of all pixel points in the target area, and taking the product of the average value and the morphological characteristic as a defect evaluation index of the target area.
2. The method for detecting printing defects of a paper product according to claim 1, wherein said distinguishing a foreground region from a background region of a gray image by using an OTSU algorithm to obtain a binary image comprises:
processing the gray image by adopting an OTSU algorithm to obtain an OTSU threshold value, and binarizing the gray image by the OTSU threshold value to obtain a binary image;
the pixel point with the gray value larger than the OTSU threshold value is used as the pixel point of the foreground region, the pixel point is marked as 1 in the binary image, the pixel point with the gray value smaller than the OTSU threshold value is used as the pixel point of the background region, and the pixel point is marked as 0 in the binary image.
3. The method for detecting printing defects of a paper product according to claim 1, wherein said obtaining a gray gradient change metric from gray gradient changes of edge pixels in a foreground pattern area comprises:
acquiring gradient amplitudes of all edge pixel points in a foreground pattern area by adopting a sobel operator, and calculating average gradient amplitudes of all edge pixel points in the foreground pattern area;
obtaining the maximum value and the minimum value of the average gradient amplitude in all foreground pattern areas;
and calculating the difference value between the maximum value and the minimum value as a first difference value, calculating the difference value between the maximum value and the average gradient amplitude as a second difference value, and taking the ratio of the second difference value to the first difference value as a gray gradient change measurement of the foreground pattern area.
4. The method for detecting printing defects in a paper product according to claim 1, wherein said screening out target areas based on a predetermined threshold comprises:
and marking the foreground pattern areas with the possibility of being the interference areas larger than a preset threshold value as the interference areas, and obtaining the rest areas as each target area after the interference areas are excluded from all the foreground pattern areas.
5. The method for detecting printing defects in a paper product according to claim 1, wherein said constructing a sequence of angle cosine values from a gray distribution of the target area comprises:
obtaining the chain code of the target area by adopting 8-chain codes on the edge of the target area, and calculating the included angles of all adjacent two chain codes to form an included angle sequence;
and performing cosine transformation on each element in the included angle sequence to obtain an included angle cosine value sequence.
6. The method for detecting printing defects in a paper product according to claim 5, wherein said obtaining morphological features of the target area based on the sequence of cosine values of the included angle comprises:
for each element in the cosine value sequence of the included angle, calculating the sum value of the element value and 1;
the sum of the sum values of all elements is taken as the morphological characteristics of the target area.
7. The method for detecting printing defects in a paper product according to claim 1, wherein said screening out defective areas based on defect evaluation criteria comprises:
normalizing the defect evaluation indexes of each target area, and taking the corresponding target area as a defect area when the normalized value is larger than or equal to a preset super parameter, otherwise, not taking the corresponding target area as the defect area.
CN202410033449.1A 2024-01-10 2024-01-10 Printing defect detection method for paper product Active CN117541588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410033449.1A CN117541588B (en) 2024-01-10 2024-01-10 Printing defect detection method for paper product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410033449.1A CN117541588B (en) 2024-01-10 2024-01-10 Printing defect detection method for paper product

Publications (2)

Publication Number Publication Date
CN117541588A CN117541588A (en) 2024-02-09
CN117541588B true CN117541588B (en) 2024-03-12

Family

ID=89784675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410033449.1A Active CN117541588B (en) 2024-01-10 2024-01-10 Printing defect detection method for paper product

Country Status (1)

Country Link
CN (1) CN117541588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117808799A (en) * 2024-02-29 2024-04-02 天津戎军航空科技发展有限公司 Chamfering equipment processing quality detection method based on artificial intelligence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN105844621A (en) * 2016-03-17 2016-08-10 阜阳市飞扬印务有限公司 Method for detecting quality of printed matter
CN105931227A (en) * 2016-04-14 2016-09-07 北京工业大学 Weld surface defect feature extraction method based on image gray scale B sweeping curve
CN114565614A (en) * 2022-05-02 2022-05-31 武汉华塑亿美工贸有限公司 Injection molding surface defect analysis method and system based on machine vision
CN116912131A (en) * 2023-08-29 2023-10-20 东莞市沃野包装材料有限公司 Visual detection method for water transfer surface film paper based on image processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN105844621A (en) * 2016-03-17 2016-08-10 阜阳市飞扬印务有限公司 Method for detecting quality of printed matter
CN105931227A (en) * 2016-04-14 2016-09-07 北京工业大学 Weld surface defect feature extraction method based on image gray scale B sweeping curve
CN114565614A (en) * 2022-05-02 2022-05-31 武汉华塑亿美工贸有限公司 Injection molding surface defect analysis method and system based on machine vision
CN116912131A (en) * 2023-08-29 2023-10-20 东莞市沃野包装材料有限公司 Visual detection method for water transfer surface film paper based on image processing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Bo Tang et al..Review of surface defect detection of steel products based on machine vision.《IET Image Processing》.2023,第303–322页. *
Ngoc Tuyen Le et al..Automatic Defect Inspection for Coated Eyeglass Based on Symmetrized Energy Analysis of Color Channels.《symmetry》.2019,第1-16页. *
彭道刚等.基于 OTSU 和区域生长的电厂管道缺陷检测与分割.《红外技术》.2021,第43卷(第05期),第502-509页. *
汪子君等.基于鲁棒 Otsu 的红外无损检测缺陷分割算法.《红外与激光工程》.2019,第48卷(第02期),第1-9页. *

Also Published As

Publication number Publication date
CN117541588A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN114842017B (en) HDMI cable surface quality detection method and system
CN112630222B (en) Mobile phone cover plate glass defect detection method based on machine vision
CN109490316B (en) Surface defect detection algorithm based on machine vision
CN116843688B (en) Visual detection method for quality of textile
CN117541588B (en) Printing defect detection method for paper product
CN108345881B (en) Document quality detection method based on computer vision
CN108846397B (en) Automatic detection method for cable semi-conducting layer based on image processing
CN111861996B (en) Printed fabric defect detection method
CN107490582B (en) Assembly line workpiece detection system
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN102156996A (en) Image edge detection method
CN109685766A (en) A kind of Fabric Defect detection method based on region fusion feature
CN117237368B (en) Bridge crack detection method and system
CN113888536B (en) Printed matter double image detection method and system based on computer vision
CN114881915A (en) Symmetry-based mobile phone glass cover plate window area defect detection method
CN114549441A (en) Sucker defect detection method based on image processing
CN116523923B (en) Battery case defect identification method
CN111507426A (en) No-reference image quality grading evaluation method and device based on visual fusion characteristics
CN116977358A (en) Visual auxiliary detection method for corrugated paper production quality
CN111739012A (en) Camera module white spot detecting system based on turntable
CN115018835B (en) Automobile starter gear detection method
CN113034488A (en) Visual detection method of ink-jet printed matter
CN114445365A (en) Banknote printing quality inspection method based on deep learning algorithm
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN115018785A (en) Hoisting steel wire rope tension detection method based on visual vibration frequency identification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant