CN117830318A - Printing ink printing defect detection method based on image processing - Google Patents

Printing ink printing defect detection method based on image processing Download PDF

Info

Publication number
CN117830318A
CN117830318A CN202410250845.XA CN202410250845A CN117830318A CN 117830318 A CN117830318 A CN 117830318A CN 202410250845 A CN202410250845 A CN 202410250845A CN 117830318 A CN117830318 A CN 117830318A
Authority
CN
China
Prior art keywords
image
gray
gray value
value
gray level
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.)
Withdrawn
Application number
CN202410250845.XA
Other languages
Chinese (zh)
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.)
Shaanxi Mr China Printing Ink Technology Co ltd
Shaanxi Xinaohua Material Technology Co ltd
Original Assignee
Shaanxi Mr China Printing Ink Technology Co ltd
Shaanxi Xinaohua Material Technology 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 Shaanxi Mr China Printing Ink Technology Co ltd, Shaanxi Xinaohua Material Technology Co ltd filed Critical Shaanxi Mr China Printing Ink Technology Co ltd
Priority to CN202410250845.XA priority Critical patent/CN117830318A/en
Publication of CN117830318A publication Critical patent/CN117830318A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to an ink printing defect detection method based on image processing, which comprises the steps of collecting an ink printing paper image, taking a gray level image of the ink printing paper image as an image to be detected, constructing a binary image of each gray level value, carrying out pixel point matching on the binary image of each gray level value and the binary images of other gray levels, obtaining the possibility that the gray level value is a defect gray level according to the number of matched pixel points and the number of connected domains in the binary image of the gray level value, segmenting and compensating the gray level histogram of the image to be detected by utilizing the possibility to obtain a reconstructed gray level histogram, carrying out histogram equalization on the image to be detected by the reconstructed gray level histogram to obtain an enhanced image of the image to be detected, carrying out threshold segmentation on the enhanced image, carrying out ghost defect detection according to the segmented image, and improving the detection efficiency and accuracy.

Description

