Printed product color detection method, device, equipment and medium

Through the registration and feature point positioning of printed images and standard images, full-frame real-time detection of printed color detection is achieved, which solves the problem of low traditional detection efficiency and improves detection efficiency and accuracy.

CN112085707BActive Publication Date: 2024-09-06SINO MV TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202010832635.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-18
Publication Date
2024-09-06
Estimated Expiration
2040-08-18

AI Technical Summary

Technical Problem

Traditional print color detection cannot detect the entire format in real time, resulting in low efficiency.

Method used

By obtaining the registration of the image to be inspected and the standard image, a positioning kernel is generated based on the feature points of the standard image, the pixels to be inspected are matched one-to-one with the standard pixels, and the pixel color difference is calculated to achieve real-time color detection of the entire print format.

Benefits of technology

It improves the efficiency of printed color detection, reduces labor costs, makes up for the shortcomings of low manual detection speed and long time consumption, and achieves full-width accurate detection of printed matter color detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112085707B
    Figure CN112085707B
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment and medium for detecting the color of printed matter. The method for detecting the color of printed matter includes: obtaining an image to be detected corresponding to the printed matter to be detected; registering the image to be detected with a standard image to obtain a registered image; positioning the registered image according to a positioning core to obtain a position correspondence between the pixels to be detected in the registered image and the standard pixels in the standard image; wherein the positioning core is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image; and according to the position correspondence, the pixel color difference between each pixel to be detected and the corresponding standard pixel is calculated. According to the embodiments of the present disclosure, the efficiency of color detection of printed matter can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of printing technology, and in particular to a method, device, equipment and medium for detecting the color of printed matter. Background Art

[0002] Printing is a general term for various finished products produced using printing technology. Uniform ink color and bright and pure colors are the basic requirements for printing quality, while printing color difference is a common problem of printing quality.

[0003] In order to ensure the quality of printed products, the color of printed products is generally tested after they are printed. Traditionally, the color detection of printed products is done offline, by trained testers observing with their eyes, or using color detection instruments that are in contact with the printed products. Each time, only the color difference of a certain point can be detected, and the entire format of the printed product cannot be detected in real time, making the efficiency of color detection of printed products low. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, device, equipment and medium for detecting color of printed matter.

[0005] In a first aspect, the present disclosure provides a method for detecting color of a printed product, comprising:

[0006] Obtaining an image to be inspected corresponding to the printed matter to be inspected;

[0007] Registering the image to be inspected with the standard image to obtain a registered image;

[0008] Positioning the registration image according to the positioning kernel, and obtaining the position correspondence between the pixel to be tested in the registration image and the standard pixel in the standard image; wherein the positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image;

[0009] According to the position correspondence, the pixel color difference between each pixel to be tested and the corresponding standard pixel is calculated.

[0010] In a second aspect, the present disclosure provides a printed matter color detection device, comprising:

[0011] A first acquisition module is used to acquire an image to be inspected corresponding to the printed product to be inspected;

[0012] A first registration module is used to register the image to be inspected with the standard image to obtain a registered image;

[0013] A first positioning module is used to position the registration image according to the positioning kernel, and obtain the position correspondence between the pixel to be tested in the registration image and the standard pixel in the standard image; wherein the positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image;

[0014] The first calculation module is used to calculate the pixel color difference between each pixel to be tested and the corresponding standard pixel according to the position correspondence relationship.

[0015] In a third aspect, the present disclosure provides a printed matter color detection device, comprising:

[0016] processor;

[0017] a memory for storing processor-executable instructions;

[0018] The processor is configured to execute instructions to implement the printed product color detection method as described in the first aspect.

[0019] In a fourth aspect, the present disclosure provides a storage medium. When instructions in the storage medium are executed by a processor of a control device, the control device can execute the printed product color detection method as described in the first aspect.

[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0021] The printed matter color detection method, device, equipment and medium provided by the embodiments of the present disclosure can perform real-time detection on the entire format of the printed matter to be inspected based on the image to be inspected corresponding to the printed matter to be inspected. After the image to be inspected is acquired, the image to be inspected can be registered with the standard image to obtain a registered image, and the registered image can be positioned according to the positioning kernel generated based on the feature points of the standard image to obtain the position correspondence between the pixels to be inspected in the registered image and the standard pixels in the standard image, and then the pixels to be inspected in the registered image and the standard pixels in the standard image are matched one by one, and a standard pixel that can be used as a comparison benchmark is found in the standard image for each pixel to be inspected in the registered image, and finally the pixel color difference between each pixel to be inspected and the corresponding standard pixel is calculated according to the position correspondence, so as to realize real-time detection of the colors of all pixels in the entire format of the printed matter to be inspected, thereby improving the efficiency of printed matter color detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 A schematic diagram of the structure of a printed matter color detection system provided by an embodiment of the present disclosure;

[0025] Figure 2 A schematic diagram of a process for detecting color of printed matter provided by an embodiment of the present disclosure;

[0026] Figure 3 A schematic diagram of a process for detecting color of printed matter provided by another embodiment of the present disclosure;

[0027] Figure 4 A schematic diagram of the structure of a printed matter color detection device provided by an embodiment of the present disclosure;

[0028] Figure 5 A schematic diagram of the hardware structure of a printed matter color detection device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0030] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0031] In order to solve the problem that in the traditional printed matter color detection process, the entire format of the printed matter cannot be detected in real time, resulting in low efficiency of printed matter color detection, the present disclosure provides a printed matter color detection system.

[0032] Figure 1 A schematic structural diagram of a printed matter color detection system provided by an embodiment of the present disclosure is shown.

