Printing quality detection method based on machine vision
By preprocessing and feature recognition of printed images, the problem of printing quality detection in the prior art being susceptible to the environment is solved, and higher recognition accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510553320.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The prior art is susceptible to external environment in printing quality inspection, resulting in low recognition accuracy and low recognition efficiency.
The printing quality detection method based on machine vision is adopted to reduce image offset caused by light and printer vibration by preprocessing and correcting the printed image; then, a variety of feature recognition methods are used, including calculating the pre-vector, clarity threshold, boundary value and multi-scale fusion value, to improve the recognition accuracy of image texture features.
It effectively reduces the impact of the external environment on printing quality inspection, improves recognition accuracy and efficiency, and can accurately identify the clarity and missing location of the image.
Smart Images

Figure CN120088245A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of printing detection, and in particular to a printing quality detection method based on machine vision. Background Art
[0002] Printing quality detection is a process of quantitatively evaluating the color accuracy, text clarity, layout integrity and defects (such as ink dots, scratches, overprint deviation) of printed matter through optical instruments, image processing or artificial intelligence algorithms; The most common detection method is manual detection by staff. However, this method relies on the long-term work of manpower, and detection deviation is likely to occur due to visual fatigue of the human eye. Existing technologies mostly rely on image analysis algorithms, such as pixel-based template matching, edge detection or deep learning models. At present, the detection method of machine vision is relatively common, but during the detection process, texture recognition is affected by the environment, including factors such as light in the environment and vibration of the printing press itself, resulting in low recognition accuracy. In addition, the commonly used machine vision algorithms rely on a large amount of image data support, and the efficiency is low in real-time detection. Summary of the Invention
[0003] Aiming at the deficiencies of the existing technology, the present invention provides a printing quality detection method based on machine vision, which solves the technical problems that the existing technology is easily affected by the external environment with low recognition accuracy and low recognition efficiency, and achieves the purpose of reducing the environmental impact and improving the recognition accuracy and recognition efficiency.
[0004] To solve the above technical problems, the present invention provides the following technical solution: A printing quality detection method based on machine vision, the method includes the following steps: S1. Collect the original image of the printed image, and preprocess the original image to obtain a preprocessed image; S2. Calculate a first eigenvalue and a second eigenvalue , and obtain a preposed vector and a second eigenvalue based on the first eigenvalue ; S3. Calculate a clarity threshold for distinguishing the clarity degree of the preprocessed image, and obtain a set of images to be detected based on the clarity threshold ; S4. Calculate the binary value of any image to be detected in the set of images to be detected to obtain a binary image, and obtain a printing boundary based on the boundary value of the binary image; S5. Calculate a first detection threshold and the second detection threshold , and based on the first detection threshold and the second detection threshold screen out the missing printing positions; S6. Obtain the quality pass value for generating the quality detection result through the empirical method , and send the quality detection result to the display module.
[0005] Preferably, in S1, the specific implementation steps are as follows: S11. Convert the original image to the RGB space to obtain the RGB values of the pixel points in the original image, and calculate the grayscale value of the original image ; S12. Calculate the grayscale difference according to the grayscale value ; S13. Integrate the grayscale differences into a sharpness image , calculate the median filter value of the sharpness image ; S14. In the median filter image formed by the median filter values , randomly select two pixel points and and calculate the correction angle ; S15. Perform angle correction on the median filter image according to the correction angle , and obtain the preprocessed image after correction.
[0006] Preferably, in S2, the specific implementation steps are as follows: S21. Obtain the pixel value of any pixel point in the range image as the center point, and obtain the neighborhood pixel points within the center point radius , and calculate the reference value for obtaining the binary result , and the calculation formula is: ; wherein, represents the sign function, represents the grayscale value of the center point, represents the grayscale value of the neighborhood pixel point; S22. Change the center point radius to , repeat S21 to obtain multiple reference values , and calculate the first eigenvalue according to the multiple reference values , and the calculation formula is: ; Among them, represents the circular right shift of the binary result of the reference value by times; S23. Obtain the gray level of the preprocessed image through the gray quantization method and , and calculate the processing value and based on the gray level . The calculation formula is: ; Among them, represents the pixel value of the pixel point in the preprocessed image, and respectively represent the offset of the pixel point at different angles, and represent the length and width of the preprocessed image; S24. Calculate the comparison value , entropy value , and relationship value of the preprocessed image respectively according to the processing value . The calculation formula is: ; ; ; Among them, represents quantity, represents the average value of the processing value , and respectively represent and standard deviation; S25. Obtain the second eigenvalue , entropy value , and relationship value of the preprocessed image through the weighted method ; S26. Combine the first eigenvalue and the second eigenvalue into the pre - vector of the preprocessed image.
[0007] Preferably, in S3, the specific implementation steps are as follows: S31. Divide the preprocessed image into image blocks equally, and obtain the DCT coefficients of each image block through the discrete cosine transform method, and based on the DCT coefficients Identify high frequency areas ; S32, according to DCT coefficient Calculate the pre-vector of the image block Frequency energy value , the calculation formula is: ; in, Represents DCT coefficients the number of S33, through the random generator in Get a random number L between the two, and calculate the non-zero minimum value based on the random number L ; S34, based on non-zero minimum and the prepend vector Calculate spatial contrast , the calculation formula is: ; in, Indicated in Preceding vector in direction The gradient of Indicated in Preceding vector in direction The gradient of express and The number of groups; S35, according to the frequency energy value and spatial contrast Calculate multi-scale fusion value , the calculation formula is:
[0008] in, and represents the optimization coefficient, and ; S36, calculating a clarity threshold for distinguishing the clarity of the pre-processed image , the calculation formula is: ; in, and Represents the pre-vector exist Direction and The mean gradient of the direction, Represents the pre-vector The mean of S37, according to the clear threshold Classify the clarity of the preprocessed images; If , the preprocessed image is marked as a clear image, where represents the average value of the front vector ; If , the preprocessed image is marked as a defective image; S38. The defective images are assembled into a set of images to be detected.
[0009] Preferably, in S4, the specific implementation steps are as follows: S41. Arbitrarily select a defective image to be detected from the set of images to be detected , and define the pixel coordinates of the image to be detected as ; S42. Define a circular processing element with a radius of on the image to be detected , where and ; S43. Calculate the binary value according to the image to be detected , and the calculation formula is: ; where represents the th binary value, represents the erosion operation, represents the dilation operation; S44. Generate a binary image according to the binary value . Arbitrarily select a boundary pixel point on the binary image, and calculate the boundary value of the boundary pixel point ; S45. Obtain the printing boundary of the binary image according to the boundary value .
[0010] Preferably, the calculation formula of the boundary value is: ; where represents the standard deviation of the Gaussian kernel obtained based on the Gaussian function.
[0011] Preferably, in S5, the specific implementation steps are as follows: S51. Select the pixel point in the upper left corner of the binary image as the origin, establish a global coordinate system and obtain the number of the upper limit pixel points on the printing boundary ; S52. Obtain multiple boundary pixel points on the printing boundary , and calculate the centroid coordinates of the printing boundary ; S53. Calculate the centroid distance according to the centroid coordinates ; ; S54. Calculate the centroid value for measuring the average situation of the centroid distance according to the centroid distance ; ; ; S55. Calculate the standard deviation value for evaluating the fluctuation situation of the centroid distance ; , and the calculation formula is: ; wherein, represents the th standard deviation value; S56. Calculate the adjacent point mean value according to the centroid distance ; , and the calculation formula is: ; wherein, represents the centroid distance of the pixel points adjacent to the centroid coordinates ; S57. Calculate the first detection threshold and the second detection threshold for identifying the printing missing position respectively; S58. Identify the printing missing position in the binary image according to the first detection threshold and the second detection threshold ; If and , then mark the boundary pixel points at the corresponding position as the printing missing position; Otherwise, do not mark; S59. Set the marked printing missing positions as the printing missing set.
[0012] Preferably, the calculation formulas of the first detection threshold and the second detection threshold are respectively: ; ; wherein, and respectively represent the maximum value and the minimum value of the standard deviation value , and respectively represent the mean of adjacent points the maximum value and the minimum value.
[0013] Preferably, in S6, the specific implementation steps are as follows: S61. Count the number of printing missing positions in the printing missing set by the counting method ; S62. Set the quality qualified value by the empirical method , and screen out the binary images that meet the requirements according to the quality qualified value ; if If , it indicates that the binary image is a qualified image; If , it indicates that the binary image is an unqualified image; S63. Generate a quality inspection result according to the screening result of the quality qualified value , and send the quality inspection result to the display module.
[0014] By means of the above technical solutions, the present invention provides a printing quality inspection method based on machine vision, which has at least the following beneficial effects: 1. Through the preprocessing of the image and the detailed recognition of the texture in the image, the present invention can preprocess and correct the image, correct the image offset caused by light and the vibration of the printing press, and then perform various feature recognitions on the preprocessed image, so that the fusion of various features of the image texture can not only reduce the influence of the external environment on the image, improve the accuracy of image recognition, but also improve the recognition accuracy of the image texture features and improve the recognition efficiency.
[0015] 2. By equally dividing the preprocessed image and recognizing the image according to the frequency energy value and the spare contrast of the image, and using the method of gradient calculation for multi-scale fusion, the present invention can accurately recognize the clarity of the image, and then complete the preliminary screening of the image, which is simpler and more efficient than the prior art and has high accuracy in recognizing the clarity.
[0016] 3. In the present invention, by first convolving the image with a Gaussian kernel to suppress high-frequency noise, and then applying the second derivative to the smoothed image to accurately locate the edge, it can not only reduce the influence of high-frequency noise, but also accurately locate the edge of the image, improve the accuracy of image analysis, and the operation steps are simple and efficient, improving the processing efficiency.
[0017] 4. The present invention identifies defects by establishing a two-dimensional coordinate system and combining the morphological characteristics of the image contour. This not only improves the robustness of the algorithm but also avoids the training of a large amount of data. By utilizing the particularity of the contour, it can efficiently identify the missing parts, making it both highly robust and more accurate and efficient than the acquisition of traditional regional thresholds. Moreover, the calculation is simplified, significantly improving the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings: Figure 1 It is a flowchart of a printing quality detection method based on machine vision according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Thus, the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0020] Due to the technical problems that the prior art is easily affected by the external environment, resulting in low recognition accuracy and low recognition efficiency, this embodiment provides a printing quality detection method based on machine vision, which can reduce the environmental impact and improve the recognition accuracy and recognition efficiency. As Figure 1 shown, the method includes the following steps: S1. Collect the original image of the printed image and preprocess the original image to obtain a preprocessed image; due to the external environmental light and the vibration of the printing machine itself, it is easy to cause image deviation with certain noise. To solve this problem, the specific steps are as follows: S11. Convert the original image to the RGB space to obtain the RGB values of the pixel points in the original image, and calculate the grayscale value of the original image according to the RGB values , and the calculation formula is: ; Wherein, , and respectively represent the RGB values of the original image; S12. Calculate the grayscale difference according to the grayscale value , and the calculation formula is: ; Wherein, represents the grayscale values at different positions in the original image, and respectively represent the number of direction pixels and the number of direction pixels; S13. Integrate the grayscale difference into a sharpness image , and calculate the median filter value of the sharpness image . The calculation formula is: ; wherein, represents the median of the grayscale values of the central pixel; S14. Arbitrarily select two pixel points in the median filter image formed by the median filter value and , and calculate the correction angle . The calculation formula is: ; wherein, represents the th correction angle; S15. Perform angle correction on the median filter image according to the correction angle , and obtain the preprocessed image after correction. Through the preprocessing of the image and the detailed recognition of the texture in the image, the image can be preprocessed and corrected, the image offset caused by light and the vibration of the printing press can be corrected, and then various feature recognitions can be performed on the preprocessed image, so that the fusion of various features of the image texture can not only reduce the influence of the external environment on the image, improve the accuracy of image recognition, but also improve the accuracy of the recognition of the image texture features, and improve the recognition efficiency.
[0021] S2. Calculate the first eigenvalue and the second eigenvalue according to the preprocessed image, and obtain the preposed vector based on the first eigenvalue and the second eigenvalue ; After obtaining the preprocessed image, in order to accurately recognize the texture features and avoid inaccurate recognition, the specific steps are as follows: S21. Obtain the pixel value of any pixel point in the range image as the center point, and obtain the neighborhood pixel points within the center point radius , and calculate the reference value for obtaining the binary result. The calculation formula is: ; ; wherein, denotes the sign function, denotes the grayscale value of the center point, denotes the grayscale values of the neighborhood pixel points; see value can transform the image into a binary form, which is achieved through the sign function and is different from the pixel values of a binary image, and is only used for clarity recognition in this step.
[0022] S22. Change the radius of the center point to and repeat S21 to obtain multiple see values According to the multiple see values calculate the first eigenvalue The calculation formula is: ; wherein, denotes the binary result of the see value is circularly shifted to the right by times; According to the sequence of 0 and 1 of the stroke, translation and circulation are performed to generate the eigenvalue of a numerical sequence.
[0023] S23. Obtain the gray level of the preprocessed image through the gray quantization method and According to the gray level and calculate the processing value The calculation formula is: ; wherein, denotes the pixel value of the pixel point in the preprocessed image, and respectively denote the offsets of the pixel point at different angles (for example: in the actual correction process, the angle offset is very small, generally between 0.12 and 3.61, such as 1.16), and denote the length and width of the preprocessed image; The gray quantization method is a method that quantizes the gray level of an image and can obtain the number of gray levels, which is a commonly used method for obtaining gray levels and will not be elaborated here.
[0024] S24. Calculate the comparison value of the preprocessed image, the entropy value and the relationship value respectively according to the processing valueThe calculation formula is: ; ; ; wherein, denotes The quantity of represents the processed value the average value of and respectively represent and the standard deviation of S25. The comparison value , the entropy value and the relationship value are used to obtain the second eigenvalue through the weighted method; the weighted method is a commonly used data processing method by weighted summation of each value, which will not be elaborated here.
[0025] S26. The first eigenvalue and the second eigenvalue are combined into the pre - vector of the pre - processed image. In this step, the first eigenvalue and the second eigenvalue are used to complete the recognition of texture features. In actual operation, the recognition of texture is completed through multiple features of the texture. In this solution, only two eigenvalues are taken as examples for illustration. Through the pre - processing of the image and the detailed recognition of the texture in the image, the image can be pre - processed and corrected, the image offset caused by light and the vibration of the printing press can be corrected, and then multiple feature recognitions are performed on the pre - processed image, enabling the fusion of multiple features of the image texture. This can not only reduce the influence of the external environment on the image, improve the accuracy of image recognition, but also improve the accuracy of the recognition of image texture features and the recognition efficiency.
[0026] S3. Calculate the clarity threshold for distinguishing the clarity of the pre - processed image according to the equally divided pre - processed image, and obtain the image set to be detected based on the clarity threshold . After initially obtaining the pre - processed image with the pre - vector S31. Divide the pre - processed image into image blocks equally, and obtain the DCT coefficients of each image block through the discrete cosine transform method, and determine the high - frequency region based on the DCT coefficients
[0027] S32. Calculate the frequency energy value of the pre - vector of the image block according to the DCT coefficients , the calculation formula is: ; Among them, represents the number of DCT coefficients ; the frequency energy value can be understood as the energy value in a certain frequency domain.
[0028] S33. Obtain a random number L between through a random generator, and calculate the non-zero minimum value The calculation formula is: ; Among them, represents the non-zero minimum value randomly generated according to the random number L; S34. Calculate the spatial domain contrast according to the non-zero minimum value and the pre-vector , the calculation formula is: ; Among them, represents the gradient of the pre-vector in the direction, represents the gradient of the pre-vector in the direction, represents and the number of groups; S35. Calculate the multi-scale fusion value according to the frequency energy value and the spatial domain contrast , the calculation formula is: ; Among them, and represent the optimization coefficients, and ; S36. Calculate the clarity threshold used to distinguish the clarity of the preprocessed image, ; Among them, and respectively represent the average gradient of the pre-vector in the direction and direction, represents the average value of the pre-vector ; S37. According to the clarity threshold Classify the clarity of the preprocessed image; If , then mark the preprocessed image as a clear image, where represents the average value of the leading vector ; If , then mark the preprocessed image as a defective image; S38. Assemble the defective images into a set of images to be detected. By equally dividing the preprocessed images and identifying the images based on the frequency energy value and spatial domain contrast of the images, and then using the method of gradient calculation for multi-scale fusion, the clarity of the images can be accurately identified, and thus the preliminary screening of the images can be completed, which is simpler and more efficient than the prior art and has a high accuracy in clarity identification.
[0029] S4. Calculate the binary value of any image to be detected in the set of images to be detected to obtain a binary image, and calculate the boundary value of the binary image to obtain the printing boundary; after identifying the clarity of the preprocessed image, clear images and defective images can be obtained. For defective images, further detection is required. To solve this problem, the specific steps are as follows: S41. Arbitrarily select a defective image to be detected in the set of images to be detected, and define the pixel coordinates of the image to be detected as ; S42. Define a circular processing element with a radius of on the image to be detected , where the radius and ; S43. Calculate the binary value according to the image to be detected , and the calculation formula is: ; where represents the th binary value, represents the erosion operation, represents the dilation operation; S44. Generate a binary image according to the binary value . Arbitrarily select a boundary pixel point on the binary image, and calculate the boundary value of the boundary pixel point , and the calculation formula is: ; Among them, represents the standard deviation of the Gaussian kernel obtained based on the Gaussian function; S45. According to the boundary value obtain the printing boundary of the binary image. In this step, first convolve the image with a Gaussian kernel to suppress high-frequency noise, and then apply the second derivative to the smoothed image to accurately locate the edges. This can not only reduce the influence of high-frequency noise but also accurately locate the edges of the image, improving the accuracy of image analysis. Moreover, the operation steps are simple and efficient, enhancing the processing efficiency.
[0030] S5. Calculate the first detection threshold and the second detection threshold , and based on the first detection threshold and the second detection threshold screen out the printing missing positions; after performing boundary processing and recognition on the image, further detection of defects is also required. To solve this problem, the specific steps are as follows: S51. Select the pixel point in the upper left corner of the binary image as the origin, establish a global coordinate system, and obtain the number of the upper limit pixel points on the printing boundary ; S52. Obtain multiple limit pixel points on the printing boundary, calculate the centroid coordinates of the printing boundary, and the calculation formula is: ; ;
[0031] Among them, represents the abscissa value of the th limit pixel point, represents the ordinate value of the th limit pixel point, represents the number of limit pixel points ; S53. Calculate the centroid distance according to the centroid coordinates , and the calculation formula is: ; Among them, represents the th centroid distance; S54. Calculate the centroid mean used to measure the average situation of the centroid distance , and the calculation formula is: ; Among them, Denote the th centroid mean; S55. Calculate the standard deviation value used to evaluate the fluctuation of the centroid distance , and the calculation formula is: ; Among them, Denote the th standard deviation value; S56. Calculate the adjacent point mean according to the centroid distance , and the calculation formula is: ; Among them, Denote the centroid distance of the pixel point adjacent to the centroid coordinate . When processing the same binary image, the same printing boundary is used. Therefore, the in S52 - S56 all denote the number of boundary pixel points on the same printing boundary to be processed; S57. Calculate the first detection threshold and the second detection threshold respectively for identifying the printing missing position, and the calculation formula is: ; ; Among them, and respectively denote the maximum value and the minimum value of the standard deviation , and respectively denote the maximum value and the minimum value of the adjacent point mean ; S58. Identify the printing missing position in the binary image according to the first detection threshold and the second detection threshold ; If and , then mark the boundary pixel point at the corresponding position as the printing missing position; Otherwise, do not mark; S59. Aggregate the marked printing missing positions into a printing missing set, and perform defect recognition by establishing a two - dimensional coordinate system and combining the morphological characteristics of the image contour. This can not only improve the robustness of the algorithm, but also avoid a large amount of data training. By using the particularity of the contour to efficiently identify the missing part, it can not only have high robustness, but also be more accurate and efficient than the traditional regional threshold, and the calculation is simplified, greatly improving the calculation efficiency.
[0032] S6. Obtain a quality pass value for screening the binary images in the printing defect set based on the empirical method , and generate a quality inspection result, and send the quality inspection result to the display module; after obtaining the recognized printing defect set, it is also necessary to find qualified images with fewer defects and unqualified images with more defects in the printing defect set. To solve this problem, the specific steps are as follows: S61. Count the number of printing defect positions in the printing defect set by the counting method ; The counting method is a commonly used method for counting quantities and will not be elaborated here.
[0033] S62. Set the quality pass value by the empirical method , and screen out the binary images that meet the requirements according to the quality pass value ; The empirical method is a method for obtaining thresholds by setting a certain qualified range through years of practical experience and will not be elaborated here.
[0034] If , it indicates that the binary image is a qualified image; If , it indicates that the binary image is an unqualified image; S63. Generate a quality inspection result according to the screening result of the quality pass value , and send the quality inspection result to the display module. In practical applications, the number of printing defect positions will be specified, and a small number of printing defect positions are allowed. Therefore, a larger number of printing defect positions are unqualified images. The display module is generally the display of an instrument for detecting the printing quality of a printing press, which can mark and display the unqualified images and specific printing defect positions to improve the processing speed of the staff for unqualified printed products and enhance work efficiency.
[0035] Those of ordinary skill in the art can understand that all or part of the steps in implementing the method of the above embodiments can be completed by instructing relevant hardware through a program. Therefore, this application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0036] The above embodiments have introduced the present invention in detail. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present invention.
Claims
1. A printing quality detection method based on machine vision, characterized in that: The method comprises the following steps: S1, collecting an original image of a printed image, and preprocessing the original image to obtain a preprocessed image; S2. Calculate the first eigenvalue based on the preprocessed image and the second eigenvalue , based on the first eigenvalue and the second eigenvalue Get the pre-vector ; S3. Calculate the clarity threshold used to distinguish the clarity of the pre-processed image , and based on the clarity threshold Obtain a set of images to be detected; S4. Calculate any image to be detected in the set of images to be detected The two-phase value Get the binary image, and based on the boundary value of the binary image Get the printing border; S5. Calculate the first detection threshold of the printing boundary and the second detection threshold , and based on the first detection threshold and the second detection threshold Filter out the missing printing positions; S6. Obtain the quality acceptance value used to generate quality inspection results through empirical methods and send the quality inspection results to the display module.
2. The printing quality detection method based on machine vision according to claim 1, characterized in that: In S1, the specific implementation steps are as follows: S11, convert the original image into RGB space to obtain the RGB value of the pixel in the original image, and calculate the gray value of the original image based on the RGB value ; S12, according to the gray value Calculate grayscale difference ; S13, grayscale difference Integrated into a clear image , calculate the clarity image The filter value ; S14, filter value in the middle In the filter image formed, any two pixels are selected and And calculate the correction angle ; S15, according to the correction angle The angle of the filtered image is corrected to obtain a corrected preprocessed image.
3. The printing quality detection method based on machine vision according to claim 1, characterized in that: In S2, the specific implementation steps are as follows: S21. Obtain the pixel value of any pixel in the range image As the center point, and get the center point radius within neighborhood pixels, calculate the reference value used to obtain the binary result ; S22, change the center point radius to , repeat S21 to obtain multiple reference values , based on multiple reference values Calculate the first eigenvalue ; S23, obtaining the gray level of the preprocessed image by gray quantization method and , according to the gray level and Calculate the processing value ; S24, according to the processing value Calculate the comparison value of the preprocessed image separately , Entropy and relationship value ; S25, compare the value , Entropy and relationship value The second eigenvalue is obtained by weighting method ; S26, the first eigenvalue and the second eigenvalue Combined into the pre-processed image vector .
4. The printing quality detection method based on machine vision according to claim 1, characterized in that: In S3, the specific implementation steps are as follows: S31, divide the preprocessed image into The DCT coefficients of each image block are obtained by discrete cosine transform method. , and based on the DCT coefficients Identify high frequency areas ; S32, according to DCT coefficient Calculate the pre-vector of the image block Frequency energy value ; S33, through the random generator in Get a random number L between the two, and calculate the non-zero minimum value based on the random number L ; S34, based on non-zero minimum and the prepend vector Calculate spatial contrast ; S35, according to the frequency energy value and spatial contrast Calculate multi-scale fusion value ; S36, calculating a clarity threshold for distinguishing the clarity of the pre-processed image ; S37, according to the clear threshold Classify the clarity of the preprocessed images; like , then the preprocessed image is marked as a clear image, where Represents the pre-vector The average value of like , then the preprocessed image is marked as a defective image; S38, grouping the defect images into a set of images to be detected.
5. The printing quality inspection method based on machine vision according to claim 1, characterized in that: In S4, the specific implementation steps are as follows: S41, randomly select an image to be detected with defects from the set of images to be detected , define the image to be detected The pixel coordinates are ; S42, in the image to be detected Define a radius of Circular processing element ,in, and ; S43, according to the image to be detected Calculate two-phase values ; S44, according to the two-phase value Generate a binary image and select any boundary pixel point on the binary image , calculate the boundary pixels The boundary value of ; S45, according to the boundary value Get the printed border of the binary image.
6. The printing quality inspection method based on machine vision according to claim 5 is characterized in that: The boundary value The calculation formula is: ; in, Represents the standard deviation of the Gaussian kernel obtained based on the Gaussian function.
7. The printing quality inspection method based on machine vision according to claim 1, characterized in that: In S5, the specific implementation steps are as follows: S51, select the pixel point in the upper left corner of the binary image as the origin, establish a global coordinate system and obtain the upper limit pixel point of the printing boundary Number of ; S52, obtaining multiple boundary pixel points on the printing boundary , calculate the center coordinates of the printed boundary ; S53, according to the homocentric coordinates Calculate the mean distance ; S54, according to the centroid Calculation used to measure the mean distance Mean value of the average case ; S55, calculation for evaluating the mean distance Standard deviation value of fluctuation ; S56, according to the center distance Calculate the mean of neighboring points ; S57, respectively calculating the first detection threshold for identifying the printing missing position and the second detection threshold ; S58: According to the first detection threshold and the second detection threshold Identify the missing printing position in the binary image; like and , then the boundary pixel point at the corresponding position Marking indicates where printing is missing; Otherwise, no marking is performed; S59, grouping the marked printing missing positions into a printing missing set.
8. The printing quality inspection method based on machine vision according to claim 7, characterized in that: The first detection threshold and the second detection threshold The calculation formulas are: ; ; in, and Respectively represent the standard deviation The maximum and minimum values of and Represents the mean of neighboring points The maximum and minimum values of .
9. The printing quality inspection method based on machine vision according to claim 1, characterized in that: In S6, the specific implementation steps are as follows: S61, counting the number of missing print positions in the missing print set by a counting method ; S62. Set quality acceptance value by empirical method , according to the quality acceptance value Filter out binary images that meet the requirements; like , then the binary image is a qualified image; like , it means that the binary image is an unqualified image; S63, according to the quality acceptance value The screening results generate quality inspection results and send the quality inspection results to the display module.
Citation Information
Patent Citations
Method for detecting quality of printed matter
CN105844621A
Product packaging surface defect detection and classification method based on machine vision
CN106204618A
Defect detection method and system for battery surface identification based on machine vision
CN108710876A
Printed matter defect detection method for fuzzy imaging environment
CN113409254A
Printing defect detection method based on machine vision
CN117705815A
Cited By
Vehicle air window defrosting and demisting system detection method
CN120726115A