Printing ink printing defect detection method based on image processing
Technical Field
The present invention relates generally to the field of image processing technology. More particularly, the present invention relates to an ink printing defect detection method based on image processing.
Background
In the ink printing industry, various defects often occur on the surface of a printed matter due to faults of the printing machine or other factors, and the quality of the printed matter is affected, so that the defects on the surface of the printed matter need to be detected, so that the related adjustment of the printing machine is convenient.
In the prior art, the detection of the surface defects of the printed matter is generally carried out by image pretreatment, the defect detection is carried out on the processed image, and in the image processing process, the histogram equalization algorithm for limiting the contrast is adopted to enhance the ink printed image.
However, for the ghost defects existing on the surface of the printed matter, the ghost part is similar to the gray value of the word on the printed matter, the ghost part cannot be enhanced due to the fact that the threshold value is uniformly limited in the histogram, for the slight ghost, namely, the ghost with lighter color, the gray value of the ghost part belongs to the sparse part in the histogram, the ghost part cannot be enhanced due to the fact that the gray value of the ghost part is phagocytosed by the denser part in the histogram equalization process of limiting the contrast, and the detail of the ghost part cannot be enhanced, but is blurred, so that the enhancement effect on the ghost defects by using the histogram equalization method of limiting the contrast is poor, the quality of the image is not increased, the reflection is reduced, and the ghost defects cannot be accurately detected later.
Disclosure of Invention
To solve one or more of the above-mentioned problems, the present invention provides an ink printing defect detection method based on image processing, which improves the efficiency and accuracy of detecting ghost defects. The technical scheme is as follows: an ink printing defect detection method based on image processing, comprising:
collecting an ink printing paper image;
graying the image to obtain a gray level image serving as an image to be detected, and constructing a binary image of each gray level value in the image to be detected;
taking each gray value as a target gray value, carrying out pixel point matching on the binary image of the target gray value and the binary images of other gray values to obtain other binary images which are most matched with the binary image of the target gray value, and counting the number of matched pixels;
carrying out connected domain analysis on the binary image of the target gray value;
obtaining the possibility that the target gray value is a defect gray value according to the number of the matched pixel points and the number of the connected domains;
dividing and compensating the gray level histogram of the image to be detected by utilizing the possibility that all gray level values are defect gray level values to obtain a reconstructed gray level histogram;
performing histogram equalization on the image to be detected through the reconstructed gray level histogram to obtain an enhanced image of the image to be detected;
and carrying out threshold segmentation on the enhanced image, and carrying out ghost defect detection according to the image subjected to threshold segmentation.
Further, the method for obtaining the reconstructed gray level histogram includes:
acquiring a gray level histogram of an image to be detected, wherein the abscissa of the gray level histogram is a gray level value, and the ordinate of the gray level histogram is the frequency of a pixel point corresponding to the gray level value;
presetting a unified initial segmentation threshold value of the gray level histogram; the initial segmentation threshold is the frequency number of the pixel points, and the frequency numbers of the pixel points corresponding to all gray values in the gray histogram are uniformly segmented based on the initial segmentation threshold;
calculating a specific frequency division threshold value of a pixel point corresponding to each gray value based on the initial division threshold value and the possibility that each gray value is a defect gray value;
based on the specific frequency division threshold value of the pixel point corresponding to each gray value, carrying out specific division on the frequency of the pixel point corresponding to each gray value;
calculating the compensation frequency required by the pixel point corresponding to each gray value according to the frequency of the pixel point corresponding to each gray value and the possibility that each gray value is a defect gray value;
and compensating the frequency of the pixel point corresponding to each gray value by using the compensation frequency to obtain a reconstructed gray histogram.
Further, the specific frequency division threshold value of the pixel point corresponding to each gray value is calculated by the following method:
if the number of the pixel points corresponding to the gray value is smaller than the initial segmentation threshold, the specific frequency segmentation threshold corresponding to the gray value is the initial segmentation threshold;
otherwise, the specific frequency division threshold corresponding to the gray value is:
in the method, in the process of the invention,is gray value +.>Corresponding specific frequency division threshold, < >>For the initial segmentation threshold,/a>As a logarithmic function based on a natural constant e, < ->For presetting super parameter->Is gray value +.>Is the probability of a defective gray value.
Further, the target gray value is a probability of a defective gray value, and the calculating method comprises the following steps:
in the method, in the process of the invention,is gray value +.>For the probability of defective gray values, +.>For gray values +.>The total number of corresponding pixels, < >>For +.>The number of matched pixels in the binary pattern most matched in the binary pattern, +.>Is gray value +.>The number of connected domains included in the binary image of (2).
Further, the compensation frequency required by the pixel point corresponding to each gray value is calculated by the following method:
obtaining pixel points corresponding to all gray values in the gray histogram, and dividing the sum of frequency numbers divided by a specific frequency division threshold value
The required compensation frequency of the pixel point corresponding to each gray value is:
in the method, in the process of the invention,is gray value +.>Compensation frequency required by the corresponding pixel point, < ->For the minimum gray value in the image to be detected, is->For the maximum gray value in the image to be detected, < >>Is gray value +.>For the probability of defective gray values, +.>And the sum of the frequency numbers divided by the specific frequency division threshold is the pixel point corresponding to all the gray values in the gray histogram.
Further, the obtaining method of the other binary image most matched with the binary image of the target gray value comprises the following steps:
taking a binary image of the target gray value as a reference;
placing the binary image of other gray values above the binary image of the target gray value, overlapping the two, and then carrying out translation in each direction;
counting the number of the pixel points overlapped with each other after each translation;
and taking the binary image of the other gray level with the largest number of overlapped pixel points as the other binary image which is most matched with the binary image of the target gray level.
Further, constructing a binary image of each gray value in the image to be detected, including:
selecting a blank image for each gray value;
in the blank image, the pixel points corresponding to the gray values become black, and the pixel points corresponding to other gray values become white, so that a binary image of the gray values is obtained.
Further, the threshold segmentation is performed on the enhanced image, and ghost defect detection is performed according to the image after threshold segmentation, including:
performing Ojin threshold segmentation on the enhanced image to obtain a plurality of segmentation areas; the segmentation area comprises an image area with a gray level value of 0 and an image area with a gray level value of 255;
and carrying out difference between an image area with the gray value of 255 and a corresponding area in the image to be detected to obtain a difference image, and taking the area corresponding to the difference image in the image to be detected as a ghost defect area.
The invention has the following effects:
according to the invention, the probability that each gray value in an image to be detected is measured based on the binary image, pixel point matching is carried out on the binary image of each gray value and the binary image corresponding to other gray values, the binary image which is the best match is obtained, the probability that the gray value is a defect gray value is obtained according to the number of matched pixel points in the binary image which is the best match and the number of connected domains contained in the binary image of the gray value.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a schematic flow diagram of the method of the present invention;
fig. 2 is a schematic flow chart of the reconstruction of gray level histogram in the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the ink printing defect detection method based on image processing includes steps S1 to S8, specifically as follows:
s1: an ink printed paper image is collected.
S2: and graying the image to obtain a gray level image serving as an image to be detected, and constructing a binary image of each gray level value in the image to be detected.
The method for constructing the binary image of each gray value in the image to be detected comprises the following steps:
acquiring the number of gray values in an image to be detected, wherein the number of the gray values is represented by the number of pixel points contained in the image by the gray values, and each gray value corresponds to a plurality of pixel points in the image to be detected;
constructing a binary image of each gray value in the image to be detected, which comprises the following steps:
selecting a blank image for each gray value;
in the blank image, the pixel points corresponding to the gray values become black, and the pixel points corresponding to other gray values become white, so that a binary image of the gray values is obtained.
It should be noted that, the distribution position of each pixel point corresponding to the gray value in the image to be detected corresponds to the distribution position of the pixel point contained in the binary image, the difference is that in the binary image, the gray value of the pixel point contained in the gray value is set to be black (the gray value is 0), the gray value isThe corresponding binary diagram is marked +.>,/>The value range of (2) is the maximum gray value +_in the image to be detected>And minimum gray value->In this way, a binary image corresponding to each gray value (excluding 255) in the image to be detected is obtained, and analysis of each gray value in the image to be detected is converted into analysis of the corresponding binary image.
S3: and taking each gray value as a target gray value, carrying out pixel point matching on the binary image of the target gray value and the binary images of other gray values to obtain other binary images which are most matched with the binary image of the target gray value, and counting the number of matched pixels.
The other binary image most matched with the binary image of the target gray value is obtained by the following steps:
placing the binary image of other gray values above the binary image of the target gray value, overlapping the two, and then carrying out translation in each direction;
counting the number of the pixel points overlapped with each other after each translation;
and taking the binary image of the other gray level with the largest number of overlapped pixel points as the other binary image which is most matched with the binary image of the target gray level.
In a specific example, specifically:
will gray valueAs target gray value +.>Binary diagram->Selecting binary image of other gray valuesI.e. grey value->Corresponding binary image, image +.>Covering the image->On, the image is further added>Moving 1 pixel position in a direction making an angle of 0 degrees with the horizontal rightward direction will +.>Pixel position with middle coordinates (1, 1) and +.>The pixel positions with the middle coordinates of (1, 2) are aligned, the number of pixel points with the gray value of 0 in the aligned pixel positions of the two images is counted, and then the images are +.>Moving 2 pixel positions along a direction with an angle of 0 degrees to the horizontal direction will +.>Pixel position with middle coordinates (1, 1) and +.>Aligning the pixel positions with the middle coordinates of (1, 3), counting the number of pixel points with gray values of 0 in the aligned pixel positions of the two images, and the like, and adding the images +_>Move 3,4 along 0 degrees from horizontal until +.>Pixel location +.>The empirical value is 50, the method can be adjusted according to actual conditions, the number of pixel points with gray values of 0 in pixel positions aligned by two images after each movement is counted, and then the image +_>Moving along the directions with the included angles of 45 degrees, 90 degrees, 135 degrees and 180 degrees to the right direction according to the rule, counting the maximum number of pixels with gray values of 0 in the pixel positions aligned by the two images as +.>Representing->And->The maximum number of matched pixels;
traversing all other binary maps of gray valuesObtaining +.>The binary image with the best matching, namely the binary image with the largest number of matched pixels, is +.A binary image corresponding to each gray level is +.>Performing the above operations to obtain a binary image corresponding to each target gray level>The other binary image that matches best, and the maximum number of matched pixels to the other binary image that matches best +.>
S4: and carrying out connected domain analysis on the binary image of the target gray value.
The connected domain information in the binary image of each target gray value can be obtained through the connected domain analysis.
S5: and obtaining the possibility that the target gray level value is a defect gray level value according to the number of the matched pixel points and the number of the connected domains.
Wherein, the target gray value is the probability of the defect gray value, the calculation method is as follows:
in the method, in the process of the invention,is gray value +.>For the probability of defective gray values, +.>Is gray value +.>The total number of corresponding pixels in the image to be detected, < >>Meaning +.>The number of matched pixels in the binary pattern which is the best match, and the binary pattern which is the gray value +.>Binary map of->Is gray value +.>The number of connected domains contained in the binary pattern, < +.>Representation->The number of connected domains in the image.
The gray value is as followsImage +.>Matching the pixel values with the number and gray value of the matched pixel points in other binary maps which are matched most>Ratio of the number of pixels contained in the image to be detected +.>As a matching rate, the matching rate is used to measure the gray value +.>The invention considers the existence of noise in the image, the frequency of the noise gray value appearing in the image is less, and in the matching process, a larger matching rate can be obtained with other images, so that the gray value with high matching rate is not only the gray value of the ghost defect, but also the gray value of the noise, and therefore, the gray value is further divided into two parts>For analysis of the possibility of ghost defects or noise, each +.>Carrying out connected domain analysis on the image to obtain the number of the connected domains +.>,/>Representing gray value +.>As the noise is likely to be distributed in the image more dispersedly and randomly, under most conditions, one noise pixel point is a connected domain, when the gray level is likely to be noise, the larger the noise connected domain number in the corresponding image is, so that the total number of connected domains is->More (I) in the middle of>The value of (c) is larger than the value of (c),the value of (2) is smaller when the gray value +.>In the case of the gray value of the ghost defect, since the ghost is distributed in the image with regularity and continuity, one connected domain of the ghost includes a plurality of pixel points which are connectedThe number of domains and the number of pixels corresponding to the gray value are different greatly, and the number of pixels is +.>Is smaller and +.>Is larger when a gray value matching rate +.>Large, the possibility of noise +.>Smaller (less)>When larger, the gray value is a possibility of ghost +.>Therefore, the formula is combined with the isolation randomness of the noise to correct the possibility of the ghost defect of each gray value, so that the condition that the noise is judged to be ghost is avoided, and the result of evaluating the ghost defect of each gray value is more accurate.
S6: and dividing and compensating the gray level histogram of the image to be detected by utilizing the possibility that all gray level values are defect gray level values to obtain a reconstructed gray level histogram.
Wherein, the method for obtaining the reconstructed gray level histogram is shown in fig. 2, and comprises the following steps:
s61: acquiring a gray level histogram of an image to be detected;
in the gray level histogram, the abscissa is a gray level value, the ordinate is the frequency number of the pixel points corresponding to the gray level value, in the gray level histogram, intuitively, the gray level histogram is formed by a plurality of columns, each gray level value corresponds to one column, and the height of each column is the frequency number of the pixel points corresponding to the gray level value, namely the total number of the pixel points corresponding to the gray level value in the image to be detected.
S62: presetting a unified initial segmentation threshold value of the gray level histogram; the initial segmentation threshold is the frequency number of the pixel points, and the frequency numbers of the pixel points corresponding to all gray values in the gray histogram are uniformly segmented based on the initial segmentation threshold;
the histogram equalization algorithm for limiting the contrast is to divide the gray level histogram into columns corresponding to each gray level value by utilizing a unified threshold value, namely, divide the pixel frequency number which is larger than the unified threshold value in the pixel frequency numbers corresponding to all the gray level values into the pixel frequency numbers corresponding to each gray level value, so as to obtain a histogram for limiting the contrast, and then calculate the mapping function and the like to limit the enhancement amplitude of the contrast.
Thus, for the printed image to be detected, after the gray level histogram thereof is obtained, the area of the gray level histogram is calculatedAcquiring unified initial segmentation threshold +.>Wherein->For the frequency of the pixel, in a specific example, an initial segmentation threshold +.>The determining method of (1) comprises the following steps:
i.e. in a grey level histogramCan divide the gray level histogram into upper and lower parts, and the upper part area is +.>,/>Is super-parametric and can be according to practical implementation conditionsCondition setting, in this embodiment +.>The empirical value of 30% for the lower part area of 70% for +.>Set to a uniform initial segmentation threshold.
S63: calculating a specific frequency division threshold value of a pixel point corresponding to each gray value based on the initial division threshold value and the possibility that each gray value is a defect gray value;
the specific frequency division threshold value of the pixel point corresponding to each gray value is calculated by the following steps:
if the frequency of the pixel points corresponding to the gray values is smaller than the initial segmentation threshold value, the column height where the gray values are located is represented to be below the initial threshold value, the initial segmentation threshold value is not adjusted, and the specific frequency segmentation threshold value corresponding to the gray values is the initial segmentation threshold value;
if the frequency of the pixel point corresponding to the gray value is greater than or equal to an initial threshold, namely the height of the column where the gray value is located is above the initial threshold, the initial segmentation threshold is adjusted, and the specific frequency segmentation threshold corresponding to the gray value is as follows:
in the method, in the process of the invention,is gray value +.>Corresponding specific segmentation threshold->For the initial segmentation threshold,/a>As a logarithmic function based on a natural constant e, < ->For presetting the super parameter, the empirical value is 0.4 #>Is gray value +.>For the probability of defective gray values, +.>The empirical value is 0.4 for the super parameter, and can be adjusted according to specific data conditions.
Further, for the gray value part requiring to adjust the initial segmentation threshold:
when the gray level isPossibility of ghost defects +.>When larger, i.e.)>When (I)>If the gray value is positive, i.e. the initial segmentation threshold value is increased, the segmentation of the gray value on the height of the column is reduced, so that the gray value with high possibility of ghost defects can be effectively enhanced during equalization; when gray value +.>Possibility of ghost defects +.>Smaller, i.eWhen (I)>Is negative or zero, i.e. the initial segmentation thresholdThe value is reduced, the division of the column height where the gray value is located is increased, the gray value with small possibility of ghost defects is prevented from being phagocytized by the gray value with large possibility of ghost defects during equalization, the enhancement effect of the gray value with large possibility of ghost defects is better, and the specific division threshold value corresponding to each gray value is adjusted according to the possibility of ghost defects of each gray value.
It should be noted that, in the dividing process, if the possibility of the ghost defect is large, the pillar where the gray value is located is larger than the initial threshold, and smaller division is performed, that is, different division thresholds are set for the pillar where the ghost defect is located according to the possibility of the ghost defect.
S64: based on the specific frequency division threshold value of the pixel point corresponding to each gray value, carrying out specific division on the frequency of the pixel point corresponding to each gray value;
in the gray histogram, the column where the gray value is located is transversely divided into an upper part and a lower part based on the specific frequency division threshold value of the pixel point corresponding to each gray value, namely according to the specific frequency division threshold value of the pixel point corresponding to each gray value.
S65: calculating the compensation frequency required by the pixel point corresponding to each gray value according to the frequency of the pixel point corresponding to each gray value and the possibility that each gray value is a defect gray value;
in the gray level histogram, the frequency of dividing the pixel point corresponding to each gray level value is the upper part area of dividing the column where the gray level value is located, and the compensation frequency required by the pixel point corresponding to each gray level value is the compensation area required by the column where the gray level value is located.
The method for calculating the compensation frequency required by the pixel point corresponding to each gray value comprises the following steps:
obtaining the sum of frequency numbers divided by specific frequency division threshold values, namely gray, of pixel points corresponding to all gray values in the gray histogramThe sum of the areas of the histogram where the parts of the bar where all gray values are located are cut
The compensation frequency (the compensation area required by the column where the gray value is located) required by the pixel point corresponding to each gray value is:
in the method, in the process of the invention,is gray value +.>The compensation frequency required for the corresponding pixel, i.e. gray value +.>The compensation area required for the column in which +.>For the minimum gray value in the image to be detected, is->For the maximum gray value in the image to be detected, the greater the probability of a ghost defect when one gray value is, i.e. +.>The larger the compensation area assigned to the gray value +.>The larger the gray value is, the higher the height of the column in the histogram is, i.e. the larger the frequency of the pixel point corresponding to the gray value is, the less the gray value is phagocytosed by other gray values during equalization, so that the gray value with high possibility of ghost defects can be effectively enhanced, and the formula realizes the compensation of the pixel point corresponding to the gray value regulated according to the ghost probabilityFrequency compensation.
S66: compensating the frequency of the pixel point corresponding to each gray value by using the compensation frequency to obtain a reconstructed gray histogram;
in the gray level histogram, the gray level histogram is calculated in accordance with S65Gray value +.>The frequency of the corresponding pixel is compensated, i.e. gray value +.>Frequency of corresponding pixel plus +.>The value obtained is taken as gray value +.>The final frequency number of the corresponding pixel points is obtained by carrying out frequency number compensation on the frequency number of the pixel points corresponding to each gray value in the mode, a reconstructed gray histogram is obtained, in the compensation process, the frequency number of the pixel points corresponding to the gray value with high possibility of ghost is more, the allocated compensation frequency number is smaller, the frequency number of the pixel points corresponding to the gray value with low possibility of ghost is less, the visual expression of the operation in the histogram is that the area of the column where each gray value is located is compensated, in the compensation process, the area of the compensation for the gray value with high possibility of ghost is more, the area of the compensation for the gray value with high possibility of ghost is less, and the part of the gray value with high possibility of ghost after equalization is enhanced instead of being phagocytized.
S7: and carrying out histogram equalization on the image to be detected through the reconstructed gray level histogram to obtain an enhanced image of the image to be detected.
And carrying out histogram equalization on the image to be detected through the reconstructed gray level histogram, enhancing the image to be detected, and enhancing the gray level value with high possibility of ghost defects by the reconstructed gray level histogram, so that the subsequent detection of the ghost defects is facilitated.
S8: and carrying out threshold segmentation on the enhanced image, and carrying out ghost defect detection according to the image subjected to threshold segmentation.
The Ojin threshold segmentation method is considered as an optimal method for solving the image segmentation threshold because of the characteristics of simplicity and rapidness in calculation, high accuracy and good stability, and can maximize the difference between an object and a background of an image to the maximum extent when the optimal threshold is selected, so that a more accurate image processing result can be obtained.
Therefore, the enhancement image obtained in S7 is subjected to the division of the oxford threshold, and since the contrast between the gray value of the defect and other gray values is enhanced in the enhancement process, that is, the contrast between the ghost part and the normal part in the printed image is enhanced, in the binary image formed after the division of the oxford threshold, the gray value of the normal handwriting is 0 (black), the gray value of the ghost and the background gray value is 255 (white), and for the region with the gray value of 255 in the divided image, the difference value graph is obtained by using the corresponding region in the original image of the image to be detected and the difference value, wherein the region with the gray value of not 0 in the difference value is the ghost defect region, so that the detection of the ghost defect on the surface of the printed product is completed.
In the description of the present specification, the meaning of "a plurality", "a number" or "a plurality" is at least two, for example, two, three or more, etc., unless explicitly defined otherwise.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims (8)