[0033] like Figure 1As shown, the printed product color detection system includes an image acquisition device 110 and an image detection device 120. The image acquisition device 110 is in communication connection with the image detection device 120, the image acquisition device 110 can acquire the image to be inspected corresponding to the printed product to be inspected, and the image detection device 120 can perform real-time color detection on the entire format of the printed product to be inspected based on the image to be inspected corresponding to the printed product to be inspected.

[0034] The acquisition device 110 may include at least one of a camera, a video camera, a still camera, and a scanner. The acquisition device 110 may photograph or scan the printed product to be inspected to obtain an image to be inspected with a predetermined color in a predetermined color mode.

[0035] The predetermined color mode can be set according to user needs, and the predetermined color mode can be any one of RGB mode, CMYK mode and Lab color mode. The predetermined bit color can be any one of 16-bit color, 24-bit color and 32-bit color.

[0036] Optionally, the image to be inspected may include the entire surface image of the printed product to be inspected.

[0037] The image detection device 120 may be an electronic device or a server, wherein the electronic device may be a tablet computer, a laptop computer, a desktop computer, an all-in-one computer, or other device with communication functions, or a device simulated by a virtual machine or a simulator. The server may be a device with storage and computing functions.

[0038] Specifically, after acquiring the image to be inspected, the image detection device 120 can align the image to be inspected with the standard image to obtain a registered image, and locate the registered image according to the positioning kernel generated based on the feature points of the standard image to obtain the position correspondence between the pixels to be inspected in the registered image and the standard pixels in the standard image, and then make one-to-one correspondence between the pixels to be inspected in the registered image and the standard pixels in the standard image, find a standard pixel in the standard image that can be used as a comparison benchmark for each pixel to be inspected in the registered image, and finally calculate the pixel color difference between each pixel to be inspected and the corresponding standard pixel according to the position correspondence.

[0039] Therefore, the printed product color detection system provided by the embodiment of the present disclosure can realize real-time detection of the colors of all pixels within the entire format of the printed product to be inspected. Compared with the traditional non-online method, it can reduce labor costs, make up for the shortcomings of low speed and long time of manual detection, and improve the efficiency of printed product color detection.

[0040] based on Figure 1The printed matter color detection system shown in the figure, the embodiment of the present disclosure provides a printed matter color detection method, device, equipment and medium. Below, the printed matter color detection method provided by the embodiment of the present disclosure is first described.

[0041] Figure 2 A schematic flow chart of a method for detecting color of printed matter provided in one embodiment of the present disclosure is shown.

[0042] In some embodiments of the present disclosure, Figure 2 The method shown may be executed by an electronic device or a server, for example, Figure 1 The image detection device 120 shown in FIG.

[0043] like Figure 2 As shown, the printed matter color detection method may include the following steps.

[0044] S210, obtaining an image to be inspected corresponding to the printed product to be inspected.

[0045] In the embodiment of the present disclosure, the image detection device can receive the image to be inspected sent by the image acquisition device.

[0046] The image to be inspected may be a 24-bit color RGB image.

[0047] S220 , registering the image to be inspected with the standard image to obtain a registered image.

[0048] In some embodiments of the present disclosure, S220 may specifically include:

[0049] Positioning the image to be inspected according to the positioning core to obtain a first matching area in the image to be inspected;

[0050] According to the first matching area and the positioning kernel corresponding to the first matching area, an affine transformation is performed on the image to be inspected to obtain a transformed registration image.

[0051] For each positioning kernel, the image detection device can use the positioning kernel to traverse the image area to be matched corresponding to each pixel row by row from the upper left corner to the lower right corner of the image to be detected, wherein the pixel can be the upper left diagonal point of the image area to be matched, and the pixel size of the image area to be matched can be the same as the pixel size of the positioning kernel. In the process of traversing each image area to be matched, the image detection device can calculate the matching score between the image area to be matched and the positioning kernel, and determine the first matching area corresponding to the positioning kernel according to the matching score.

[0052] In some embodiments, the matching score between the image region to be matched and the positioning kernel can be determined by an image similarity calculation formula, and the matching score between the image region to be matched and the positioning kernel can be the image similarity between the image region to be matched and the positioning kernel. In this case, the image region to be matched corresponding to the maximum matching score can be used as the first matching region corresponding to the positioning kernel.

[0053] Among them, the image similarity calculation formula can be:

[0054]

[0055] Where S is the image similarity, and the range of S is: -1≤S≤1. The more similar the two images are, the closer S is to 1. I is the image to be tested, i is the horizontal coordinate of the pixel at the upper left corner of the image area to be matched in the image to be tested, j is the vertical coordinate of the pixel at the upper left corner of the image area to be matched in the image to be tested, w is the number of pixel columns of the positioning kernel, h is the number of pixel rows of the positioning kernel, T is the positioning kernel, x is the relative horizontal coordinate of the pixel, and y is the relative vertical coordinate of the pixel.

[0056] Optionally, in order to improve the accuracy of the matching results and the precision of the transformed registered image, the image detection device can calculate the matching score between the image area to be matched and the positioning kernel in the process of traversing each image area to be matched, and when the maximum matching score is greater than or equal to a preset first matching score threshold, the image area to be matched corresponding to the maximum matching score is used as the first matching area corresponding to the positioning kernel.

[0057] The first matching score threshold may be set as required, for example, the first matching score threshold may be 90%, 95% or 97%. The higher the set first matching score threshold is, the higher the accuracy of the transformed registered image is.

