Method, device, equipment and storage medium for identifying authenticity of articles

By identifying the characteristics of the target item, dividing the identification area and analyzing the density distribution, combining pixel block matching and correction, the problem of insufficient accuracy of authenticity identification in the prior art is solved, and a more efficient and reliable identification effect is achieved.

CN118864902BActive Publication Date: 2025-02-07TURING SHENSHI (BEIJING) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410898118.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2025-02-07
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

In the identification of authenticity of items, due to the influence of factors such as lighting, occlusion, angle, and scale, it is difficult to accurately identify key identification points of images in the image, resulting in insufficient identification accuracy.

Method used

By obtaining the first image of the target object, identifying the first feature of the target object, determining the first identification area, and dividing the feature type by analyzing the density distribution of the sub-region, and calculating the number of features to determine the authenticity of the item. If the number of features is less than the threshold, the average value of the pixel difference value is calculated to determine the authenticity of the item through pixel block matching and correction.

Benefits of technology

It improves the accuracy and efficiency of authenticity identification of items, reduces misjudgment caused by a single feature, enhances the reliability of the identification results, and can more accurately identify small differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864902B_ABST
    Figure CN118864902B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for identifying the authenticity of an article, belonging to the field of image processing technology, and comprising: obtaining a first image, a second image and a third image of a target article; identifying a first feature of the target article based on the first image, obtaining a first density of each sub-area in a first identification area, and dividing the feature type of the first feature, and determining whether the target article is a counterfeit or a genuine article based on the feature type; when the target article is not a counterfeit, intercepting a second identification area and a first standard area in the first image and the third image respectively, obtaining an optimal matching block, calculating a first attribute value and a second attribute value and correcting them to obtain a first correction value, correcting the pixel position in the optimal matching block based on the first correction value to form a second standard area, calculating the average value of the pixel difference between all the second identification areas and the second standard areas, and determining the authenticity of the target article. The present invention improves the accuracy of article identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and specifically relates to a method, device, equipment and storage medium for identifying the authenticity of an object. Background Art

[0002] With the rapid development of science and technology and the globalization of trade, various commodities and services are becoming increasingly abundant, but this is also accompanied by the proliferation of counterfeit and shoddy products. Therefore, developing an efficient and accurate method for identifying the authenticity of items is of great significance to maintaining market order.

[0003] With the development of cloud computing and big data technology, more and more object authenticity identification data are stored in the cloud. These data include images, videos, feature parameters, etc. of the objects, which can be used to train machine learning models, optimize identification algorithms, etc. For example, a Chinese patent application with publication number CN108520285B proposes an object identification method, including: obtaining multiple images taken of the object to be identified, each image including at least one target identification point; according to multiple convolutional neural network models corresponding to at least one target identification point trained, respectively identifying the multiple images to obtain a single point score corresponding to each target identification point; according to the weights obtained from the training set test, weighted summing the single point scores of multiple target identification points to obtain a total score; and identifying the authenticity of the object according to the single point score and / or the total score.

[0004] The above-mentioned prior art uses a convolutional neural network to identify target identification points describing objects in each image, constructs an evaluation mechanism, and determines the authenticity of the object by evaluating the recognition results. However, in actual applications, images may be affected by various factors such as lighting, occlusion, angle, scale, etc. These factors may cause the pixels of the target identification points to change, and it is impossible to accurately identify the positions of key identification points of the image, such as textures, lines, and marks. Therefore, a method for identifying the authenticity of an object is needed to improve the accuracy of identification. Summary of the invention

[0005] To solve the above problems, the present invention provides a method, device, equipment and storage medium for identifying the authenticity of an object to solve the problems in the prior art.

[0006] In order to achieve the above-mentioned object of the invention, the present invention provides a method for identifying the authenticity of an object, comprising:

[0007] Step S1: acquiring a first image of a target object, identifying the object type of the target object based on the first image, and extracting a plurality of corresponding second images and a third image from a first database based on the object type, wherein the second image is an image of the target object being a counterfeit, and the third image is an image of the target object being an authentic object;

[0008] Step S2: Identify a first feature of the target object, determine a first identification area of ​​the target object based on the first feature, split the first identification area into a plurality of sub-areas, obtain a first density of each of the sub-areas, classify a feature type of the first feature based on the first density, the second image, and the third image, wherein the feature type includes a pseudo type and a true type, calculate a first number of the pseudo types of all the first features, and if the first number is greater than a first threshold, determine that the target object is a counterfeit;

[0009] Step S3: if the first number is less than or equal to a first threshold, intercepting a second identification area and a first standard area in the first image and the third image respectively, obtaining a first pixel block in the second identification area and a plurality of second pixel blocks in the first standard area, screening out an optimal matching block of the first pixel block from the second pixel blocks, and calculating a first attribute value and a second attribute value of the optimal matching block;

[0010] Step S4: Process the first attribute value and the second attribute value to obtain a first correction value of the optimal matching block, correct the pixel position in the optimal matching block based on the first correction value to form a second standard area, calculate the average value of the pixel difference between all the second identification areas and the corresponding second standard areas, and determine the authenticity of the target object based on the average value.

