A printing quality evaluation method based on machine vision
Through the printing quality evaluation method based on machine vision, the RGB area calculation indicators are used for comprehensive evaluation, which solves the problems of strong subjectivity and high inconsistency in the existing technology, and achieves rapid and accurate printing quality evaluation.
Patent Information
- Application Number
- CN202411499498.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In the prior art, printing quality assessment has problems such as strong subjectivity, high inconsistency and lack of overall quality assessment.
Using a printing quality evaluation method based on machine vision, the image of the printed material is obtained, divided into RGB areas, and the size index, position index, color difference index and grayscale variance are calculated to comprehensively evaluate the quality of the printed material.
It realizes a fast and accurate quality evaluation of print products, reduces the subjectivity and cost of manual inspection, improves the accuracy and comparability of evaluation, and can fully reflect the overall quality of print products.
Smart Images

Figure CN119444699B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of printing quality evaluation, and particularly relates to a printing quality evaluation method based on machine vision. Background Art
[0002] During the printing process, printing quality evaluation is a crucial link to ensure that the final product meets the expected standards and customer requirements; the content of quality evaluation generally includes color reproduction, clarity, pattern position, etc.
[0003] Machine vision is a process in artificial intelligence that uses computer technology to extract information from images, process and understand it, in order to achieve automated decision-making and control; it performs measurement and judgment tasks by simulating the visual function of humans and plays an important role in multiple fields.
[0004] In the prior art, the manual-based evaluation method often relies on personal visual perception and aesthetic standards, with strong subjectivity. This subjectivity leads to inconsistencies in evaluation results, making it difficult to quantify and standardize printing quality, and the labor cost is relatively high; in addition, printing quality is affected by multiple factors, while the existing detection methods often only focus on the quality of a certain aspect of the printed matter, such as color or image clarity, lacking a comprehensive evaluation of the overall quality of the printed matter. Summary of the Invention
[0005] The purpose of the present invention is to provide a printing quality evaluation method based on machine vision to solve the above technical problems.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A printing quality evaluation method based on machine vision includes the following steps:
[0008] Step S1: Obtain a sample image of a printed matter sample, divide the sample image into several pixels, and establish a rectangular coordinate system on the sample image, then each pixel corresponds to a coordinate within the rectangular coordinate system; obtain the RGB values of each pixel, and obtain a closed area composed of several pixels with the same RGB value, and record each closed area as an RGB area;
[0009] Obtain the outermost pixels of the RGB area and their corresponding coordinates to obtain the edge curve of the RGB area, denoted as the sample edge curve, and select m reference points on the sample edge curve; and obtain the center point coordinates of each RGB area, denoted as the sample center coordinate P0;
[0010] Step S2: Obtain a captured image of the current printed matter, obtain all RGB areas within the captured image, and obtain the RGB values, edge curves and center point coordinates of each RGB area;
[0011] Based on the sample edge curve, the sample center coordinates, and each RGB region in the captured image, obtain the size index of the captured image and the position index , where D(P0 i , P i ) represents the Euclidean distance between P0 i and P i , P0 i is the sample center coordinate of the i-th RGB region, P i is the center point coordinate of the i-th RGB region in the captured image, n is the total number of RGB regions, F´ i (x) is the derivative value of the edge curve F(x) of the i-th RGB region in the captured image at the x-th reference point, f´ i (x) is the derivative value of the i-th sample edge curve at the x-th reference point, F i (x) is the coordinate corresponding to the x-th reference point on the edge curve F(x) of the i-th RGB region in the captured image, f i (x) is the coordinate corresponding to the x-th reference point on the i-th sample edge curve F(x);
[0012] Obtain the RGB value of the i-th RGB region in the captured image, denoted as R i , and obtain the RGB value of the i-th RGB region in the sample image, denoted as R0 i , then obtain the color difference index of the image ;
[0013] Step S3: Obtain the gray variance H of the captured image, and set the standard size index QI side ´, the standard position index QI por ´, the standard color difference index QI color ´, and the standard gray variance index H´, then obtain the quality index of the current printed matter ; According to the quality index, evaluate the quality of the printed matter.
[0014] As a further solution of the present invention: The process of dividing the sample image into several pixels is based on rasterization processing.
[0015] As a further solution of the present invention: The process of selecting the reference points includes: setting an interval threshold, and equally spacing and selecting m reference points on the sample edge curve according to the interval threshold.
[0016] As a further solution of the present invention: The process of obtaining the Euclidean distance includes: Denote the sample center coordinate as P0 i =(x0 i, y0 i ), at the corresponding center coordinate P in the captured image i =(x i , y i ), then the Euclidean distance .
[0017] As a further aspect of the present invention: The process of obtaining the gray variance includes:
[0018] Obtain the average value of the RGB values of each pixel in the captured image and denote it as RGB ave , then the gray variance of the captured image is obtained , where RGB k represents the k-th pixel, and N is the total number of pixels in the captured image.
[0019] As a further aspect of the present invention: The setting process of the standard size index, standard position index, standard color difference index, and standard gray variance index includes:
[0020] Obtain historical data, the historical data includes the size index, position index, color difference index, and gray variance index of historical qualified printed products; obtain the mean value of the size index in the historical data and denote it as the standard size index, obtain the mean value of the position index in the historical data and denote it as the standard position index, obtain the mean value of the color difference index in the historical data and denote it as the standard color difference index, obtain the mean value of the gray variance index in the historical data and denote it as the standard gray variance index.
[0021] As a further aspect of the present invention: When QI por =0, directly record QI por ´ / QI por =QI por ´; when QI side =0, directly record QI side ´ / QI side =QI side ´; when QI color =0, directly record QI color ´ / QI color =QI color ´.
[0022] As a further aspect of the present invention: The process of quality assessment of the printed product includes:
[0023] Set a quality index threshold, denoted as μ; if QI≥μ, the quality of the current printed product is qualified; otherwise, the quality of the current printed product is unqualified.
[0024] Advantages of the present invention:
[0025] Compared with the prior art, the present invention automatically acquires and processes captured images. This method can quickly and accurately evaluate the quality of printed products, avoiding the subjectivity and inefficiency of traditional manual inspection. By calculating the RGB values and gray variance, defects and differences in printed products can be accurately located and identified, improving the accuracy of evaluation. The present invention not only considers the size and position deviation of printed products (calculated through edge curves and center point coordinates), but also combines the color difference index and gray variance for comprehensive evaluation. This multi-dimensional evaluation method can comprehensively reflect the overall quality of printed products, helping to discover potential problems and make improvements. This multi-dimensional evaluation method of the present invention can comprehensively reflect the overall quality of printed products, helping to discover potential problems and make improvements. The standardized evaluation process makes the results more comparable and repeatable, facilitating long-term monitoring and quality management. In the present invention, the automated machine vision evaluation method can significantly reduce the time and cost of manual inspection and improve the efficiency of the production line. Timely discovery and correction of quality problems can reduce the scrap rate, lower production costs, and improve the economic benefits of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention will be further described below with reference to the accompanying drawings.
[0027] Figure 1 It is a schematic flow chart of the printing quality evaluation method based on machine vision of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] Please refer to Figure 1 As shown, the present invention is a printing quality evaluation method based on machine vision, including the following steps:
[0030] Step S1: Obtain a sample image of a printed product sample, divide the sample image into several pixels, and establish a rectangular coordinate system on the sample image. Then, each pixel corresponds to a coordinate within the rectangular coordinate system; obtain the RGB values of each pixel, and obtain a closed area composed of several pixels with the same RGB value. Each closed area is recorded as an RGB area;
[0031] Obtain the outermost pixels of the RGB region and their corresponding coordinates to obtain the edge curve of the RGB region, denoted as the sample edge curve, and select m reference points on the sample edge curve; and obtain the center point coordinates of each RGB region, denoted as the sample center coordinate P0.
[0032] It can be understood that the sample image of the printed matter sample is usually completed by a high-resolution scanner or camera to ensure that the image quality is high enough; after dividing the sample image into several pixels, each pixel has its corresponding RGB value (red, green, blue), which is used to represent the color information of the pixel; establish a rectangular coordinate system in the sample image, and the rectangular coordinate system can be a Cartesian coordinate system, so that each pixel corresponds to a unique coordinate for accurately positioning the position of each pixel; define a closed region composed of several pixels with the same RGB value as an RGB region, which helps to identify the same-color regions in the image; obtain the outermost pixels of the RGB region and their corresponding coordinates to form the edge curve of the RGB region, and this curve describes the boundary shape of the RGB region; the center point is usually the average value of all pixel coordinates in the region, representing the position center of the region.
[0033] As a preferred embodiment of the present invention, the process of dividing the sample image into several pixels is based on rasterization processing.
[0034] It can be understood that the rasterization processing is a process of image segmentation. Through rasterization processing, the image can be segmented into multiple regions, which are often rectangular, and each region contains several pixels.
[0035] As a preferred embodiment of the present invention, the process of selecting the reference points includes: setting an interval threshold, and selecting m reference points at equal intervals on the sample edge curve according to the interval threshold.
[0036] It can be understood that an interval threshold needs to be set to determine the distance interval for selecting reference points on the sample edge curve; this threshold can be adjusted according to actual needs to ensure that the number and distribution of reference points can meet the requirements of analysis; the interval threshold determines the distance between reference points, and a smaller threshold will make the reference points denser, while a larger threshold will make the reference points sparser.
[0037] Step S2: Obtain the captured image of the current printed matter, obtain all RGB regions in the captured image, and obtain the RGB values, edge curves and center point coordinates of each RGB region.
[0038] According to the sample edge curve, sample center coordinate and each RGB region in the captured image, obtain the size index and position index , where D(P0 i , P i ) represents the Euclidean distance between P0 i and P i . P0 i is the sample center coordinate of the i-th RGB region, and P i is the center point coordinate of the i-th RGB region in the captured image. n is the total number of RGB regions. F´ i (x) is the derivative value of the edge curve F(x) of the i-th RGB region in the captured image at the x-th reference point, and f´ i (x) is the derivative value of the i-th sample edge curve at the x-th reference point. F i (x) is the coordinate corresponding to the x-th reference point on the edge curve F(x) of the i-th RGB region in the captured image, and f i (x) is the coordinate corresponding to the x-th reference point on the edge curve F(x) of the i-th sample;
[0039] Obtain the RGB value of the i-th RGB region in the captured image, denoted as R i , and obtain the RGB value of the i-th RGB region in the sample image, denoted as R0 i , then the color difference index of the image is obtained ;
[0040] It can be understood that the processing of the captured image is the same as that of the sample image in step S1. The captured image is rasterized, divided into several pixels, and the RGB values of each pixel are obtained. All pixels are divided into several RGB regions according to the RGB values, and each RGB region represents the same-color region in the captured image;
[0041] It should be noted that the process of obtaining the size index is to judge whether the derivative values of the edge curves of the RGB regions with the same number and the sample edge curves at each reference point in the captured image and the sample image are the same, that is, whether the shapes of the edge curves of the RGB regions with the same number and the sample edge curves are consistent; the smaller the size index, the more consistent the shapes. The process of obtaining the position index is to judge whether the center point coordinates of the RGB regions with the same number and the sample center point coordinates in the captured image and the sample image are consistent, and to judge whether the distances from the center point to each reference point on the edge curve and the distances from the sample center point to each reference point on the sample edge curve are consistent; the smaller the position index, the more consistent the pattern position and shape of the captured image with the sample print. The color difference index is the difference in the RGB values of each RGB region, and the smaller the color difference index, the smaller the color difference between the captured image and the sample image;
[0042] In a preferred embodiment of the present invention, the process of obtaining the Euclidean distance includes: Denote the sample center coordinates as P0 i =(x0 i , y0 i ), and the corresponding center coordinates P in the captured image i =(x i , y i ), then the Euclidean distance ;
[0043] Step S3: Obtain the gray variance H of the captured image, and set the standard size index QI side ´, the standard position index QI por ´, the standard color difference index QI color ´, and the standard gray variance index H´, then obtain the quality index of the current printed matter ;
[0044] Evaluate the quality of the printed matter according to the quality index;
[0045] It can be understood that the gray variance is a measure of the discreteness of the pixel value distribution in the image, reflecting the contrast and detail richness of the image, and is used to evaluate the clarity and contrast of the printed matter pattern; the greater the gray variance of the captured image, the higher the clarity;
[0046] In a preferred embodiment of the present invention, the process of obtaining the gray variance includes:
[0047] Obtain the average value of the RGB values of each pixel in the captured image and denote it as RGB ave , then obtain the gray variance of the captured image , where RGB k represents the kth pixel, and N is the total number of pixels in the captured image;
[0048] In a preferred embodiment of the present invention, the setting process of the standard size index, the standard position index, the standard color difference index, and the standard gray variance index includes:
[0049] Obtain historical data, where the historical data includes the size index, the position index, the color difference index, and the gray variance index of historical qualified printed matters; obtain the mean value of the size index in the historical data and denote it as the standard size index, obtain the mean value of the position index in the historical data and denote it as the standard position index, obtain the mean value of the color difference index in the historical data and denote it as the standard color difference index, and obtain the mean value of the gray variance index in the historical data and denote it as the standard gray variance index;
[0050] It should be noted that the standard gray variance is often affected by the acquisition device of the captured image, related to the shooting clarity of the acquisition device, and also affected by the printing accuracy of the printing device;
[0051] In a preferred embodiment of the present invention, when QI por = 0, directly record QI por ´ / QI por = QI por ´; when QI side = 0, directly record QI side ´ / QI side = QI side ´; when QI color = 0, directly record QI color ´ / QI color = QI color ´;
[0052] It can be understood that in the calculation formula of the quality index, QI por , QI side , QI color are all numerators and cannot be 0;
[0053] In a preferred embodiment of the present invention, the process of quality assessment of the printed matter includes:
[0054] Set a quality index threshold, denoted as μ; if QI ≥ μ, the quality of the current printed matter is qualified; otherwise, the quality of the current printed matter is unqualified;
[0055] It should be noted that the quality index is only used to judge whether the quality of the current printed matter is qualified, so that there is a unified standard for detecting whether the printed matter is qualified, and the effect of quality comparison between printed matters is relatively limited.
[0056] The above has described a detailed description of an embodiment of the present invention, but the content described above is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made according to the scope of the application of the present invention should still fall within the scope covered by the patent of the present invention.
Claims
1. A printing quality assessment method based on machine vision, characterized in that: The following steps are involved: Step S1: obtaining a sample image of a printed product sample, dividing the sample image into a number of pixels, and establishing a rectangular coordinate system on the sample image, where each pixel corresponds to a coordinate in the rectangular coordinate system; obtaining the RGB value of each pixel, and obtaining a closed area consisting of a number of pixels with the same RGB value, and recording each closed area as an RGB area; Obtain the outermost pixels of the RGB area and their corresponding coordinates to obtain an edge curve of the RGB area, recorded as a sample edge curve, and select m reference points on the sample edge curve; and obtain the coordinates of the center point of each RGB area, recorded as the sample center coordinate P0; Step S2: obtaining a photographed image of the current printed product, obtaining all RGB areas in the photographed image, and obtaining RGB values, edge curves and center point coordinates of each RGB area; The size index of the captured image is obtained according to the sample edge curve, the sample center coordinates and each RGB area in the captured image. and position index , where D(P0 i , P i ) indicates P0 i With P i The Euclidean distance, P0 i is the sample center coordinate of the i-th RGB region, P i is the coordinate of the center point of the i-th RGB region in the captured image, n is the total number of RGB regions, F´ i (x) is the derivative value of the edge curve F(x) of the i-th RGB region in the captured image at the x-th reference point, f´ i (x) is the derivative value of the edge curve of the i-th sample at the x-th reference point, F i (x) is the coordinate of the xth reference point on the edge curve F(x) of the i-th RGB region in the captured image, i (x) is the coordinate corresponding to the xth reference point on the i-th sample edge curve; Get the RGB value of the i-th RGB area in the captured image, denoted as R i , and obtain the RGB value of the i-th RGB area in the sample image, denoted as R0 i , then the color difference index of the image is obtained ; Step S3: Obtain the grayscale variance H of the captured image and set the standard size index QI side ´、Standard Position Index QI por ´、Standard color difference index QI color ´ and standard grayscale variance index H´, the quality index of the current print is obtained ; According to the quality index, the quality of the printed product is evaluated.
2. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S1 , the process of dividing the sample image into a number of pixels is based on a rasterization process.
3. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S1, the reference point selection process includes: setting an interval threshold, and selecting m reference points at equal intervals on the sample edge curve according to the interval threshold.
4. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S2, the process of obtaining the Euclidean distance includes: The sample center coordinate is denoted as P0 i =(x0 i ,y0 i ), the corresponding center coordinates P in the captured image i =(x i ,y i ), then the Euclidean distance .
5. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S3, the grayscale variance obtaining process includes: The average value of the RGB values of each pixel in the captured image is obtained and recorded as RGB ave , then the grayscale variance of the captured image is obtained , where RGB k represents the kth pixel, and N is the total number of pixels in the captured image.
6. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S3, the process of setting the standard size index, the standard position index, the standard color difference index and the standard grayscale variance index includes: Obtain historical data, the historical data including size index, position index, color difference index and grayscale variance index of historical qualified printed products; obtain the mean value of the size index in the historical data, recorded as the standard size index, obtain the mean value of the position index in the historical data, recorded as the standard position index, obtain the mean value of the color difference index in the historical data, recorded as the standard color difference index, obtain the mean value of the grayscale variance index in the historical data, recorded as the standard grayscale variance index.
7. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S3, when QIpor=0, directly record QIpor´ / QIpor=QIpor´ in the formula; when QIside=0, directly record QIside´ / QIside=QIside´ in the formula; when QIcolor=0, directly record QIcolor´ / QIcolor=QIcolor´ in the formula.
8. The printing quality assessment method based on machine vision according to claim 1, characterized in that: In step S3, the process of evaluating the quality of the printed product includes: A quality index threshold is set, denoted as μ; if QI ≥ μ, the quality of the current printed product is qualified; otherwise, the quality of the current printed product is unqualified.
Citation Information
Patent Citations
Ancient drawing printed matter color reproduction detection and evaluation method based on feature interpolation
CN112488997A
Hardware part defect detection method and system based on image recognition technology
CN115620061A
Cited By
A Printing Color Consistency Optimization System and Method Based on Multispectral Online Detection
CN122560564A