[0058] In other embodiments, the matching score between the image region to be matched and the positioning kernel may be determined by a Sum of Absolute Differences (SAD) algorithm, and the matching score between the image region to be matched and the positioning kernel may be the SAD between the image region to be matched and the positioning kernel. In this case, the image region to be matched corresponding to the minimum matching score may be used as the first matching region corresponding to the positioning kernel.

[0059] Optionally, in order to improve the accuracy of the matching results and the precision of the transformed registered image, the image detection device can calculate the matching score between the image area to be matched and the positioning kernel in the process of traversing each image area to be matched, and when the minimum matching score is less than or equal to a preset second matching score threshold, the image area to be matched corresponding to the minimum matching score is used as the first matching area corresponding to the positioning kernel.

[0060] The second matching score threshold may be set as needed. For example, the second matching score threshold may be 10%, 5% or 3%. The lower the second matching score threshold is, the higher the accuracy of the transformed registration image is.

[0061] In other embodiments of the present disclosure, in order to reduce the amount of data processing and improve data processing efficiency, before positioning the image to be inspected according to the positioning check and obtaining the first matching point in the image to be inspected, the printed product color detection method may further include:

[0062] According to the first preset size, a first positioning area corresponding to the positioning kernel is determined.

[0063] Accordingly, positioning the image to be inspected according to the positioning core to obtain the first matching point in the image to be inspected may specifically include:

[0064] In the first positioning region corresponding to each positioning core, the image to be inspected is positioned according to the positioning core to obtain a first matching region.

[0065] In some embodiments, for each positioning kernel, the image detection device may be pre-set with a first preset size, and then the coordinates of the four diagonal points of the positioning kernel in the standard image may be determined, and then the horizontal coordinate of the upper left diagonal point may be subtracted from the first preset size to obtain the minimum horizontal coordinate value of the first positioning area, and the horizontal coordinate of the upper right diagonal point may be added with the first preset size to obtain the maximum horizontal coordinate value of the first positioning area, and then the horizontal coordinate range of the first positioning area may be determined, and finally, the vertical coordinate of the upper left diagonal point may be subtracted from the first preset size to obtain the minimum vertical coordinate value of the first positioning area, and the horizontal coordinate of the lower left diagonal point may be added with the first preset size to obtain the maximum vertical coordinate value of the first positioning area, and then the vertical coordinate range of the first positioning area may be determined. Finally, the first positioning area may be obtained.

[0066] In other embodiments, for each positioning kernel, the image detection device may be pre-set with a first preset size, and then the coordinates of the center point of the positioning kernel in the standard image may be determined, and then the horizontal coordinate of the center point minus the first preset size may be used to obtain the minimum horizontal coordinate value of the first positioning area, and the horizontal coordinate of the center point plus the first preset size may be used to obtain the maximum horizontal coordinate value of the first positioning area, and then the horizontal coordinate range of the first positioning area may be determined, and finally, the vertical coordinate of the center point minus the first preset size may be used to obtain the minimum vertical coordinate value of the first positioning area, and the vertical coordinate of the center point plus the first preset size may be used to obtain the maximum vertical coordinate value of the first positioning area, and then the vertical coordinate range of the first positioning area may be determined. Finally, the first positioning area may be obtained.

[0067] Furthermore, the image detection device may locate the image to be detected in the first positioning area in the image to be detected according to the positioning core corresponding to the first positioning area to obtain a first matching area.

[0068] The first preset size corresponding to each positioning core may be the same or different. The first preset size may be set according to user needs and is not limited here.

[0069] In the embodiment of the present disclosure, the image detection device can use a preset affine transformation algorithm to perform an affine transformation on the image to be inspected according to the coordinates of each pixel in the first matching area in the image to be inspected and the coordinates of each pixel in the positioning kernel corresponding to the first matching area in the standard image, to obtain a transformed registration image, wherein the affine transformation is a linear transformation from two-dimensional coordinates to two-dimensional coordinates, which maintains the "straightness" (that is, a straight line is still a straight line after transformation) and "parallelism" of the two-dimensional image (that is, the relative position relationship between the two-dimensional images remains unchanged, parallel lines are still parallel lines, and the position order of points on the straight lines remains unchanged), thereby maintaining the consistency between the registration image and the image to be inspected, and improving the accuracy of the color detection results.

[0070] In some other embodiments of the present disclosure, in order to improve the accuracy of the transformed registered image, performing an affine transformation on the image to be inspected according to the first matching area and the positioning kernel corresponding to the first matching area, and obtaining the transformed registered image may specifically include:

[0071] When the number of the first matching regions is greater than or equal to the number of the preset regions, an affine transformation is performed on the image to be inspected according to the first matching regions and the positioning kernels corresponding to the first matching regions.

[0072] Specifically, the image detection device can first compare the number of first matching areas with the number of preset areas. The preset number of areas can be the lower limit of the number of first matching areas. If the number of first matching areas is greater than or equal to the preset number of areas, an affine transformation can be performed on the image to be inspected based on the first matching areas and the positioning kernels corresponding to the first matching areas; if the number of first matching areas is less than the preset number of areas, the detection of the image to be inspected is terminated.

[0073] The number of preset areas may be set according to user needs. For example, the number of preset areas may be 4, 6 or 8, thereby meeting the needs of affine transformation and improving the accuracy of the registered image after transformation.

[0074] S230 , positioning the registered image according to the positioning check, and obtaining a position correspondence between the pixel to be checked in the registered image and the standard pixel in the standard image.

[0075] The positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image.

[0076] In the disclosed embodiment, a corner point is an extreme point, and a corner point may be an intersection point of two lines in a standard image, or a point on a curve in a standard image where the local curvature is the largest.

[0077] Specifically, the process of generating the positioning kernel will be described in detail later.