[0011] Further, obtaining the first density of each sub-region comprises the following steps:

[0012] The first feature includes a combination and position distribution of pixel points. The first identification area is located based on the pixel points. A target point is selected in the first identification area. A first area is generated with the target point as the center. The first area is a sector area containing the first feature. The first area is divided into a plurality of sub-areas along the radial direction of the first area using an arc. The sub-areas are areas between adjacent arcs. The first density Ln of pixels of the nth color feature in the sub-areas is calculated based on a first formula. The first formula is: Wherein, S is the area of ​​the sub-region, and Rn is the number of pixels of the nth color feature in the sub-region.

[0013] Furthermore, classifying the feature type of the first feature comprises the following steps:

[0014] Generate a first range and a second range for each of the sub-areas based on the second image and the third image, determine whether each of the first densities is within the corresponding first range, calculate the second number of all the first densities within the first range, and if the second number is greater than a second threshold, determine that the feature type of the first feature is a pseudo type; otherwise, determine whether each of the first density is within the corresponding second range, calculate the third number of all the first densities within the second range, and if the third number is greater than or equal to a third threshold, determine that the feature type of the first feature is a true type.

[0015] Furthermore, screening out the best matching block includes the following steps:

[0016] The first pixel block in the second identification area includes a plurality of first pixels, the second pixel block in the first standard area includes a plurality of second pixels, the first pixel block and the second pixel block include the same number of pixels, and the block difference α between the first pixel block and each of the second pixel blocks is calculated based on a second formula, the second formula being: Among them, u i is the pixel value of the first pixel at position i in the first pixel block, v j is the pixel value of the second pixel at position j in the second pixel block, m is the number of pixels in the first pixel block, k1 is the pixel position number of the first pixel in the first pixel block, k2 is the pixel position number of the first pixel in the second pixel block, and if the block difference is less than a fourth threshold, the corresponding second pixel block is defined as the optimal matching block of the first pixel block.

[0017] Further, calculating the first attribute value and the second attribute value of the optimal matching block includes the following steps:

[0018] Obtain a left adjacent block and a right adjacent block of the optimal matching block, wherein the left adjacent block and the right adjacent block are pixel blocks after the optimal matching block is translated to the left and right by one pixel unit respectively, and calculate a left difference value β(L) and a right difference value β(R) between the left adjacent block and the right adjacent block and the corresponding optimal matching block based on a third formula and a fourth formula, wherein the third formula is: p i is the pixel value of the pixel at position i in the optimal matching block, k is the pixel position number of the first pixel in the optimal matching block, is the pixel value of the pixel at position j in the left adjacent block, and the fourth formula is: The left difference value and the right difference value of the best matching block are defined as the first property value and the second property value of the best matching block, respectively, for the pixel value of the pixel at position j in the right adjacent block.

[0019] Further, obtaining the first correction value of the optimal matching block includes the following steps:

[0020] The left correction value β′ of the pixel at position i in the optimal matching block is calculated based on the fifth formula: i (L), the fifth formula is: in, is the pixel value of the pixel at position i-1 in the left adjacent block of the optimal matching block, is the pixel value of the pixel at position i-1 in the left adjacent block of the first pixel block, min{} is the minimum value function, and the right correction value β′ of the pixel at position i in the optimal matching block is calculated based on the sixth formula i (R), the sixth formula is: in, is the pixel value of the pixel at position i+1 in the right adjacent block of the optimal matching block, is the pixel value of the pixel at position i+1 in the right adjacent block of the first pixel block, and the first correction value γ of the pixel at position i in the optimal matching block is calculated based on the seventh formula, and the seventh formula is:

[0021] Furthermore, correcting the pixel position in the optimal matching block includes the following steps:

[0022] Determine the first correction value of the i-th pixel in the optimal matching block. If the first correction value is greater than a fifth threshold, move the i-th pixel to the right by the first correction value units. If the first correction value is less than the fifth threshold, move the i-th pixel to the left by the first correction value units. Define a pixel area composed of the moved pixels as a second standard area.

[0023] The present invention also provides an article authenticity identification device, which is used to implement the above-mentioned method, and the device mainly comprises:

[0024] an acquisition module, configured to acquire a first image of a target object, identify the object type of the target object based on the first image, and extract a plurality of corresponding second images and a third image from a first database based on the object type, wherein the second image is an image of the target object as a counterfeit, and the third image is an image of the target object as an authentic object;

[0025] a division module, configured to identify a first feature of the target object, determine a first identification region of the target object based on the first feature, divide the first identification region into a plurality of sub-regions, obtain a first density of each of the sub-regions, divide a feature type of the first feature based on the first density, the second image, and the third image, wherein the feature type includes a pseudo type and a true type, calculate a first number of the pseudo types of the feature type among all the first features, and determine that the target object is a counterfeit if the first number is greater than a first threshold;

