Method and system for judging authenticity of printed matter image
By sampling the printed image to calculate the characteristic points and comparing the number of similar points, combining the true judgment coefficient and false judgment coefficient, the problem of difficulty in efficiently determining the authenticity of printed materials in the prior art is solved, and efficient, simple and low-cost authenticity judgment of printed materials is achieved.
Patent Information
- Application Number
- CN202510458519.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
It is difficult to efficiently and simply determine the authenticity of the printed product without affecting the appearance of the printed product and without increasing production costs, especially when facing complex and high imitation difficulties.
By sampling the image of the genuine printed product, the coordinates of its characteristic points and the set of characteristic point values are calculated, the number of similar points between different image samples is compared, and the corresponding threshold value is calculated by determining the authenticity of the printed product to be detected.
It realizes efficient, simple and low-cost determination of the authenticity of the printed product without affecting the appearance of the printed product and without increasing production costs, thereby improving the identification accuracy and user experience.
Smart Images

Figure CN120147757A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of anti-counterfeiting technology, and particularly to a method and system for determining the authenticity of printed matter images. Background Art
[0002] Currently, there is a common phenomenon in society that printed matter such as physical commodity packaging, tickets, cards, handicrafts, etc. are forged and high-definition copied. The copying methods are generally two types: high-definition copying plus manual fine-tuning and copying according to the original pattern. The corresponding anti-counterfeiting technologies mainly have three types of ideas. The first type is anti-counterfeiting on printing materials, which means using some special substances and materials to achieve the purpose of anti-counterfeiting. Generally speaking, the costs required for material anti-counterfeiting are relatively high. For example, the production equipment investment for security thread anti-counterfeiting paper is large, and the production process is very complex. Just for the security thread itself, a large production cost is required. It is precisely for this reason that its counterfeiting cost is very high and it is suitable for banknote manufacturing. Compared with anti-counterfeiting paper, the production cost of anti-counterfeiting ink is a little lower, but it is still expensive and not easily obtained, so it can achieve anti-counterfeiting to a certain extent. Moiré anti-counterfeiting depends on the design of the printing layer, has certain requirements for printing equipment, and for moiré with fewer parameters, it can be simulated and forged by a computer. In short, most material anti-counterfeiting requires relatively high costs to achieve, and their anti-counterfeiting is mainly based on the relatively high costs of counterfeiting, forging, and copying printed matter. For applications such as currency, certificates, and various valuable notes, using such anti-counterfeiting technologies is indeed very suitable, but it is very difficult to popularize for mass anti-counterfeiting. And with the development of the economy and the progress of technology, the technical exclusivity and uniqueness of this type of solution are poor. In addition, the application of most material anti-counterfeiting is difficult to be specific to a single object to be identified, and the individuation is poor. Although RFID anti-counterfeiting technology can achieve the identification of a single object and has strong identification ability, its anti-interference ability is poor and it may not be usable in occasions such as static electricity, strong magnetic field, and high temperature.
[0003] The second category is digital information anti-counterfeiting technology, which mainly differentiates through information encoding and information hiding methods, taking advantage of the impact of printing and photocopying on pixels themselves. For example, adding information encoding such as QR codes directly reserves positions on the packaging for reading and anti-counterfeiting detection; among them, better anti-counterfeiting effects are achieved through hidden information such as hidden marks and printing watermarks. Information with a certain robustness is embedded into the printed electronic draft image in the pre-printing stage, and in the detection process, image processing and extraction algorithms are used to extract the hidden information and automatically calculate according to the set threshold. Currently, the main problems of these two types of technologies are that they will change the original appearance of printed materials, especially by adding graphics for easy positioning such as QR codes (CN114580589B "A Dual-channel QR Code and a Control Method for Anti-photocopying and Information Hiding"), microdot codes (CN115423063B "Anti-photocopying Shading Anti-counterfeiting Method and Device Based on Microdot Codes"), which will affect the appearance to varying degrees, increase the production process and costs, rely on high-precision image acquisition equipment for sampling and detection, have complex user operations during detection, low discrimination accuracy, and poor user experience during detection, etc., due to the underlying technical principles.
[0004] The third category is not to add any information to the original image and relies on random high-definition detail acquisition during the production process. The disadvantages are high acquisition costs, equipment costs, and storage costs; it is impossible to achieve efficient and low-cost sampling, and there are also problems of complex user operations and low accuracy during detection. Summary of the Invention
[0005] The objective of the embodiments of the present invention is to provide a method and a system for determining the authenticity of a printed matter image, which can efficiently, simply, and at low cost determine the authenticity of a printed matter without affecting the appearance and without increasing the original printing process and costs.
[0006] To achieve the above object, an embodiment of the present invention provides a method for determining the authenticity of a printed image. The method includes: performing a first image sampling on a detection area of an image printed on a first genuine product to obtain a first sample image and a detection area mask; according to the detection area mask, performing second to m-th image samplings on the detection areas of the images printed on the first to n-th genuine products to obtain second to m-th sample images; calculating, by a feature point recognition algorithm, a set POI1 of coordinates and feature point values of the feature points in each of the first to m-th sample images; according to the set POI1 of coordinates and feature point values of the feature points in each sample image, comparing every two of the first to m-th sample images to obtain at least one number of similar points; multiplying the largest number of similar points among the at least one number of similar points by a truth judgment coefficient, a gray coefficient, and a false judgment coefficient respectively to obtain a truth judgment threshold, a gray threshold, and a false judgment threshold; performing the above steps at least once to calculate and store a set POI1 of coordinates and feature point values of at least one set of feature points from at least two sample images and the corresponding at least one truth judgment threshold, at least one gray threshold, and at least one false judgment threshold, so as to calculate the number of truth judgments and the number of false judgments according to the relationship between the number of similar points between the image of the printed product to be detected and the sample images and the at least one truth judgment threshold, the at least one gray threshold, and the at least one false judgment threshold, and compare with a truth judgment preset value and a false judgment preset value to determine the authenticity of the printed product to be detected.
[0007] Preferably, the feature point value is an attribute value of a feature point image. When the attribute value is a gray value, the gray value is obtained by the formula CV = aR + bG + cB, where CV is the gray value, R, G, and B are color channels, and a, b, and c are gray ratios, and a + b + c = 1.
[0008] Preferably, each of the second to m-th image samplings includes continuously collecting u frames of images. The method further includes: calculating, by a feature point recognition algorithm, a set POI1 of coordinates and feature point values of the feature points in each of the u frames of images collected; using the image with the largest number of feature points in the POI1 as the sample image for the current sampling.
[0009] Preferably, the method further includes: calculating, by a hash algorithm, the set POI1 of coordinates and feature point values of the at least one set of feature points and the corresponding at least one truth judgment threshold, at least one gray threshold, and at least one false judgment threshold to obtain corresponding feature numbers; associating the feature numbers with the printed product numbers of the sampled printed products.
[0010] Preferably, the set of coordinates and feature point values of the feature points of each sample image, i.e., POI1, is used to compare every two of the first to the m sample images, and obtaining at least one number of similar points includes: comparing the feature point values of each pair of feature points with the closest positions in two sample images, and when the comparison result is within the threshold range, determining the compared feature points as similar points to obtain the number of similar points of the two compared images. The comparison methods include any one of taking the absolute value difference of feature point values, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF, and PSNR; performing the above steps for every two sample images to obtain the at least one number of similar points.
[0011] Preferably, according to the relationship between the number of similar points of the image of the printed matter to be detected and the sample image, and the magnitudes of the at least one true judgment threshold, the at least one gray threshold, and the at least one false judgment threshold, calculating the number of true judgments and the number of false judgments, and comparing them with the true judgment preset value and the false judgment preset value to determine the authenticity of the printed matter to be detected includes: calculating the set of coordinates and feature point values of the feature points of the u-frame image of the printed matter to be detected, i.e., POI2, through a feature point recognition algorithm; according to the set of coordinates and feature point values of the feature points of the u-frame image of the printed matter to be detected, i.e., POI2, and the set of coordinates and feature point values of the at least one group of feature points, i.e., POI1, comparing each frame image of the printed matter to be detected with the sample images corresponding to the set of coordinates and feature point values of all feature points. When the number of similar points is greater than or equal to the corresponding true judgment threshold, record that the number of true judgments is incremented by 1, and complete the comparison of the current frame of the printed matter to be detected; in the comparison of any frame image of the printed matter to be detected with all sample images, when there is a situation where the number of similar points is greater than the corresponding false judgment threshold and less than or equal to the corresponding gray threshold, record that the number of false judgments is incremented by 1. Until the number of true judgments is greater than the true judgment preset value, determine that the printed matter to be detected is genuine; or when the number of false judgments is greater than the false judgment preset value, determine that the printed matter to be detected is fake.
[0012] An embodiment of the present invention further provides a system for determining the authenticity of a printed image. The system includes: a first sampling unit, a second sampling unit, and a processing unit. Among them, the first sampling unit is used to perform a first image sampling on the detection area of the image printed on the first genuine product to obtain a first sample image and a detection area mask; the second sampling unit is used to perform second to mth image samplings on the detection areas of the images printed on the first to nth genuine products according to the detection area mask to obtain second to mth sample images; the processing unit is used to: calculate a set POI1 of the coordinates and feature point values of the feature points of each sample image in the first to mth sample images through a feature point recognition algorithm; compare every two of the first to mth sample images according to the set POI1 of the coordinates and feature point values of the feature points of each sample image to obtain at least one number of similar points; multiply the largest number of similar points in the at least one number of similar points by a truth judgment coefficient, a gray coefficient, and a false judgment coefficient respectively to obtain a truth judgment threshold, a gray threshold, and a false judgment threshold; perform the above steps at least once to calculate and store a set POI1 of the coordinates and feature point values of at least one group of feature points from at least two sample images and the corresponding at least one truth judgment threshold, at least one gray threshold, and at least one false judgment threshold, so as to calculate the number of truth judgments and the number of false judgments according to the relationship between the number of similar points between the image of the printed matter to be detected and the sample images and the at least one truth judgment threshold, the at least one gray threshold, and the at least one false judgment threshold, and compare with a truth judgment preset value and a false judgment preset value to determine the authenticity of the printed matter to be detected.
[0013] Preferably, the feature point value is an attribute value of a feature point image. When the attribute value is a gray value, the gray value is obtained through the formula CV = aR + bG + cB, where CV is the gray value, R, G, and B are color channels, a, b, and c are gray ratios, and a + b + c = 1.
[0014] Preferably, each of the second to mth image samplings includes continuously collecting u frames of images. The first sampling unit and the second sampling unit are further used to: calculate a set POI1 of the coordinates and feature point values of the feature points of each frame of the u frames of images collected through a feature point recognition algorithm; use the image with the largest number of feature points in the POI1 as the sample image for the current sampling.
[0015] Preferably, the processing unit is configured to: compare the feature point values of each pair of feature points with the closest positions in two sample images, and when the comparison result is within the threshold range, determine the compared feature points as similar points, so as to obtain the number of similar points in the two compared images. The comparison method includes any one of taking the absolute value difference, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF, and PSNR of the feature point values; perform the above steps for each two sample images to obtain the at least one number of similar points.
[0016] Through the above technical solution, by using the printed matter image authenticity determination method and the printed matter image authenticity determination system provided by the present invention, there is no need to pre-hide information in the printed packaging image, and the authenticity of the printed matter can be determined efficiently, simply and at low cost without affecting the appearance and without increasing the original printing process and cost.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific implementation part. Description of the Drawings
[0018] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification, and are used to explain the embodiments of the present invention together with the following specific implementation manners, but do not constitute a limitation to the embodiments of the present invention. In the drawings: Figure 1 is a flowchart of a printed matter image authenticity determination method provided by an embodiment of the present invention; Figure 2 is a sampling schematic diagram of a printed matter image authenticity determination method provided by an embodiment of the present invention; Figure 3 is a flowchart of a printed matter image authenticity determination method provided by another embodiment of the present invention; Figure 4 is a structural block diagram of a printed matter image authenticity determination system provided by an embodiment of the present invention.
[0019] Description of the Reference Numerals 1 - First sampling unit 2 - Second sampling unit 3 - Processing unit Detailed Description of the Embodiments
[0020] The following will describe in detail the specific implementation manners of the embodiments of the present invention with reference to the drawings. It should be understood that the specific implementation manners described herein are only used to illustrate and explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention.
[0021] Figure 1 is a flowchart of a printed matter image authenticity determination method provided by an embodiment of the present invention. As Figure 1 shown, the method includes: Step S101, perform a first image sampling on the detection area of the image printed on the first genuine product to obtain a first sample image and a detection area mask; Specifically, the detection area can be a square area with a side length of R pixels in the center of the image, such as common image narrow side lengths of 480, 640, 960, 1080, 1280, 1920, 2160, 2560, 3840, 4096, etc., preferably 480. Of course, the square area is only a preference. Those skilled in the art can understand that the detection area can also be set as a rectangular area, etc., and the side length can also be set as required.
[0022] Considering that there may be image jitter and defocus in consecutive frames, in one embodiment, it is preferably possible to continuously collect u frames of images each time an image sampling is performed. u can take any value from 1 to 100, preferably u = 10. At this time, the sampling time is at the second level, and the user hardly needs to wait. When continuously collecting u frames of images each time an image sampling is performed, u images will be obtained. In one embodiment, the feature points and the feature point value set POI1 of each frame of the u frames of images collected can be calculated through a feature point recognition algorithm, and then the image with the largest number of feature points in POI1 is used as the sample image for the current sampling. Suppose an image has two feature points, and its POI = [(x1, y1, h1), (x2, y2, h2)], where x1, x2, y1, y2 are the coordinate values of the feature points, and h1 and h2 are the feature point values. It should be noted that the feature point recognition algorithm can be a corner detection algorithm, such as SIFT corner detection, Harris corner detection, SUSAN corner detection, corner detection derived using machine learning, etc., or other recognition algorithms for identifying the POI of an image. The following is a specific algorithm step given in the embodiment of the present invention: Step 1: Generation of a multi-scale image pyramid: Perform Gaussian pyramid downsampling processing on the input image to generate at least two image layers with different resolutions; Step 2: Detection of dynamic threshold candidate points: For each layer of the image, calculate the gray-scale difference in the circular neighborhood around the pixel point, and dynamically adjust the difference threshold according to the gray-scale standard deviation of the local window to screen candidate corners; Step 3: Edge constraint filtering: Perform edge detection on the current layer of the image. If the candidate point is located on the edge line or within its neighborhood, then eliminate the candidate point; Step 4: Cross-scale response aggregation: Map the candidate points of each layer to the original image coordinate system, and retain the corner points with the maximum response value through non-maximum suppression.
[0023] In addition, the feature point value can be an attribute value of an image such as the brightness value or grayscale value of the feature point. Taking the grayscale value as an example, the grayscale value can be calculated by the formula CV = aR + bG + cB, where CV is the grayscale value, R, G, and B are color channels, a, b, and c range from 0 to 1, and a + b + c = 1. Preferably, the well-known grayscale ratios 0.3, 0.6, and 0.1 are taken.
[0024] In one embodiment, the detection area mask is generated based on the last image in the collected u-frame images. That is, during the first image sampling, according to the detection area of the current last sample image, the selection area is automatically screenshot to generate a semi-transparent mask that can be perceived by the human eye and uploaded and stored in the cloud for subsequent sampling alignment of the contour. It can be understood that the above is only a preferred method. When the u-frame images are not collected, the detection area mask can also be directly generated using the detection area during the first image sampling, or when the u-frame images are collected, the detection area mask can also be generated using the first frame image or other frame images in the u-frame images. The embodiments of the present invention do not limit this.
[0025] Step S102, according to the detection area mask, perform second to mth image sampling on the detection areas of the images printed on the first to nth genuine products to obtain second to mth sample images; Specifically, as Figure 2 shown, taking the example image (half of the five rings) as an example, the colored image on the right side is the image to be sampled, and the black and white on the left side is the semi-transparent detection area mask. During sampling, the left detection area mask needs to be aligned with the image to be sampled on the right side. For the second to mth sampling, load the semi-transparent detection area mask, and adjust the image to be sampled to a position close to the detection area mask image by moving the acquisition device, ensuring that the horizontal and vertical coordinate deviations at the upper left corner are less than K pixels (preferably 0 ≤ K ≤ 20) to obtain the second to mth sample images.
[0026] It should be noted that in one embodiment, the first to mth sampling can be performed only on one genuine product. However, although they are all genuine products, there will still be pattern position, shape, and color deviations within a certain range, and these deviations will produce differences that can be calculated and captured by the program for image details. Therefore, in another embodiment, genuine products with representative differences can be selected as candidate sampling objects, and the first to mth sampling can be performed on multiple genuine products. Considering the best application efficiency, two candidate sampling objects can be selected and only sampled twice.
[0027] Step S103, calculate the set of coordinates and feature point values POI1 of the feature points of each sample image in the first to mth sample images through the feature point recognition algorithm; Specifically, after obtaining the first to mth sample images through the above method, the set of coordinates and feature point values POI1 of the feature points of each sample image can be obtained through the feature point recognition algorithm described above.
[0028] Step S104: Compare every two of the first to the mth sample images according to the coordinates of the feature points and the set of feature point values POI1 of each sample image, to obtain at least one number of similar points. Specifically, for two sample images A and B, for the coordinates of each feature point of sample image A, find the feature point with the largest feature point value among several feature points above, below, left, and right of the same coordinates in sample image B, and compare it with this feature point of sample image A to obtain a comparison result, allowing a coordinate offset range (such as ±5 pixels). The comparison method can be the absolute value difference, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF, PSNR, etc. of the feature point values.
[0029] When the comparison result is within the threshold range (preferably greater than 0.8), determine that the compared feature points are similar points. After performing the above comparison for all feature points in sample image A, the number of similar points of the compared sample images A and B is obtained.
[0030] Perform the steps of comparing sample images A and B for every two sample images to obtain at least one number of similar points. If there are only two sample images A and B, then there is only one number of similar points. If there are three sample images A, B, and C, then according to permutation and combination, there should be three numbers of similar points.
[0031] Step S105: Multiply the largest number of similar points among the at least one number of similar points by the true judgment coefficient, gray coefficient, and false judgment coefficient respectively to obtain the true judgment threshold, gray threshold, and false judgment threshold. Specifically, the true judgment coefficient is preferably 0.85, and multiplying the largest number of similar points by 0.85 can obtain the true judgment threshold; the gray coefficient is preferably 0.7, and multiplying the largest number of similar points by 0.7 can obtain the gray threshold; the false judgment coefficient is preferably 0.5, and multiplying the largest number of similar points by 0.5 can obtain the false judgment threshold. Of course, in other embodiments, the true judgment coefficient, gray coefficient, and false judgment coefficient can also be other values, which can be set according to different scenarios.
[0032] Execute the above steps at least once to calculate and store the set POI1 of the coordinates and feature point values of at least one group of feature points from at least two sample images, as well as the corresponding at least one true judgment threshold, at least one gray threshold, and at least one false judgment threshold, so as to calculate the number of true judgments and the number of false judgments according to the size relationship between the number of similar points of the image of the printed matter to be detected and the sample image, and the at least one true judgment threshold, the at least one gray threshold, and the at least one false judgment threshold, and compare with the true judgment preset value and the false judgment preset value to determine the authenticity of the printed matter to be detected.
[0033] Specifically, performing the above steps S101 - S105 once obtains a set of coordinates of feature points and a set POI1 of feature point values, and obtains a true judgment threshold, a gray threshold, and a false judgment threshold. If the above steps S101 - S105 are repeated multiple times, multiple sets of coordinates of feature points and a set POI1 of feature point values, as well as the corresponding multiple true judgment thresholds, multiple gray thresholds, and multiple false judgment thresholds can be obtained. Subsequently, for at least one set of coordinates of feature points and a set POI1 of feature point values, as well as the corresponding at least one true judgment threshold, at least one gray threshold, and at least one false judgment threshold, a hash algorithm can be used for calculation to obtain the corresponding feature number; Associate the feature number with the print number of the sampled printed matter, and upload all the sampled sample images, the detection area mask, the set POI1 of the coordinates and feature point values of the feature points, the true judgment threshold, the gray threshold, the false judgment threshold, and the feature number and the print number of the sampled printed matter to the local or cloud database of the detection client software.
[0034] When the user needs to detect the authenticity of the printed matter to be detected, load the associated feature number from the local or cloud database of the detection client software according to the print number of the printed matter selected by the user, so as to obtain the sample image, the detection area mask, the set POI1 of the coordinates and feature point values of the feature points, the true judgment threshold, the gray threshold, the false judgment threshold, etc. to determine the image of the current printed matter.
[0035] First, still calculate the set POI2 of the coordinates and feature point values of the feature points of the u-frame image of the printed matter to be detected through the feature point recognition algorithm, and then according to the comparison method described above, compare the u-frame image of the printed matter to be detected and all the sample images based on the set POI2 of the coordinates and feature point values of the feature points of the u-frame image of the printed matter to be detected and at least one set POI1 of the coordinates and feature point values of the feature points. The specific method is as Figure 3 shown.
[0036] As Figure 3 shown, first compare any uncompared frame image of the printed matter to be detected. Take the set POI2 of the coordinates and feature point values of the feature points of an uncompared frame image of the printed matter to be detected, and take the set POI1 of the coordinates and feature point values of the feature points of an uncompared sample image for comparison, and there are three situations: (1) When the number of similarity points is greater than or equal to the corresponding true judgment threshold, increment the true judgment count by 1. At this time, check whether the true judgment count is greater than the preset value (which can be 1, preferably 5). When the true judgment count is greater than the preset value, directly determine that the printed matter to be detected is genuine; when the true judgment count is not greater than the preset value, complete the comparison of the current frame of the printed matter to be detected, and select another uncompared frame image of the printed matter to be detected for comparison with the sample image corresponding to the set POI1 of the coordinates and feature point values of all feature points. (2) When the number of similarity points is greater than the corresponding false judgment threshold and less than or equal to the corresponding gray threshold, increment the sample false count by 1, and take the set POI1 of the coordinates and feature point values of the feature points of the next uncompared sample image for comparison. (3) When the number of similarity points is less than or equal to the corresponding false judgment threshold, or greater than the corresponding gray threshold and less than the corresponding true judgment threshold, do not count, and take the set POI1 of the coordinates and feature point values of the feature points of the next uncompared sample image for comparison.
[0037] When the comparison of this frame image is completed (that is, all sample images have been compared with this frame image), if there is no true judgment count, but there is a sample false count, regardless of the number of sample false counts, increment the false judgment count by 1, and select another uncompared frame image of the printed matter to be detected for comparison with the sample image corresponding to the set POI1 of the coordinates and feature point values of all feature points. When the comparison of this frame image is completed (that is, all sample images have been compared with this frame image), if there is no true judgment count and no sample false count, directly select another uncompared frame image of the printed matter to be detected for comparison with the sample image corresponding to the set POI1 of the coordinates and feature point values of all feature points.
[0038] In this way, compare each frame image with all sample images, and accumulate the true judgment count and false judgment count during the comparison process. When the number of times of the true judgment threshold is greater than the preset value, determine that the printed matter to be detected is genuine; or when the false judgment count is greater than the preset value, determine that the printed matter to be detected is fake.
[0039] If the true judgment or false judgment conditions are not met within the specified time (preferably 10 seconds, but not limited to this), prompt the user to retry aligning the reference pattern outline. If it is still impossible to make a true judgment after multiple alignments, it is suspected to be a counterfeit.
[0040] Those skilled in the art should understand that the process of determining the authenticity of the printed matter to be detected provided in the above embodiments is only an example, and reasonable transformations and modifications can be made thereto on this basis, such as the counting methods of the true judgment count and false judgment count, etc. Similarly, the authenticity of the printed matter to be detected can be determined, which will not be elaborated here.
[0041] In the embodiment of the present invention, there is no need to pre-hide information in the printed packaging image, and the authenticity of the printed matter can be determined efficiently, simply and at low cost without affecting the appearance and without increasing the original printing process and cost.
[0042] Figure 4 It is a structural block diagram of a printed matter image authenticity determination system provided by an embodiment of the present invention. As Figure 4 shown, the system includes: a first sampling unit 1, a second sampling unit 2, and a processing unit 3. Among them, the first sampling unit 1 is used to perform a first image sampling on the detection area of the image printed on the first genuine product to obtain a first sample image and a detection area mask; the second sampling unit 2 is used to perform second to mth image samplings on the detection areas of the images printed on the first to nth genuine products according to the detection area mask to obtain second to mth sample images; the processing unit 3 is used to: calculate the coordinates and the set of feature point values POI1 of the feature points of each sample image in the first to mth sample images through a feature point recognition algorithm; compare every two sample images in the first to mth sample images according to the coordinates and the set of feature point values POI1 of the feature points of each sample image to obtain at least one number of similar points; multiply the largest number of similar points in the at least one number of similar points by a truth determination coefficient, a gray coefficient, and a false determination coefficient respectively to obtain a truth determination threshold, a gray threshold, and a false determination threshold; perform the above steps at least once to calculate and store the set of coordinates and feature point values POI1 of at least one set of feature points from at least two sample images and the corresponding at least one truth determination threshold, at least one gray threshold, and at least one false determination threshold, so as to calculate the number of truth determination times and the number of false determination times according to the relationship between the number of similar points between the image of the printed matter to be detected and the sample image and the sizes of the at least one truth determination threshold, the at least one gray threshold, and the at least one false determination threshold, and compare with a truth determination preset value and a false determination preset value to determine the authenticity of the printed matter to be detected.
[0043] Preferably, the feature point value is an attribute value of the feature point image. When the attribute value is a gray value, the gray value is obtained through the formula CV = aR + bG + cB, where CV is the gray value, R, G, and B are color channels, and a, b, and c are gray ratios, and a + b + c = 1.
[0044] Preferably, each image sampling in the second to mth image samplings includes continuously collecting u frames of images. The first sampling unit 1 and the second sampling unit 2 are further used to: calculate the coordinates and the set of feature point values POI1 of the feature points of each frame of the u frames of images collected through a feature point recognition algorithm; use the image with the largest number of feature points in the POI1 as the sample image of the current sampling.
[0045] Preferably, the processing unit 3 is configured to: compare the feature point values of each pair of feature points with the closest positions in two sample images, and when the comparison result is within the threshold range, determine the compared feature points as similar points, so as to obtain the number of similar points of the two compared images. The comparison method includes any one of taking the absolute value difference, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF, and PSNR of the feature point values; perform the above steps for each pair of sample images to obtain the at least one number of similar points.
[0046] The embodiments of the printed matter image authenticity determination system described above are similar to the embodiments of the printed matter image authenticity determination method described above, and will not be elaborated here.
[0047] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or multiple blocks.
[0049] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or multiple blocks.
[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0051] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0052] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0053] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0054] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the presence of another identical element in the process, method, commodity or device including the element.
[0055] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for determining the authenticity of a printed image, characterized in that: The method comprises: Performing a first image sampling on the detection area of the image printed on the first genuine product to obtain a first sample image and a detection area mask; According to the detection area mask, performing second to m-th image sampling on the detection areas of the images printed on the first to n-th genuine products to obtain second to m-th sample images; Calculate the coordinates of the feature points of each sample image from the first to the mth sample images and the set POI1 of feature point values by using a feature point recognition algorithm; According to the coordinates of the feature points of each sample image and the set of feature point values POI1, compare every two sample images from the first to the mth sample images to obtain at least one number of similar points; Multiplying the largest number of similar points among the at least one number of similar points by the true determination coefficient, the gray coefficient, and the false determination coefficient, respectively, to obtain a true determination threshold, a gray threshold, and a false determination threshold; Execute the above steps at least once to calculate and store a set POI1 of coordinates and feature point values of at least one group of feature points from at least two sample images and the corresponding at least one true judgment threshold, at least one gray threshold and at least one false judgment threshold, so as to calculate the number of true judgments and the number of false judgments according to the number of similarities between the image of the printed product to be detected and the sample image, and the relationship between the at least one true judgment threshold, the at least one gray threshold and the at least one false judgment threshold, and compare them with the true judgment preset value and the false judgment preset value to determine the authenticity of the printed product to be detected.
2. The method for determining the authenticity of a printed matter image according to claim 1, characterized in that: The feature point value is the attribute value of the feature point image. When the attribute value is a grayscale value, the grayscale value is obtained by the formula CV=aR+bG+cB, where CV is the grayscale value, R, G, B are color channels, a, b, c are grayscale ratios, and a+b+c=1.
3. The method for determining the authenticity of a printed matter image according to claim 1, characterized in that: Each of the first to m-th image samplings includes continuously acquiring u frames of images, and the method further includes: The coordinates of the feature points of each frame image in the collected u-frame image and the set POI1 of feature point values are calculated by a feature point recognition algorithm; The image with the largest number of feature points in the POI1 is used as the sample image for the current sampling.
4. The method for determining the authenticity of a printed matter image according to claim 1, characterized in that: The method further includes: The coordinates of the at least one set of feature points and the set of feature point values POI1 and the corresponding at least one true judgment threshold, at least one gray threshold and at least one false judgment threshold are calculated by a hash algorithm to obtain a corresponding feature number; The feature number is associated with the print number of the sampled print.
5. The method for determining the authenticity of a printed matter image according to claim 1, characterized in that: The step of comparing every two sample images from the first to the mth sample images according to the set POI1 of the coordinates of the feature points and the feature point values of each sample image to obtain at least one number of similar points includes: Compare the feature point values of each pair of feature points with the closest positions in the two sample images. When the comparison result is within the threshold range, the compared feature points are judged to be similar points to obtain the number of similar points of the two compared images. The comparison method includes any one of the absolute value difference, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF and PSNR of the feature point values. The above steps are performed for every two sample images to obtain the at least one number of similar points.
6. The method for determining the authenticity of a printed matter image according to claim 1, characterized in that: The method of calculating the number of true judgments and the number of false judgments based on the number of similar points between the image of the printed product to be detected and the sample image, and the relationship between the at least one true judgment threshold, the at least one gray threshold, and the at least one false judgment threshold, and comparing the numbers with the true judgment preset value and the false judgment preset value to determine the authenticity of the printed product to be detected includes: Calculate the coordinates of the feature points and the feature point value set POI2 of the u-frame image of the printed matter to be detected by a feature point recognition algorithm; According to the coordinates of the feature points of the u-frame image of the printed product to be detected and the feature point value set POI2 and the coordinates of the at least one group of feature points and the feature point value set POI1, each frame image of the printed product to be detected is compared with the sample images corresponding to the coordinates of all feature points and the feature point value set POI1. When the number of similar points is greater than or equal to the corresponding true judgment threshold, the number of true judgments is increased by 1, and the comparison of the current frame of the printed product to be detected is completed; in the comparison of any frame image of the printed product to be detected with all sample images, if the number of similar points is greater than the corresponding false judgment threshold and less than or equal to the corresponding gray threshold, the number of false judgments is increased by 1, until the number of true judgments is greater than the preset value for true judgment, the printed product to be detected is determined to be true; or when the number of false judgments is greater than the preset value for false judgment, the printed product to be detected is determined to be false.
7. A system for determining the authenticity of printed matter images, characterized in that: The system comprises: A first sampling unit, a second sampling unit and a processing unit, wherein: The first sampling unit is used to perform a first image sampling on the detection area of the image printed on the first genuine product to obtain a first sample image and a detection area mask; The second sampling unit is used to perform second to m-th image sampling on the detection areas of the images printed on the first to n-th genuine products according to the detection area mask to obtain second to m-th sample images; A processing unit for: Calculate the coordinates of the feature points of each sample image from the first to the mth sample images and the set POI1 of feature point values by using a feature point recognition algorithm; According to the coordinates of the feature points of each sample image and the set of feature point values POI1, compare every two sample images from the first to the mth sample images to obtain at least one number of similar points; Multiplying the largest number of similar points among the at least one number of similar points by the true determination coefficient, the gray coefficient, and the false determination coefficient, respectively, to obtain a true determination threshold, a gray threshold, and a false determination threshold; Execute the above steps at least once to calculate and store a set POI1 of coordinates and feature point values of at least one group of feature points from at least two sample images and the corresponding at least one true judgment threshold, at least one gray threshold and at least one false judgment threshold, so as to calculate the number of true judgments and the number of false judgments according to the number of similarities between the image of the printed product to be detected and the sample image, and the relationship between the at least one true judgment threshold, the at least one gray threshold and the at least one false judgment threshold, and compare them with the true judgment preset value and the false judgment preset value to determine the authenticity of the printed product to be detected.
8. The printed matter image authenticity determination system according to claim 7, characterized in that: The feature point value is the attribute value of the feature point image. When the attribute value is a grayscale value, the grayscale value is obtained by the formula CV=aR+bG+cB, where CV is the grayscale value, R, G, B are color channels, a, b, c are grayscale ratios, and a+b+c=1.
9. The system for determining the authenticity of printed matter images according to claim 7, characterized in that: Each of the first to m-th image samplings includes continuously acquiring u frames of images, and the first sampling unit and the second sampling unit are further used for: The coordinates of the feature points of each frame image in the collected u-frame image and the set POI1 of feature point values are calculated by a feature point recognition algorithm; The image with the largest number of feature points in the POI1 is used as the sample image for the current sampling.
10. The system for determining authenticity of printed matter images according to claim 7, characterized in that: The processing unit is used for: Compare the feature point values of each pair of feature points with the closest positions in the two sample images. When the comparison result is within the threshold range, the compared feature points are judged to be similar points to obtain the number of similar points of the two compared images. The comparison method includes any one of the absolute value difference, square difference, Euclidean distance, Manhattan distance, Chebyshev distance, difference, normalized difference, gradient comparison, VIF and PSNR of the feature point values. The above steps are performed for every two sample images to obtain the at least one number of similar points.
Citation Information
Patent Citations
A dual-channel two-dimensional code and a control method for anti-copying and information hiding
CN114580589B
Anti-copying background anti-counterfeiting method and device based on micro-dot codes
CN115423063B
Small-area fingerprint image splicing method and device, equipment and storage medium
CN111429359A
Defect image detection method and system, intelligent terminal and medium
CN114332092A
Anti-copying shading anti-counterfeiting method and device based on micro-dot codes
CN115423063A