[0078] In some embodiments of the present disclosure, S230 may specifically include:

[0079] Positioning the registered image according to the positioning check to obtain a second matching area in the registered image;

[0080] The position correspondence between the pixel to be detected and the standard pixel is calculated according to the second matching area and the positioning kernel corresponding to the second matching area.

[0081] For each positioning kernel, the image detection device may traverse the image area to be matched corresponding to each pixel row by row from the upper left corner to the lower right corner in the registration image through the positioning kernel, wherein the pixel may be the upper left diagonal point of the image area to be matched, and the pixel size of the image area to be matched may be the same as the pixel size of the positioning kernel. In the process of traversing each image area to be matched, the image detection device may calculate the matching score between the image area to be matched and the positioning kernel, and determine the second matching area corresponding to the positioning kernel according to the matching score.

[0082] The method for determining the second matching area is similar to the method for determining the first matching area, and will not be described in detail here.

[0083] In other embodiments of the present disclosure, in order to reduce the amount of data processing and improve data processing efficiency, before positioning the registration image according to the positioning check to obtain the second matching area in the registration image, the printed product color detection method may further include:

[0084] According to the second preset size, a second positioning area corresponding to the positioning kernel is determined.

[0085] Accordingly, positioning the registered image according to the positioning check to obtain the second matching area in the registered image may specifically include:

[0086] In the second positioning region corresponding to each positioning core, the registration image is positioned according to the positioning core to obtain a second matching region.

[0087] In some embodiments, for each positioning kernel, the image detection device may be pre-set with a second preset size, and then the coordinates of the four diagonal points of the positioning kernel in the standard image may be determined, and then the horizontal coordinate of the upper left diagonal point may be subtracted from the second preset size to obtain the minimum horizontal coordinate value of the second positioning area, and the horizontal coordinate of the upper right diagonal point may be added with the second preset size to obtain the maximum horizontal coordinate value of the second positioning area, and then the horizontal coordinate range of the second positioning area may be determined, and finally, the vertical coordinate of the upper left diagonal point may be subtracted from the second preset size to obtain the minimum vertical coordinate value of the second positioning area, and the horizontal coordinate of the lower left diagonal point may be added with the second preset size to obtain the maximum vertical coordinate value of the second positioning area, and then the vertical coordinate range of the second positioning area may be determined. Finally, the second positioning area may be obtained.

[0088] In other embodiments, for each positioning kernel, the image detection device may be pre-set with a second preset size, and then the coordinates of the center point of the positioning kernel in the standard image may be determined, and then the horizontal coordinate of the center point may be subtracted from the second preset size to obtain the minimum horizontal coordinate of the second positioning area, and the horizontal coordinate of the center point may be added with the second preset size to obtain the maximum horizontal coordinate of the second positioning area, and then the horizontal coordinate range of the second positioning area may be determined, and finally, the vertical coordinate of the center point may be subtracted from the second preset size to obtain the minimum vertical coordinate of the second positioning area, and the horizontal coordinate of the center point may be added with the second preset size to obtain the maximum vertical coordinate of the second positioning area, and then the vertical coordinate range of the second positioning area may be determined. Finally, the second positioning area may be obtained.

[0089] Furthermore, the image detection device may locate the image to be inspected in the second positioning area in the image to be inspected according to the positioning core corresponding to the second positioning area to obtain a second matching area.

[0090] The second preset size corresponding to each positioning core may be the same or different. The second preset size may be set according to user needs and is not limited here.

[0091] Optionally, the second preset size may be smaller than or equal to the first preset size, thereby making the range of the second positioning area smaller than the first positioning area, so as to further reduce the data processing amount and improve the data processing efficiency.

[0092] In some other embodiments of the present disclosure, calculating the position correspondence between the pixel to be detected and the standard pixel according to the second matching area and the positioning kernel corresponding to the second matching area may specifically include:

[0093] In the second matching area, determining a third matching area corresponding to each pixel to be detected; wherein the third matching area is the second matching area closest to the pixel to be detected;

[0094] The mapping relationship between the third matching region corresponding to each pixel to be detected and the corresponding positioning kernel is used as the position correspondence relationship between the coordinates of the pixel to be detected in the registration image and the coordinates of the standard pixel in the standard image.

[0095] Specifically, for each pixel to be inspected, the image detection device can calculate the distance between the pixel to be inspected and the center point of each second matching area, and select the second matching area with the closest distance as the third matching area corresponding to the pixel to be inspected, and then use the mapping relationship between the selected third matching area and its corresponding positioning kernel as the position correspondence between the coordinates of the pixel to be inspected in the registered image and the coordinates of the standard pixel in the standard image.

[0096] S240 , calculating the pixel color difference between each pixel to be tested and the corresponding standard pixel according to the position correspondence relationship.

[0097] In the embodiment of the present disclosure, the coordinates of the standard pixel corresponding to each pixel to be tested in the standard image can be determined based on the corresponding relationship between the coordinates and the position of each pixel to be tested in the registered image, and then the color value of the standard pixel corresponding to each pixel to be tested is obtained based on the determined coordinates in the standard image. Then, based on the color value of each pixel to be tested, the color value of the standard pixel corresponding to the pixel to be tested and the color difference formula CIEDE2000, the pixel color difference between each pixel to be tested and the corresponding standard pixel is calculated, and then the color difference between each pixel to be tested and the corresponding standard pixel is determined.