[0026] a screening module, configured to, if the first number is less than or equal to a first threshold, intercept a second identification area and a first standard area in the first image and the third image respectively, obtain a first pixel block in the second identification area and a plurality of second pixel blocks in the first standard area, screen out an optimal matching block of the first pixel block from the second pixel blocks, and calculate a first attribute value and a second attribute value of the optimal matching block;

[0027] A determination module is used to process the first attribute value and the second attribute value to obtain a first correction value of the optimal matching block, correct the pixel position in the optimal matching block based on the first correction value to form a second standard area, calculate the average value of the pixel difference between all the second identification areas and the corresponding second standard areas, and determine the authenticity of the target object based on the average value.

[0028] The present invention also provides a device, which is used to implement the above method, comprising: a processor, a memory and a communication bus, wherein the processor and the memory communicate with each other through the communication bus;

[0029] The memory is used to store computer programs;

[0030] The processor is used to execute the program stored in the memory to implement the method described above.

[0031] The present invention also provides a computer storage medium, which stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned method.

[0032] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0033] The present invention obtains a first image of a target object, identifies a first feature of the target object, quickly determines a first identification area of ​​the target object based on the first feature, analyzes the density distribution of various color feature pixels of each sub-area in the first identification area, and determines the feature type of the first feature, thereby quickly determining that the target object is a counterfeit, focusing on important parts of the target object in a targeted manner, and improving the efficiency of identifying the authenticity of the object; and when the first number is less than a first threshold, the second identification area of ​​the first image is obtained, and a comprehensive analysis of the target object is performed to reduce the possible misjudgment caused by a single feature and improve the reliability of identification.

[0034] A first standard area is set in the third image in which the target object is authentic, and the best matching block, that is, the most similar pixel block, to the first pixel block in the second identification area is screened out in the first standard area, and the sub-pixel position of each pixel in the best matching block is determined to improve the positioning accuracy of each pixel. The authenticity of the target object is determined by obtaining the average value of the pixel difference at the same sub-pixel position in the second identification area and the second standard area. This improvement in accuracy enables more accurate identification of tiny differences when identifying the authenticity of the target object, thereby improving the accuracy of the identification result. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart of the method for identifying the authenticity of an article of the present invention;

[0036] Figure 2 The optimal matching block screening graph of the present invention;

[0037] Figure 3 The figure is a structural diagram of the device for identifying the authenticity of an article of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0039] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0040] like Figure 1 As shown, a method for identifying the authenticity of an object includes:

[0041] S1: Acquire a first image of a target object, identify the object type of the target object based on the first image, and extract corresponding multiple second images and third images from a first database based on the object type, wherein the second image is an image of the target object as a counterfeit, and the third image is an image of the target object as an authentic object.

[0042] Specifically, the target items in the present invention, such as luxury goods, include high-end brand clothing, bags, and watches. To ensure that the feature points in the target items can be accurately identified, it is necessary to select different shooting angles according to different feature points, based on image recognition technology, such as convolutional neural networks, adversarial neural networks to identify the type of target items, determine what brand and category of luxury goods the target items belong to, and thus find the specific brand, style, and shape features of the target item in the database, and obtain multiple images of the target item when it is a counterfeit and an authentic item as the second image and the third image.

[0043] S2: Identify a first feature of the target object, determine a first identification area of ​​the target object based on the first feature, split the first identification area into multiple sub-areas, obtain a first density of each sub-area, divide the feature type of the first feature based on the first density, the second image and the third image, the feature type includes a pseudo type and a true type, calculate a first number of all first features whose feature type is a pseudo type, and if the first number is greater than a first threshold, determine that the target object is a counterfeit.

[0044] Specifically, the first feature of the target item, such as brand marks and logos, patterns, unique lines and digital watermarks, etc., is identified based on image recognition technology. The position of the first feature in the first image is set according to the position. Each first feature corresponds to a first identification area. If there are 5 first features in the target item, the first feature whose feature type is identified as a pseudo feature is 1, and the first threshold is set to 0. As long as one or more first features are pseudo features, the target item is judged to be a counterfeit. By setting the first identification area, it is possible to directly determine whether the target item is a genuine or counterfeit, thereby improving the efficiency of identifying the authenticity of the item. If the feature types of the 5 first features are all true features, it can be preliminarily determined that the item is not a counterfeit. However, in order to ensure the reliability of the identification result, the present invention also conducts a comprehensive analysis of the target item in subsequent steps.

[0045] S3: If the first number is less than or equal to the first threshold, intercept the second identification area and the first standard area in the first image and the third image respectively, obtain the first pixel block in the second identification area and multiple second pixel blocks in the first standard area, filter out the best matching block of the first pixel block from the second pixel blocks, and calculate the first attribute value and the second attribute value of the best matching block.