1. An ink printing defect detection method based on image processing, characterized by comprising the following steps:
collecting an ink printing paper image;
graying the image to obtain a gray level image serving as an image to be detected, and constructing a binary image of each gray level value in the image to be detected;
taking each gray value as a target gray value, carrying out pixel point matching on the binary image of the target gray value and the binary images of other gray values to obtain other binary images which are most matched with the binary image of the target gray value, and counting the number of matched pixels;
carrying out connected domain analysis on the binary image of the target gray value;
obtaining the possibility that the target gray value is a defect gray value according to the number of the matched pixel points and the number of the connected domains;
dividing and compensating the gray level histogram of the image to be detected by utilizing the possibility that all gray level values are defect gray level values to obtain a reconstructed gray level histogram;
performing histogram equalization on the image to be detected through the reconstructed gray level histogram to obtain an enhanced image of the image to be detected;
and carrying out threshold segmentation on the enhanced image, and carrying out ghost defect detection according to the image subjected to threshold segmentation.
2. The image processing-based ink printing defect detection method according to claim 1, wherein the reconstructed gray-scale histogram obtaining method includes:
acquiring a gray level histogram of an image to be detected, wherein the abscissa of the gray level histogram is a gray level value, and the ordinate of the gray level histogram is the frequency of a pixel point corresponding to the gray level value;
presetting a unified initial segmentation threshold value of the gray level histogram; the initial segmentation threshold is the frequency number of the pixel points, and the frequency numbers of the pixel points corresponding to all gray values in the gray histogram are uniformly segmented based on the initial segmentation threshold;
calculating a specific frequency division threshold value of a pixel point corresponding to each gray value based on the initial division threshold value and the possibility that each gray value is a defect gray value;
based on the specific frequency division threshold value of the pixel point corresponding to each gray value, carrying out specific division on the frequency of the pixel point corresponding to each gray value;
calculating the compensation frequency required by the pixel point corresponding to each gray value according to the frequency of the pixel point corresponding to each gray value and the possibility that each gray value is a defect gray value;
and compensating the frequency of the pixel point corresponding to each gray value by using the compensation frequency to obtain a reconstructed gray histogram.
3. The method for detecting ink printing defects based on image processing according to claim 2, wherein the specific frequency division threshold value of the pixel point corresponding to each gray value is calculated by:
if the number of the pixel points corresponding to the gray value is smaller than the initial segmentation threshold, the specific frequency segmentation threshold corresponding to the gray value is the initial segmentation threshold;
otherwise, the specific frequency division threshold corresponding to the gray value is:
in the method, in the process of the invention,is gray value +.>Corresponding specific frequency division threshold, < >>For the initial segmentation threshold,/a>As a logarithmic function based on a natural constant e, < ->For presetting super parameter->Is gray value +.>Is the probability of a defective gray value.
4. The method for detecting ink printing defects based on image processing according to claim 3, wherein the target gray value is a probability of a defective gray value, and the method comprises the following steps:
in the method, in the process of the invention,is gray value +.>For the probability of defective gray values, +.>For gray values +.>The total number of corresponding pixels, < >>For +.>The number of matched pixels in the binary pattern most matched in the binary pattern, +.>Is gray value +.>The number of connected domains included in the binary image of (2).
5. The method for detecting ink printing defect based on image processing according to claim 3, wherein the compensation frequency required by the pixel point corresponding to each gray value is calculated by the following steps:
obtaining pixel points corresponding to all gray values in the gray histogram, and dividing the sum of frequency numbers divided by a specific frequency division threshold value
The required compensation frequency of the pixel point corresponding to each gray value is:
in the method, in the process of the invention,is gray value +.>Compensation frequency required by the corresponding pixel point, < ->For the minimum gray value in the image to be detected, is->For the maximum gray value in the image to be detected, < >>Is gray value +.>For the probability of defective gray values, +.>And the sum of the frequency numbers divided by the specific frequency division threshold is the pixel point corresponding to all the gray values in the gray histogram.
6. The method for detecting ink printing defect based on image processing according to claim 4, wherein the acquiring method includes:
taking a binary image of the target gray value as a reference;
placing the binary image of other gray values above the binary image of the target gray value, overlapping the two, and then carrying out translation in each direction;
counting the number of the pixel points overlapped with each other after each translation;
and taking the binary image of the other gray level with the largest number of overlapped pixel points as the other binary image which is most matched with the binary image of the target gray level.
7. The image processing-based ink printing defect detection method of claim 6, wherein constructing a binary image for each gray value in the image to be detected comprises:
selecting a blank image for each gray value;
in the blank image, the pixel points corresponding to the gray values become black, and the pixel points corresponding to other gray values become white, so that a binary image of the gray values is obtained.
8. The method for detecting ink printing defects based on image processing according to claim 1, wherein the threshold segmentation is performed on the enhanced image, and ghost defect detection is performed on the image after threshold segmentation, comprising:
performing Ojin threshold segmentation on the enhanced image to obtain a plurality of segmentation areas; the segmentation area comprises an image area with a gray level value of 0 and an image area with a gray level value of 255;
and carrying out difference between an image area with the gray value of 255 and a corresponding area in the image to be detected to obtain a difference image, and taking the area corresponding to the difference image in the image to be detected as a ghost defect area.
CN202410250845.XA 2024-03-06 2024-03-06 Printing ink printing defect detection method based on image processing Withdrawn CN117830318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410250845.XA CN117830318A (en) 2024-03-06 2024-03-06 Printing ink printing defect detection method based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410250845.XA CN117830318A (en) 2024-03-06 2024-03-06 Printing ink printing defect detection method based on image processing