[0098] In the disclosed embodiment, the entire format of the printed product to be inspected can be inspected in real time based on the image to be inspected corresponding to the printed product to be inspected. After the image to be inspected is acquired, the image to be inspected can be registered with the standard image to obtain a registered image, and the registered image can be positioned according to the positioning kernel generated based on the feature points of the standard image to obtain the position correspondence between the pixels to be inspected in the registered image and the standard pixels in the standard image, and then the pixels to be inspected in the registered image and the standard pixels in the standard image are matched one by one, and a standard pixel that can be used as a comparison benchmark is found in the standard image for each pixel to be inspected in the registered image, and finally, according to the position correspondence, the pixel color difference between each pixel to be inspected and the corresponding standard pixel is calculated, so as to realize real-time detection of the colors of all pixels in the entire format of the printed product to be inspected, thereby improving the efficiency of color detection of printed products.

[0099] In some embodiments of the present disclosure, before S210, the printed matter color detection method may further include:

[0100] Get a standard image;

[0101] Perform corner point detection on the standard image to obtain the corner points of the standard image;

[0102] Cluster the corner points to obtain clustering results;

[0103] According to the clustering results, determine the feature points;

[0104] According to the third preset size, a positioning kernel corresponding to the feature point is generated.

[0105] In the embodiment of the present disclosure, the image detection device can receive a standard image sent by the image acquisition device.

[0106] The standard image may be a 24-bit color RGB image.

[0107] Furthermore, the image detection device can use the Harris corner detection algorithm to calculate the corner points of the standard image, and then use the k-means (k-means) clustering algorithm to cluster the corner points to obtain a clustering result, which can be multiple groups of corner point groups. Then, select the corner point in each corner point group that is closest to the center point of the group of corner point groups, and use the selected corner point as the feature point. Then, based on the third preset size and the coordinates of the feature point in the standard image, generate a feature core area corresponding to the feature point, select the image content in the feature core area, and generate a positioning kernel.

[0108] Optionally, for each feature point, the image detection device may be pre-set with a third preset size, and then the coordinates of the feature point in the standard image may be determined, and then the third preset size may be subtracted from the horizontal coordinate of the feature point to obtain the minimum horizontal coordinate value of the feature core area, and the third preset size may be added to the horizontal coordinate of the feature point to obtain the maximum horizontal coordinate value of the feature core area, and then the horizontal coordinate range of the feature core area may be determined, and finally, the third preset size may be subtracted from the vertical coordinate of the feature point to obtain the minimum vertical coordinate value of the feature core area, and the third preset size may be added to the horizontal coordinate of the feature point to obtain the maximum vertical coordinate value of the feature core area, and then the vertical coordinate range of the feature core area may be determined. Finally, the feature core area may be obtained.

[0109] The third preset size corresponding to each feature point is the same, and the third preset size can be set according to user needs and is not limited here.

[0110] In some embodiments of the present disclosure, in order to ensure the accuracy of positioning, the corner points are clustered, and the clustering results may specifically include:

[0111] When the number of corner points is greater than the preset number of corner points, the corner points are clustered to obtain a clustering result.

[0112] Specifically, the image detection device can first compare the number of corner points with a preset number of corner points, which can be an upper limit on the number of corner points. If the number of corner points is greater than the preset number of corner points, the corner points can be clustered to obtain clustering results to reduce the amount of data processing; if the number of corner points is less than or equal to the preset number of corner points, the corner points are not clustered, but all the obtained corner points are directly used as feature points, and a positioning kernel corresponding to the feature point is generated according to a third preset size, thereby avoiding too few corner points and improving the accuracy of positioning.

[0113] The number of preset corner points may be set according to user needs. For example, the number of preset corner points may be 5000.

[0114] Figure 3 A schematic flow chart of a method for detecting color of printed matter provided in another embodiment of the present disclosure is shown.

[0115] In some embodiments of the present disclosure, Figure 3 The method shown may be executed by an electronic device or a server, for example, Figure 1 The image detection device 120 shown in FIG.

[0116] like Figure 3 As shown, the printed matter color detection method may include the following steps.

[0117] S310, obtaining an image to be inspected corresponding to the printed product to be inspected.

[0118] S320: register the image to be inspected with the standard image to obtain a registered image.

[0119] S330 , positioning the registered image according to the positioning check, and obtaining a position correspondence between the pixel to be checked in the registered image and the standard pixel in the standard image.

[0120] The positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image.

[0121] S340 , calculating the pixel color difference between each pixel to be tested and the corresponding standard pixel according to the position correspondence relationship.

[0122] Among them, S310-S340 and Figure 2 S210 - S240 in the illustrated method embodiment are similar and will not be described in detail here.

[0123] S350: Compare the color difference of each pixel with a preset color difference threshold to obtain a comparison result corresponding to the color difference of each pixel.

[0124] In some embodiments of the present disclosure, a preset color difference threshold may be pre-set in the image detection device. The image detection device may compare the color difference of each pixel with the preset color difference threshold to obtain a comparison result corresponding to the color difference of each pixel. The comparison result is the color difference comparison result corresponding to the pixel to be inspected. The comparison result may include the pixel color difference being greater than the preset color difference threshold and the pixel color difference being less than or equal to the preset color difference threshold.

[0125] At this time, if the comparison result is that the pixel color difference is greater than the preset color difference threshold, it means that the pixel to be tested has color difference; if the comparison result is that the pixel color difference is less than or equal to the preset color difference threshold, it means that the pixel to be tested has no color difference.

[0126] The preset color difference threshold can be set according to user needs and is not limited here.

[0127] In some other embodiments of the present disclosure, two preset color difference thresholds may be pre-set in the image detection device, the larger value of the two preset color difference thresholds is the first color difference threshold, and the smaller value of the two preset color difference thresholds is the second color difference threshold. The image detection device can compare the color difference of each pixel with the two preset color difference thresholds to obtain a comparison result corresponding to each pixel color difference, and the comparison result is the color difference comparison result corresponding to the pixel to be inspected. The comparison result may include the pixel color difference being greater than the second color difference threshold, the pixel color difference being less than or equal to the second color difference threshold and greater than the first color difference threshold, and the pixel color difference being less than or equal to the first color difference threshold.