[0046] Specifically, if the first number is less than or equal to the first threshold, that is, all the first features in the target object are true features, a second identification area is intercepted in the first image, and the second identification area is a square or rectangular area. It is assumed that the second identification area is an image area containing 5*5 pixels. A first standard area is intercepted in the third image in which the target object is authentic. The first standard area contains the same number of pixels as the second identification area, and is an image area at the same position of the target object; the first pixel block is a combination of multiple adjacent pixels in the second identification area, and can be an image area composed of 3*3 or 2*2. It is assumed that the first pixel block is a 3*3 image area located at the center of the second identification area. The second pixel block is similar to the first pixel block. The best matching block of the first pixel block is screened out from the second pixel block, wherein the best matching block is the second pixel block with the highest similarity to the first pixel block. By screening out the best matching block, the area portion most similar to the second identification area can be determined.

[0047] In order to improve the image resolution, the comparison should be performed at a finer accuracy than the pixel level, that is, at the sub-pixel level. In the process of matching the second identification area and the first standard area, the best matching block of the first pixel block in the first standard area is first determined. The best matching block is only an approximate matching position. The first attribute value and the second attribute value represent the difference between the pixels in the best matching block and the left adjacent blocks and the right adjacent blocks at the sub-pixel level, thereby obtaining the pixel position difference value accurate to decimal points.

[0048] S4: Process the first attribute value and the second attribute value to obtain a first correction value of the best matching block, correct the pixel position in the best matching block based on the first correction value to form a second standard area, calculate the average value of the pixel difference between all the second identification areas and the corresponding second standard areas, and determine the authenticity of the target object based on the average value.

[0049] Specifically, the distortion of the camera device, lighting, angle, background and other environmental factors may affect the acquisition of the image and the matching of the first pixel block with the optimal matching block, thereby causing errors in the first attribute value and the second attribute value. It is necessary to correct the acquired first attribute value and the second attribute value to reduce the influence of various factors on the matching degree calculation, improve the accuracy and reliability of the image matching calculation, and correct the pixel position in the optimal matching block based on the obtained first correction value to obtain a more accurate sub-pixel position. The sub-pixel positions constitute the second standard area, and the average value of the pixel difference at the sub-pixel level between each first pixel block in the second identification area and the corresponding optimal pixel block in the second standard area is calculated. If the average value is less than a preset threshold, such as 0.001, it is determined that the first pixel block and the optimal pixel block are within a reasonable error range, that is, the target object is likely to be authentic in the first pixel block area. This method calculates the average values ​​of all regions of the target object. When the average values ​​of all regions meet the conditions, the target object is judged to be authentic. The difference between the final average value and the preset threshold value can also be calculated. The smaller the difference, the greater the possibility that the target object is authentic. If the average value of one region does not meet the conditions, the target object is a counterfeit. The conclusion can be drawn directly without continuing to judge other regions, thereby improving the efficiency and accuracy of authenticity identification of the target object.

[0050] As a preferred technical solution of the present invention, obtaining the first density of each sub-region includes the following steps:

[0051] The first feature includes the combination and position distribution of pixel points. The first identification area is located based on the pixel points. A target point is selected in the first identification area. The first area is generated with the target point as the center. The first area is a fan-shaped area containing the first feature. The first area is divided into multiple sub-areas along the radial direction of the first area using arcs. The sub-areas are areas between adjacent arcs. The first density Ln of the pixels of the nth color feature in the sub-area is calculated based on the first formula. The first formula is: Wherein, S is the area of ​​the sub-region, and Rn is the number of pixels of the nth color feature in the sub-region.

[0052] Specifically, taking the first feature such as a brand logo as an example, assume that it is a circular pattern G, which is composed of pixels of multiple colors and distributed in different positions. First, define the first identification area according to the position of the pattern G. The target point is an identifiable pixel in the pattern G. For example, the pixel point of the green pixel at the outermost edge of the pattern G is the target point. Based on image recognition technology, the pixel point of the green pixel and the bounding box of the pattern G are identified to generate a first area including all the pixels of the image G. The first area is a fan-shaped area, and the first area is divided into multiple sub-areas along the radial direction of the first area using arcs, and the distance between each arc can be different.

[0053] Assuming that pattern A is composed of pixels of 6 colors, using the first formula: The first density Ln of the pixels of the color feature in each sub-region is calculated. For example, sub-region 1 contains red, blue and white, and the calculated first densities are 0.3, 0.2 and 0.5.

[0054] Classifying the feature type of the first feature includes the following steps:

[0055] A first range and a second range of each sub-area are generated based on the second image and the third image, and it is determined whether each first density is within the corresponding first range, and the second number of all first densities within the first range is calculated. If the second number is greater than the second threshold, the feature type of the first feature is determined to be a pseudo type. Otherwise, it is determined whether each first density is within the corresponding second range, and the third number of all first densities within the second range is calculated. If the third number is greater than or equal to the third threshold, the feature type of the first feature is determined to be a true type.