Publications (1)

Publication Number Publication Date
CN117830318A true CN117830318A (en) 2024-04-05

Family

ID=90513771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410250845.XA Withdrawn CN117830318A (en) 2024-03-06 2024-03-06 Printing ink printing defect detection method based on image processing

Country Status (1)

Country Link
CN (1) CN117830318A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014025763A (en) * 2012-07-25 2014-02-06 Hitachi High-Technologies Corp Defect inspection method, and defect inspection device
CN115294033A (en) * 2022-07-19 2022-11-04 上海大学 Tire belt layer difference level and misalignment defect detection method based on semantic segmentation network
CN115908269A (en) * 2022-10-26 2023-04-04 中科慧远视觉技术(北京)有限公司 Visual defect detection method and device, storage medium and computer equipment
CN116109577A (en) * 2022-12-27 2023-05-12 无锡群欢包装材料有限公司 Printing label defect detection system and method
CN116452827A (en) * 2023-06-16 2023-07-18 青岛奥维特智能科技有限公司 Method and system for detecting quality of ink printing surface based on computer vision
CN117078712A (en) * 2023-03-20 2023-11-17 济南大学 Tire side cord threshold segmentation method and device based on local self-adaptive window

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014025763A (en) * 2012-07-25 2014-02-06 Hitachi High-Technologies Corp Defect inspection method, and defect inspection device
CN115294033A (en) * 2022-07-19 2022-11-04 上海大学 Tire belt layer difference level and misalignment defect detection method based on semantic segmentation network
CN115908269A (en) * 2022-10-26 2023-04-04 中科慧远视觉技术(北京)有限公司 Visual defect detection method and device, storage medium and computer equipment
CN116109577A (en) * 2022-12-27 2023-05-12 无锡群欢包装材料有限公司 Printing label defect detection system and method
CN117078712A (en) * 2023-03-20 2023-11-17 济南大学 Tire side cord threshold segmentation method and device based on local self-adaptive window
CN116452827A (en) * 2023-06-16 2023-07-18 青岛奥维特智能科技有限公司 Method and system for detecting quality of ink printing surface based on computer vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李果;: "印刷外观缺陷的分析及自动检测控制", 印刷质量与标准化, no. 04, 15 April 2011 (2011-04-15) *
温银堂;高亭亭;张玉燕;: "3D打印复杂点阵结构的缺陷三维可视化方法", 计量学报, no. 09, 17 September 2020 (2020-09-17) *