[0128] At this time, if the comparison result is that the pixel color difference is greater than the second color difference threshold, it means that the color difference of the pixel to be tested is too large; if the comparison result is that the pixel color difference is less than or equal to the second color difference threshold and greater than the first color difference threshold, it means that the pixel to be tested has color difference; if the comparison result is that the pixel color difference is less than or equal to the first color difference threshold, it means that the pixel to be tested has no color difference.

[0129] The first color difference threshold and the second color difference threshold can be set according to user needs, and are not limited here.

[0130] For example, the first color difference threshold may be 3, and the second color difference threshold may be 6. If the pixel color difference is ΔE, when 0≤ΔE≤3, the pixel to be detected is judged to have no color difference; when 3<ΔE≤6, the pixel to be detected is judged to have color difference; when ΔE>6, the pixel to be detected is judged to have too large color difference.

[0131] S360: Determine the target area in the registered image according to the comparison result.

[0132] The target area includes a preset number of target pixels to be detected, and the pixel color difference corresponding to the target pixels to be detected is within a preset color difference range, which is determined according to a set color difference threshold. Accordingly, the target area is the area with color difference in the registered image.

[0133] In some embodiments of the present disclosure, when a preset color difference threshold is pre-set in the image detection device, the preset color difference range may be a range greater than the preset color difference threshold.

[0134] In some embodiments, the image detection device may divide the registered image into a plurality of image regions to be detected according to a fourth preset size, and traverse each image region to be detected. In the process of traversing each image region to be detected, the image detection device may obtain the number of target pixels to be detected in the image region to be detected whose pixel color difference is greater than a preset color difference threshold, and if the number of target pixels to be detected is greater than or equal to the preset number of pixels, the image region to be detected may be used as the target region.

[0135] In other embodiments, the image detection device can obtain target pixels to be inspected whose pixel color difference is greater than a preset color difference threshold, and generate at least one connected domain based on the target pixels to be inspected, and then determine the number of target pixels to be inspected in each connected domain. If the number of target pixels to be inspected in any connected domain is greater than or equal to the preset number of pixels, the connected domain can be used as the target area.

[0136] The fourth preset size and the preset number of pixels can be set according to user needs, and are not limited here.

[0137] In some embodiments of the present disclosure, when two preset color difference thresholds are pre-set in the image detection device, the preset color difference range may be a range greater than the first color difference threshold.

[0138] The method for determining the target area is similar to the method for determining the target area in the case where the preset color difference range may be a range greater than the preset color difference threshold, and will not be described in detail here.

[0139] Optionally, in this case, after determining the target area, it is possible to further determine whether there is an area with excessive color difference in the target area. The area with excessive color difference may include a preset number of pixels with excessive color difference to be detected, and the pixel color difference corresponding to the pixels with excessive color difference to be detected is greater than the second color difference threshold.

[0140] Specifically, the image detection device may divide the target area into a plurality of target sub-areas according to the fifth preset size, and traverse each target sub-area. In the process of traversing each target sub-area, the image detection device may obtain the number of excessive color difference pixels to be detected in the target sub-area whose pixel color difference is greater than the second color difference threshold, and if the number of excessive color difference pixels to be detected is greater than or equal to the preset number of excessive color difference pixels, the target sub-area may be regarded as an excessive color difference area.

[0141] In other embodiments, the image detection device can obtain pixels with excessive color difference within the target area whose color difference is greater than a second color difference threshold, and generate at least one connected domain based on the pixels with excessive color difference, and then determine the number of pixels with excessive color difference in each connected domain. If the number of pixels with excessive color difference in any connected domain is greater than or equal to the preset number of pixels with excessive color difference, the connected domain can be used as an area with excessive color difference.

[0142] The fifth preset size and the preset number of pixels with excessive color difference can be set according to user needs, and are not limited here.

[0143] In the embodiment of the present disclosure, after the target area and the area with excessive color difference are determined, the target area and the area with excessive color difference can also be displayed in a preset display mode to visualize the color detection result. The preset display mode can be set according to user needs and is not limited here.

[0144] To sum up, after accurately locating the position correspondence between the registration image corresponding to the image to be inspected and the standard image, the embodiment of the present disclosure can synchronously calculate the pixel color difference corresponding to all the pixels to be inspected in the registration image, and respectively calculate the color difference comparison result corresponding to each pixel to be inspected and the area with color difference in the registration image, thereby realizing full-frame color detection of the image to be inspected, which can not only improve the color detection efficiency and color detection accuracy, thereby improving the quality of printed products, but also reduce labor costs and scrap rates of printed products.

[0145] Figure 4 A schematic structural diagram of a printed matter color detection device provided by an embodiment of the present disclosure is shown.

[0146] In some embodiments of the present disclosure, Figure 4 The device shown may be an electronic device or a server, for example, Figure 1 The image detection device 120 shown in FIG.

[0147] like Figure 4 As shown, the printed product color detection device 400 may include a first acquisition module 410 , a first registration module 420 , a first positioning module 430 and a first calculation module 440 .

[0148] The first acquisition module 410 may be used to acquire the image to be inspected corresponding to the printed product to be inspected.

[0149] The first registration module 420 may be used to register the image to be inspected with the standard image to obtain a registered image.