[0056] Specifically, the first range is the range of the first density of each sub-region obtained when the target item is a counterfeit (multiple second images), and the first range includes the density range corresponding to each color pixel in the sub-region. For example, the first range of sub-region 1 includes the range area corresponding to pixels of three color features, namely red, blue and white. The second range is the range of the first density of each sub-region when the target item is a genuine item. Assuming that the first densities of pixels of the three color features in sub-region 1 are all within the first range, the second number of first densities in all sub-regions within the first range is calculated. If the second number is greater than the second threshold, the second threshold can be set to 0, that is, if there is a first density corresponding to a color pixel within the first range, the first feature is determined to be a fake type, thereby improving the identification efficiency.

[0057] Otherwise, continue to compare with the second range, calculate the third number of all first densities within the second range, if the third number is greater than or equal to the third threshold, the third threshold can be set to the sum of all color pixel types in the sub-area, for example, there are 5 sub-areas, there are 3, 4, 5, 5, and 3 color pixels respectively, and the total is 20, then the third threshold is set to 20. If the third number is equal to 20, it means that all first densities constituting the first feature are within the second range, and the feature type of the first feature is determined to be the true type. By comparing the first image with the authentic image and the counterfeit image respectively, the accuracy of the identification result is increased.

[0058] Screening out the best matching block includes the following steps:

[0059] The first pixel block in the second identification area includes a plurality of first pixels, the second pixel block in the first standard area includes a plurality of second pixels, the first pixel block and the second pixel block include the same number of pixels, and the block difference α of the first pixel block and each second pixel block is calculated based on a second formula, the second formula is: Among them, u i is the pixel value of the first pixel at position i in the first pixel block, v j is the pixel value of the second pixel at position j in the second pixel block, m is the number of pixels in the first pixel block, k1 is the pixel position number of the first pixel in the first pixel block, k2 is the pixel position number of the first pixel in the second pixel block, and if the block difference is less than the fourth threshold, the corresponding second pixel block is defined as the optimal matching block of the first pixel block.

[0060] Specifically, Figure 2 As shown, it is the optimal matching block screening diagram, grid A is the second identification area, grid B is the first standard area, the shaded part in grid A is the first pixel block, and the shaded part in grid B is the second pixel block. For example, the sub-pixel block L1 located in the first row of the first pixel block: 1-4-3 (replaced by pixel values) and the sub-pixel block L2 located in the first row of the second pixel block: 1-4-3, where the pixel position number corresponding to the first pixel point 1 of the sub-pixel block L1 is k1=2 (for convenience, the pixel position number starts from 1), and similarly k2=2, the number of pixels in the sub-pixel block L1 is m=3, based on the second formula The block difference between the sub-pixel block L1 and the sub-pixel block L2 is calculated, and α=0 is obtained. By calculating the block difference values ​​between the second pixel block and all the sub-pixel blocks in the first pixel block, the overall block difference between the first pixel block and the second pixel block is obtained. α=0, if the block difference is less than a fourth threshold, for example, 0.2, the second pixel block corresponding to the shaded portion in the first standard area is defined as the optimal matching block of the first pixel block.

[0061] Calculating the first attribute value and the second attribute value of the best matching block includes the following steps:

[0062] Obtain the left adjacent block and the right adjacent block of the best matching block, where the left adjacent block and the right adjacent block are pixel blocks after the best matching block is translated to the left and right by one pixel unit respectively, and calculate the left difference value β(L) and the right difference value β(R) between the left adjacent block and the right adjacent block and the corresponding best matching block based on the third formula and the fourth formula, where the third formula is: p i is the pixel value of the pixel at position i in the best matching block, k is the pixel position number of the first pixel in the best matching block, is the pixel value of the pixel at position j in the left adjacent block, and the fourth formula is: is the pixel value of the pixel at position j in the right adjacent block, and the left difference value and the right difference value of the best matching block are respectively defined as the first attribute value and the second attribute value of the best matching block.

[0063] Specifically, continue to refer to Figure 2 , taking the sub-pixel block L2 located in the first row of the optimal matching block as an example, the left adjacent blocks of the sub-pixel block L2 are 2-1-4, the right adjacent blocks are 4-3-2, the pixel position number of the first pixel in the optimal matching block is k=2, and the left difference value and the right difference value of the sub-pixel block L2 are calculated according to the third formula and the fourth formula to obtain According to the above method, the left difference value and the right difference value of all sub-pixel blocks in the optimal matching block are calculated, and the set of left difference values ​​is defined as the first attribute value of the optimal matching block, and the set of right difference values ​​is defined as the second attribute value of the optimal matching block.

[0064] Obtaining the first correction value of the optimal matching block includes the following steps:

[0065] The left correction value β′ of the pixel at position i in the optimal matching block is calculated based on the fifth formula i (L), the fifth formula is: in, is the pixel value of the pixel at position i-1 in the left adjacent block of the best matching block, is the pixel value of the pixel at position i-1 in the left adjacent block of the first pixel block, min{} is the minimum value function, and the right correction value β′ of the pixel at position i in the optimal matching block is calculated based on the sixth formula i (R), the sixth formula is: in, is the pixel value of the pixel at position i+1 in the right adjacent block of the best matching block, is the pixel value of the pixel at position i+1 in the right adjacent block of the first pixel block, and the first correction value γ of the pixel at position i in the optimal matching block is calculated based on the seventh formula, and the seventh formula is:

[0066] Specifically, the position i of the first pixel in the sub-pixel block L2 located in the first row of the optimal matching block is 2, and the pixel value is 1. This pixel is defined as pixel Z. The left correction value and the right correction value of pixel Z are calculated based on the fifth formula and the sixth formula. The left correction value β′2(L)=11-min{(1-2) 2 ,(1-1) 2}=11,right correction value β′2(R)=11-min{(1-4) 2 ,(1-4)2}=2, first correction value The method for calculating the first correction value is to correct the position using a second-order parabola fitting method to obtain the sub-pixel level position of pixel Z, thereby achieving a positioning accuracy of less than one pixel unit. Compared with whole pixel positioning, this greatly improves the accuracy of measurement and positioning.

[0067] Correcting the pixel position in the best matching block includes the following steps:

[0068] Determine the first correction value of the i-th pixel in the optimal matching block. If the first correction value is greater than the fifth threshold, move the i-th pixel to the right by the first correction value units. If the first correction value is less than the fifth threshold, move the i-th pixel to the left by the first correction value units. Define the pixel area composed of the moved pixels as the second standard area.

[0069] Specifically, because the first correction value γ of pixel Z in sub-pixel block L2 is -0.11, the fifth threshold is set to 0. If the first correction value is less than 0, it means that pixel Z needs to be moved 0.11 units to the left, that is, the pixel position of pixel Z in the optimal matching block is 2-0.11=1.89. The pixel area composed of each pixel after the corrected position is defined as the second standard area. The average value of the pixel difference between the second identification area and the same position in the second standard area is calculated. If the average value is less than the preset threshold, for example 0.05, it means that the similarity between the first pixel block and the optimal pixel block in the second identification area and the second standard area is high, and the target object is likely to be authentic.

[0070] like Figure 3 As shown, the present invention also provides an article authenticity identification device, which is used to implement the above method, and the device mainly includes:

[0071] The acquisition module is used to acquire a first image of a target object, identify the object type of the target object based on the first image, and extract a plurality of corresponding second images and a third image from a first database based on the object type, wherein the second image is an image of the target object as a counterfeit, and the third image is an image of the target object as an authentic object.

[0072] A division module is used to identify a first feature of a target object, determine a first identification area of ​​the target object based on the first feature, divide the first identification area into a plurality of sub-areas, obtain a first density of each sub-area, divide a feature type of the first feature based on the first density, a second image, and a third image, wherein the feature type includes a pseudo type and a true type, calculate a first number of pseudo-type feature types among all first features, and if the first number is greater than a first threshold, determine that the target object is a counterfeit.

[0073] A screening module is used for, if the first number is less than or equal to a first threshold, intercepting a second identification area and a first standard area in the first image and a third image respectively, obtaining a first pixel block in the second identification area and a plurality of second pixel blocks in the first standard area, screening out an optimal matching block of the first pixel block from the second pixel blocks, and calculating a first attribute value and a second attribute value of the optimal matching block.

[0074] The determination module is used to process the first attribute value and the second attribute value to obtain a first correction value of the best matching block, correct the pixel position in the best matching block based on the first correction value to form a second standard area, calculate the average value of the pixel difference between all the second identification areas and the corresponding second standard areas, and determine the authenticity of the target object based on the average value.

[0075] In summary, the authenticity identification method, device, equipment and storage medium of the present invention obtain a first image of the target object, identify a first feature of the target object, quickly determine a first identification area of ​​the target object based on the first feature, analyze the density distribution of various color feature pixels in each sub-area in the first identification area, and judge the feature type of the first feature, so as to quickly determine that the target object is a counterfeit, focus on the important parts of the target object in a targeted manner, and improve the authenticity identification efficiency of the object; and when the first number is less than the first threshold, obtain the second identification area of ​​the first image, conduct a comprehensive analysis of the target object, reduce the misjudgment that may be caused by a single feature, and improve the reliability of identification.

[0076] A first standard area is set in the third image in which the target object is authentic, and the best matching block, that is, the most similar pixel block, to the first pixel block in the second identification area is screened out in the first standard area, and the sub-pixel position of each pixel in the best matching block is determined to improve the positioning accuracy of each pixel. The authenticity of the target object is determined by obtaining the average value of the pixel difference at the same sub-pixel position in the second identification area and the second standard area. This improvement in accuracy enables more accurate identification of tiny differences when identifying the authenticity of the target object, thereby improving the accuracy of the identification result.

[0077] The present invention also provides a device for implementing the above method, comprising: a processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;

[0078] Memory for storing computer programs;

[0079] The processor is used to execute the program stored in the memory to implement the above method.

[0080] The present invention also provides a computer storage medium, which stores program instructions. When the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above method.