Similar Documents

Publication Publication Date Title
CN115082482B (en) Metal surface defect detection method
CN108961217B (en) Surface defect detection method based on regular training
CN116843678B (en) Hard carbon electrode production quality detection method
CN110020692B (en) Handwriting separation and positioning method based on print template
CN112017157B (en) Method for identifying damage point in optical element laser damage threshold test
CN115184380B (en) Method for detecting abnormity of welding spots of printed circuit board based on machine vision
CN107993225B (en) Defect identification method for magneto-optical eddy current imaging detection
CN108961307B (en) Circular target scale self-adaptive tracking method based on nuclear correlation filtering tracking
CN108764119A (en) SAR image change detection based on iteration maximum between-cluster variance
CN110245600B (en) Unmanned aerial vehicle road detection method for self-adaptive initial quick stroke width
CN107341824B (en) Comprehensive evaluation index generation method for image registration
CN1702684A (en) Strong noise image characteristic points automatic extraction method
CN111354047B (en) Computer vision-based camera module positioning method and system
CN116523923B (en) Battery case defect identification method
CN111738256A (en) Composite material CT image segmentation method based on improved watershed algorithm
CN111429372A (en) Method for enhancing edge detection effect of low-contrast image
CN114926407A (en) Steel surface defect detection system based on deep learning
CN114266764A (en) Character integrity detection method and device for printed label
CN116740072A (en) Road surface defect detection method and system based on machine vision
CN112734729A (en) Water gauge water level line image detection method and device suitable for night light supplement condition and storage medium
TW201512649A (en) Method of chip detects inspecting, system therefor, and computer program product thereof
CN114155226A (en) Micro defect edge calculation method
CN109858484A (en) A kind of multi-class transformation VLP correction algorithm based on deflection evaluation
Wang et al. Fast Blur Detection Algorithm for UAV Crack Image Sets
CN116883987A (en) Pointer instrument reading identification method for unmanned inspection of transformer substation

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20240405