[0150] The first positioning module 430 can be used to position the registration image according to the positioning kernel to obtain the position correspondence between the pixel to be tested in the registration image and the standard pixel in the standard image; wherein the positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image.

[0151] The first calculation module 440 may be configured to calculate the pixel color difference between each pixel to be detected and the corresponding standard pixel according to the position correspondence relationship.

[0152] In the disclosed embodiment, the entire format of the printed product to be inspected can be inspected in real time based on the image to be inspected corresponding to the printed product to be inspected. After the image to be inspected is acquired, the image to be inspected can be registered with the standard image to obtain a registered image, and the registered image can be positioned according to the positioning kernel generated based on the feature points of the standard image to obtain the position correspondence between the pixels to be inspected in the registered image and the standard pixels in the standard image, and then the pixels to be inspected in the registered image and the standard pixels in the standard image are matched one by one, and a standard pixel that can be used as a comparison benchmark is found in the standard image for each pixel to be inspected in the registered image, and finally, according to the position correspondence, the pixel color difference between each pixel to be inspected and the corresponding standard pixel is calculated, so as to realize real-time detection of the colors of all pixels in the entire format of the printed product to be inspected, thereby improving the efficiency of color detection of printed products.

[0153] In some embodiments of the present disclosure, the first registration module 420 may include a first positioning unit and a first transformation unit.

[0154] The first positioning unit can be used to position the image to be inspected according to the positioning core to obtain a first matching area in the image to be inspected.

[0155] The first transformation unit may be used to perform an affine transformation on the image to be inspected according to the first matching region and the positioning kernel corresponding to the first matching region to obtain a transformed registration image.

[0156] In some embodiments of the present disclosure, the first registration module 420 may further include a first determination unit, which may be configured to determine a first positioning region corresponding to the positioning kernel according to a first preset size.

[0157] Accordingly, the first positioning unit may be specifically configured to: locate the image to be inspected in the first positioning region corresponding to each positioning core according to the positioning core to obtain a first matching region.

[0158] In some embodiments of the present disclosure, the first positioning module 430 may include a second positioning unit and a first calculation unit.

[0159] The second positioning unit can be used to perform positioning according to the positioning check registration image to obtain a second matching area in the registration image.

[0160] The first calculation unit may be configured to calculate a position correspondence between the pixel to be detected and the standard pixel according to the second matching area and a positioning kernel corresponding to the second matching area.

[0161] In some embodiments of the present disclosure, the first positioning module 430 may further include a second determining unit, and the second determining unit may be configured to determine a second positioning area corresponding to the positioning kernel according to a second preset size.

[0162] Accordingly, the second positioning unit may be specifically configured to: in a second positioning region corresponding to each positioning core, position the registration image according to the positioning core to obtain a second matching region.

[0163] In some embodiments of the present disclosure, the printed product color detection device 400 may further include a second acquisition module, a first detection module, a first clustering module, a first determination module and a first generation module.

[0164] The second acquisition module can be used to acquire a standard image.

[0165] The first detection module can be used to perform corner point detection on the standard image to obtain the corner points of the standard image.

[0166] The first clustering module can be used to cluster the corner points to obtain a clustering result.

[0167] The first determination module can be used to determine feature points according to the clustering results.

[0168] The first generating module may be used to generate a positioning kernel corresponding to the feature point according to a third preset size.

[0169] In some embodiments of the present disclosure, the printed product color detection device 400 may further include a first comparison module and a second determination module.

[0170] The first comparison module can be used to compare the color difference of each pixel with a preset color difference threshold to obtain a comparison result corresponding to the color difference of each pixel.

[0171] The second determination module can be used to determine the target area in the registered image according to the comparison result; wherein the target area includes a preset number of target pixels to be inspected, and the pixel color difference corresponding to the target pixels to be inspected is within a preset color difference range, and the preset color difference range is determined according to a preset color difference threshold.

[0172] It should be noted that Figure 4 The printed matter color detection device 400 shown can perform Figure 2 and Figure 3 The various steps in the method embodiment shown in the figure are implemented Figure 2 and Figure 3The various processes and effects in the method embodiment shown are not described in detail here.

[0173] Figure 5 A schematic diagram of the hardware structure of a printed matter color detection device provided by an embodiment of the present disclosure is shown.

[0174] like Figure 5 As shown, the printed product color detection device may include a processor 501 and a memory 502 storing computer program instructions.

[0175] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0176] The memory 502 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 502 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0177] The processor 501 reads and executes the computer program instructions stored in the memory 502 to perform the steps of the printed product color detection method provided in the embodiment of the present disclosure.

[0178] In one example, the printed product color detection device may further include a transceiver 503 and a bus 504. Figure 5As shown, the processor 501, the memory 502 and the transceiver 503 are connected via a bus 504 and communicate with each other.