[0081] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0082] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0083] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0084] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0085] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying the authenticity of an object, characterized in that: The method comprises the following steps: Step S1: acquiring a first image of a target object, identifying the object type of the target object based on the first image, and extracting a plurality of corresponding second images and a third image from a first database based on the object type, wherein the second image is an image of the target object being a counterfeit, and the third image is an image of the target object being an authentic object; Step S2: identifying a first feature of the target object based on the first image, the first feature including a combination and position distribution of pixels, determining a first identification region of the target object based on the first feature, dividing the first identification region into a plurality of sub-regions, obtaining a first density of each sub-region, the first density being a density value of pixels corresponding to each color feature in the sub-region, dividing a feature type of the first feature based on the first density, the second image and the third image, the feature type including a pseudo type and a true type, calculating a first number of all the first features whose feature type is the pseudo type, and determining that the target object is a counterfeit if the first number is greater than a first threshold; The step of classifying the feature type of the first feature comprises the following steps: generating a first range and a second range of each of the sub-areas based on the second image and the third image, judging whether each of the first densities is within the corresponding first range, calculating a second number of all the first densities within the first range, and judging that the feature type of the first feature is a pseudo type if the second number is greater than a second threshold, otherwise judging whether each of the first density is within the corresponding second range, calculating a third number of all the first densities within the second range, and judging that the feature type of the first feature is a true type if the third number is greater than or equal to a third threshold; Step S3: if the first number is less than or equal to a first threshold, intercepting a second identification area and a first standard area in the first image and the third image respectively, obtaining a first pixel block in the second identification area and a plurality of second pixel blocks in the first standard area, selecting an optimal matching block of the first pixel block from the second pixel blocks, and calculating a first attribute value and a second attribute value of the optimal matching block; The process of selecting the best matching block includes the following steps: The first pixel block in the second identification area includes a plurality of first pixels, the second pixel block in the first standard area includes a plurality of second pixels, the first pixel block and the second pixel block include the same number of pixels, and the block difference between the first pixel block and each of the second pixel blocks is calculated based on a second formula. , the second formula is: ,in, The position of the first pixel block is the pixel value of the first pixel, The position of the second pixel block is is the pixel value of the second pixel, m is the number of pixels in the first pixel block, is the pixel position number of the first pixel in the first pixel block, numbering a pixel position of a first pixel in the second pixel block, and if the block difference is less than a fourth threshold, defining the corresponding second pixel block as a best matching block of the first pixel block; Calculating the first attribute value and the second attribute value of the optimal matching block comprises the following steps: Obtain a left adjacent block and a right adjacent block of the optimal matching block, wherein the left adjacent block and the right adjacent block are pixel blocks after the optimal matching block is translated to the left and right by one pixel unit respectively, and calculate the left difference value between the left adjacent block and the right adjacent block and the corresponding optimal matching block based on the third formula and the fourth formula and right difference , wherein the third formula is: , The position of the optimal matching block is The pixel value of the pixel, is the pixel position number of the first pixel in the best matching block, The position in the left adjacent block is The pixel value of the pixel, the fourth formula is: , The position of the right adjacent block is The pixel values ​​of the pixels of the optimal matching block are respectively defined as the first attribute value and the second attribute value of the optimal matching block; Step S4: Processing the first attribute value and the second attribute value to obtain a first correction value of the optimal matching block, correcting the pixel position in the optimal matching block based on the first correction value to form a second standard area, calculating an average value of pixel difference between the second identification area and the corresponding second standard area, and determining the authenticity of the target object based on the average value; Wherein, obtaining the first correction value of the optimal matching block comprises the following steps: The position in the optimal matching block is calculated based on the fifth formula: The left correction value of the pixel , the fifth formula is: ,in, The position of the left adjacent block of the optimal matching block is The pixel value of the pixel, The position of the left adjacent block of the first pixel block is The pixel value of the pixel, To find the minimum function, the position in the optimal matching block is calculated based on the sixth formula: The right correction value of the pixel , the sixth formula is: ,in, The position of the right adjacent block of the optimal matching block is The pixel value of the pixel, The position of the right adjacent block of the first pixel block is The pixel value of the pixel at the position of the optimal matching block is calculated based on the seventh formula The first correction value of the pixel , the seventh formula is: ; Correcting the pixel position in the optimal matching block includes the following steps: Determine the first If the first correction value is greater than a fifth threshold, the first correction value is set to pixels are moved right by the first correction value units, and if the first correction value is less than the fifth threshold, the first correction value is moved right by the first correction value units. The pixels are moved left by the first correction value units, and a pixel area composed of the moved pixels is defined as a second standard area.

2. The method according to claim 1, characterized in that Obtaining the first density of each sub-region comprises the following steps: The first identification area is located based on the pixel point, a target point is selected in the first identification area, a first area is generated with the target point as the center, the first area is a sector area including the first feature, the first area is divided into a plurality of sub-areas along the radial direction of the first area using an arc, the sub-areas are areas between adjacent arcs, and the first density of pixels of the nth color feature in the sub-areas is calculated based on the first formula , the first formula is: ,in, is the area of ​​the sub-region, is the number of pixels of the nth color feature in the sub-region.

3. A device for identifying the authenticity of an object, used to implement the method according to any one of claims 1 to 2, characterized in that: The device comprises the following modules: an acquisition module, configured to acquire a first image of a target object, identify the object type of the target object based on the first image, and extract a plurality of corresponding second images and a third image from a first database based on the object type, wherein the second image is an image of the target object as a counterfeit, and the third image is an image of the target object as an authentic object; a division module, for identifying a first feature of the target object based on the first image, the first feature including a combination and position distribution of pixels, determining a first identification area of ​​the target object based on the first feature, dividing the first identification area into a plurality of sub-areas, obtaining a first density of each sub-area, the first density being a density value of pixels corresponding to each color feature in the sub-area, dividing a feature type of the first feature based on the first density, the second image and the third image, the feature type including a pseudo type and a true type, calculating a first number of the feature types of all the first features being the pseudo type, and determining that the target object is a counterfeit if the first number is greater than a first threshold, wherein dividing the feature type of the first feature includes the following steps: generating a first range and a second range of each sub-area based on the second image and the third image, determining whether each of the first densities is within the corresponding first range, calculating a second number of all the first densities within the first range, and determining that the feature type of the first feature is a pseudo type if the second number is greater than a second threshold, otherwise determining whether each of the first densities is within the corresponding second range, calculating a third number of all the first densities within the second range, and determining that the feature type of the first feature is a true type if the third number is greater than or equal to a third threshold; a screening module, configured to, if the first number is less than or equal to a first threshold, respectively intercept a second identification area and a first standard area in the first image and the third image, obtain a first pixel block in the second identification area and a plurality of second pixel blocks in the first standard area, screen out an optimal matching block of the first pixel block from the second pixel block, and calculate a first attribute value and a second attribute value of the optimal matching block, wherein screening out the optimal matching block comprises the following steps: the first pixel block in the second identification area includes a plurality of first pixels, the second pixel block in the first standard area includes a plurality of second pixels, the first pixel block and the second pixel block include the same number of pixels, and the block difference degree between the first pixel block and each of the second pixel blocks is calculated based on a second formula The second formula is: ,in, The position of the first pixel block is the pixel value of the first pixel, The position of the second pixel block is is the pixel value of the second pixel, m is the number of pixels in the first pixel block, is the pixel position number of the first pixel in the first pixel block, is a pixel position number of the first pixel in the second pixel block, and if the block difference is less than a fourth threshold, the corresponding second pixel block is defined as the optimal matching block of the first pixel block; calculating the first attribute value and the second attribute value of the optimal matching block includes the following steps: obtaining a left adjacent block and a right adjacent block of the optimal matching block, wherein the left adjacent block and the right adjacent block are pixel blocks after the optimal matching block is translated to the left and right by one pixel unit respectively, and calculating the left difference value between the left adjacent block and the right adjacent block and the corresponding optimal matching block based on the third formula and the fourth formula and right difference , wherein the third formula is: , The position of the optimal matching block is The pixel value of the pixel, is the pixel position number of the first pixel in the best matching block, The position in the left adjacent block is The pixel value of the pixel, the fourth formula is: , The position of the right adjacent block is The pixel values ​​of the pixels of the optimal matching block are respectively defined as the first attribute value and the second attribute value of the optimal matching block; The determination module is used to process the first attribute value and the second attribute value to obtain a first correction value of the optimal matching block, correct the pixel position in the optimal matching block based on the first correction value to form a second standard area, calculate the average value of the pixel difference between all the second identification areas and the corresponding second standard areas, and determine the authenticity of the target item based on the average value; wherein obtaining the first correction value of the optimal matching block includes the following steps: calculating the pixel position in the optimal matching block based on the fifth formula The left correction value of the pixel , the fifth formula is: ,in, The position of the left adjacent block of the optimal matching block is The pixel value of the pixel, The position of the left adjacent block of the first pixel block is The pixel value of the pixel, To find the minimum function, the position in the optimal matching block is calculated based on the sixth formula: The right correction value of the pixel , the sixth formula is: ,in, The position of the right adjacent block of the optimal matching block is The pixel value of the pixel, The position of the right adjacent block of the first pixel block is The pixel value of the pixel at the position of the optimal matching block is calculated based on the seventh formula The first correction value of the pixel , the seventh formula is: ; Correcting the pixel position in the optimal matching block includes the following steps: determining the first pixel position in the optimal matching block If the first correction value is greater than a fifth threshold, the first correction value is set to pixels are moved right by the first correction value units, and if the first correction value is less than the fifth threshold, the first correction value is moved right by the first correction value units. The pixels are moved left by the first correction value units, and a pixel area composed of the moved pixels is defined as a second standard area.

4. An object authenticity identification device, used to implement the method according to any one of claims 1-2, characterized in that: include: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the method described in any one of claims 1-2.

5. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Methods, systems, equipment and storage media for identifying items

    CN108520285B

  • Method, device, and equipment for identifying paper currency authenticity and storage medium

    CN107610321A

  • Identification method, temperature measurement method, equipment and storage medium

    CN112154450A