[0179] The bus 504 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 504 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0180] The embodiment of the present disclosure also provides a storage medium including instructions, such as a memory 502 including instructions, and the above instructions can be executed by the processor 502 of the control device to complete the printed product color detection method provided by the embodiment of the present disclosure. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0181] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0182] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting the color of a printed product, comprising: Obtaining an image to be inspected corresponding to the printed matter to be inspected; Registering the image to be inspected with the standard image to obtain a registered image; Positioning the registered image according to the positioning kernel to obtain a position correspondence between the pixels to be tested in the registered image and the standard pixels in the standard image; wherein the positioning kernel is generated according to the feature points of the standard image, and the feature points are determined according to the corner points of the standard image; Calculating the pixel color difference between each of the pixels to be tested and the corresponding standard pixel according to the position correspondence; The registering the image to be tested with the standard image to obtain the registered image includes: positioning the image to be tested according to the positioning core to obtain a first matching area in the image to be tested; performing an affine transformation on the image to be tested according to the first matching area and the positioning core corresponding to the first matching area to obtain the transformed registered image; The method of positioning the registered image according to the positioning core to obtain the position correspondence between the pixel to be tested in the registered image and the standard pixel in the standard image includes: positioning the registered image according to the positioning core to obtain a second matching area in the registered image; and calculating the position correspondence between the pixel to be tested and the standard pixel according to the second matching area and the positioning core corresponding to the second matching area; The step of positioning the image to be inspected according to the positioning kernel to obtain a first matching region in the image to be inspected includes: calculating a matching score between the image region to be matched and the positioning kernel based on an image similarity calculation formula, and determining a first matching region corresponding to the positioning kernel according to the matching score; The image similarity calculation formula is: Wherein, S is the image similarity, and the range of S is: -1≤S≤1. The more similar the two images are, the closer S is to 1. I is the image to be tested, i is the horizontal coordinate of the pixel at the upper left corner point of the image area to be matched in the image to be tested, j is the vertical coordinate of the pixel at the upper left corner point of the image area to be matched in the image to be tested, w is the number of pixel columns of the positioning kernel, h is the number of pixel rows of the positioning kernel, T is the positioning kernel, x is the relative horizontal coordinate of the pixel, and y is the relative vertical coordinate of the pixel.

2. The method according to claim 1, wherein: Before positioning the image to be inspected according to the positioning core to obtain a first matching area in the image to be inspected, the method further includes: Determining a first positioning area corresponding to the positioning core according to a first preset size; The step of positioning the image to be inspected according to the positioning core to obtain a first matching area in the image to be inspected includes: In the first positioning area corresponding to each positioning core, the image to be inspected is positioned according to the positioning core to obtain the first matching area.

3. The method according to claim 1, wherein: Before positioning the registered image according to the positioning core to obtain a second matching area in the registered image, the method further includes: Determining a second positioning area corresponding to the positioning core according to a second preset size; The step of positioning the registered image according to the positioning core to obtain a second matching area in the registered image includes: In the second positioning region corresponding to each positioning kernel, the registration image is positioned according to the positioning kernel to obtain the second matching region.

4. The method according to claim 1, wherein: Before obtaining the image to be inspected corresponding to the printed product to be inspected, the method further includes: Acquiring the standard image; Performing corner point detection on the standard image to obtain corner points of the standard image; Clustering the corner points to obtain a clustering result; Determining the feature points according to the clustering result; The positioning kernel corresponding to the feature point is generated according to the third preset size.

5. The method according to claim 1, wherein: After calculating the pixel color difference between each of the pixels to be tested and the corresponding standard pixel according to the position correspondence, the method further includes: Compare the color difference of each pixel with a preset color difference threshold to obtain a comparison result corresponding to the color difference of each pixel; According to the comparison result, the target area in the registered image is determined; wherein the target area includes a preset number of target pixels to be inspected, and the pixel color difference corresponding to the target pixels to be inspected is within a preset color difference range, and the preset color difference range is determined according to the preset color difference threshold.

6. A printed matter color detection device, comprising: A first acquisition module is used to acquire an image to be inspected corresponding to the printed product to be inspected; A first registration module, used for registering the image to be inspected with a standard image to obtain a registered image; A first positioning module, used to position the registered image according to a positioning kernel, and obtain a position correspondence between the pixels to be tested in the registered image and the standard pixels in the standard image; wherein the positioning kernel is generated according to feature points of the standard image, and the feature points are determined according to corner points of the standard image; A first calculation module, used for calculating the pixel color difference between each of the pixels to be tested and the corresponding standard pixel according to the position correspondence; The first registration module includes a first positioning unit and a first transformation unit; the first positioning unit is used to position the image to be inspected according to the positioning core to obtain a first matching area in the image to be inspected; the first transformation unit is used to perform an affine transformation on the image to be inspected according to the first matching area and the positioning core corresponding to the first matching area to obtain a transformed registration image; The first positioning module includes a second positioning unit and a first calculation unit; the second positioning unit is used to position the registration image according to the positioning core to obtain a second matching area in the registration image; the first calculation unit is used to calculate the position correspondence between the pixel to be tested and the standard pixel according to the second matching area and the positioning core corresponding to the second matching area; The first positioning unit is specifically used to: calculate a matching score between the image area to be matched and the positioning kernel based on an image similarity calculation formula, and determine a first matching area corresponding to the positioning kernel according to the matching score; The image similarity calculation formula is: Wherein, S is the image similarity, and the range of S is: -1≤S≤1. The more similar the two images are, the closer S is to 1. I is the image to be tested, i is the horizontal coordinate of the pixel at the upper left corner point of the image area to be matched in the image to be tested, j is the vertical coordinate of the pixel at the upper left corner point of the image area to be matched in the image to be tested, w is the number of pixel columns of the positioning kernel, h is the number of pixel rows of the positioning kernel, T is the positioning kernel, x is the relative horizontal coordinate of the pixel, and y is the relative vertical coordinate of the pixel.

7. A printed matter color detection device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the printed matter color detection method according to any one of claims 1 to 5. 8 . A storage medium, when instructions in the storage medium are executed by a processor of a control device, the control device is enabled to execute the printed matter color detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method of performing interpolation for CFA in CMOS sensor and circuit thereof

    CN101227621A

  • Equipment and method for processing false color of image

    CN102045574A

  • An automatic detection method for registration deviation of color printed materials

    CN102275382A

  • Printing defect detection method based on flexible template registration

    CN103048331A

  • Template registration method for multiple-process flexible printed matter detection

    CN105241894A