A method, device, equipment and medium for detecting counterfeiting of microscopic coded images

By extracting and analyzing the feature information of microcoded images, combining contour, edge, noise and texture features, the problem of difficulty in identifying complex forged images in the prior art is solved, efficient forged detection is achieved, and information security is enhanced.

CN118941819BActive Publication Date: 2025-01-10SHENZHEN QIANHAI QUANTUM CLOUD TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411426892.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-10
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

Existing micro-encoded image forgery detection technology is difficult to effectively identify complex forgery images. With the advancement of technology, traditional anti-counterfeiting technology is difficult to achieve anti-counterfeiting effects, resulting in threats to information security.

Method used

By identifying the contour points, edge point information and total edge points in the micro-encoded image, contour features, coding area edge features, image noise features and image texture features are extracted, and combined with these features forgery detection is performed to improve detection accuracy.

Benefits of technology

It significantly improves the accuracy of forgery detection of microcoded images, enhances the recognition ability of complex forgery images, ensures stable performance in complex environments, and reduces false detection and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941819B_ABST
    Figure CN118941819B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for detecting forgery of a microscopic coded image, which relates to the field of image detection technology, and includes: respectively identifying contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in a microscopic coded image; for each microscopic coded area, extracting contour features of the microscopic coded area according to the contour point position information of the microscopic coded area; extracting edge features of the coded area of ​​the microscopic coded image according to the size information of the microscopic coded image, the edge point position information of each microscopic coded area and the total number of edge points; extracting image noise features and image texture features of the microscopic coded image; performing forgery detection on the microscopic coded image according to the image noise features, the image texture features, the edge features of the coded area and the contour features of each microscopic coded area, and obtaining a forgery detection result of the microscopic coded image. The present invention improves the accuracy of forgery detection of microscopic coded images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection technology, and in particular to a method, device, equipment and medium for detecting counterfeiting of a microscopic coded image. Background Art

[0002] Microscopic coding patterns form complex images by forming tiny code points of 30 to 50 microns on printed materials. It is an important technology that is widely used in the fields of anti-counterfeiting and traceability. It is difficult to copy and forge and has high security.

[0003] However, with the rapid development of science and technology, illegal copying and counterfeiting technologies are becoming increasingly advanced, posing a severe challenge to the information security of microscopic coded images. Although traditional anti-counterfeiting technologies, such as special inks, watermarks, holograms, etc., have played an anti-counterfeiting role to a certain extent, with the advancement of copying technology, these traditional anti-counterfeiting technologies have been unable to play an effective anti-counterfeiting role. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for detecting counterfeit microscopic coded images, so as to improve the accuracy of detecting counterfeit microscopic coded images.

[0005] In a first aspect, the present invention provides a method for detecting counterfeiting of a microscopic coded image, comprising:

[0006] Respectively identifying contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image;

[0007] For each microscopic coding region, extracting contour features of the microscopic coding region according to contour point position information of the microscopic coding region;

[0008] Extracting edge features of the coding region of the microscopic coding image according to size information of the microscopic coding image, edge point position information of each microscopic coding region and the total number of edge points;

[0009] Extract image noise features and image texture features of micro-encoded images;

[0010] According to the image noise features, image texture features, coding area edge features and contour features of each micro coding area, the micro coding image is subjected to forgery detection to obtain a forgery detection result of the micro coding image.

[0011] In a second aspect, the present invention further provides a device for detecting counterfeiting of a microscopic coded image, comprising:

[0012] A position information acquisition module, used to respectively identify contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image;

[0013] A first feature extraction module is used to extract contour features of each microscopic coding region according to contour point position information of the microscopic coding region;

[0014] A second feature extraction module is used to extract the edge features of the coding area of ​​the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points;

[0015] A third feature extraction module is used to extract image noise features and image texture features of the micro-encoded image;

[0016] The forgery detection module is used to perform forgery detection on the microscopic coded image according to the image noise characteristics, image texture characteristics, edge characteristics of the coded area and contour characteristics of each microscopic coded area, and obtain the forgery detection result of the microscopic coded image.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0018] at least one processor; and

[0019] a memory communicatively coupled to at least one processor; wherein

[0020] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for detecting counterfeiting of a microscopic coded image provided by any embodiment of the present invention.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for detecting counterfeit of a microscopic coded image according to any embodiment of the present invention when executed.

[0022] The embodiment of the present invention respectively identifies the contour point position information, edge point position information and the total number of edge points of at least one microscopic coding area in a microscopic coding image; for each microscopic coding area, according to the contour point position information of the microscopic coding area, extracts the contour feature of the microscopic coding area; according to the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points, extracts the edge feature of the coding area of ​​the microscopic coding image; extracts the image noise feature and the image texture feature of the microscopic coding image; according to the image noise feature, the image texture feature, the edge feature of the coding area and the contour feature of each microscopic coding area, performs forgery detection on the microscopic coding image to obtain a forgery detection result of the microscopic coding image. The present invention extracts the microscopic features of the microscopic coding area, that is, the contour feature and the edge feature, from the microscopic coding image according to the characteristics of the microscopic coding image, and extracts the macroscopic features of the entire microscopic coding image, that is, the image noise feature and the image texture feature; through the image noise feature, the image texture feature, the edge feature of the coding area and the contour feature of each microscopic coding area, the microscopic coding image is detected forged, thereby improving the accuracy of forgery detection on the microscopic coding image.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 1 is a flow chart of a method for detecting counterfeiting of a microscopic coded image provided according to the first embodiment of the present invention;

[0026] Figure 2 1 is a flow chart of a method for detecting counterfeiting of a microscopic coded image provided according to Embodiment 2 of the present invention;

[0027] Figure 3A 1 is a flow chart of a method for detecting counterfeiting of a microscopic coded image provided according to Embodiment 3 of the present invention;

[0028] Figure 3B is a structural schematic diagram of a forgery detection model provided according to Embodiment 3 of the present invention;

[0029] Figure 42 is a schematic diagram of the structure of a device for detecting counterfeiting of a microscopic coded image according to a fourth embodiment of the present invention;

[0030] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing the method for detecting counterfeiting of a microscopic coded image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of microscopic coded images, etc., are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0034] Embodiment 1

[0035] Figure 1 A flowchart of a method for detecting a counterfeit of a microscopic coded image provided in Embodiment 1 of the present invention is provided. This embodiment is applicable to the case of detecting whether a microscopic coded graphic is a counterfeit image. The method can be performed by a device for detecting a counterfeit of a microscopic coded image. The device for detecting a counterfeit of a microscopic coded image can be implemented in the form of hardware and / or software and specifically configured in an electronic device, such as a server.

[0036] See also Figure 1 The forgery detection method of the microscopic coded image shown comprises:

[0037] S101. Respectively identify contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in a microscopic coded image.

[0038] In this embodiment, the microscopic coding area may be composed of at least one microscopic coding point; illustratively, the microscopic coding area may be composed of only one microscopic coding point, that is, the area composed of the single microscopic coding point is the microscopic coding area; the microscopic coding area may also be composed of at least two microscopic coding points, each microscopic coding point in the microscopic coding area is connected, each microscopic coding point is connected to at least one other microscopic coding point in the microscopic coding area, and the area composed of these microscopic coding points is the microscopic coding area. The contour point position information may be the position information of the pixel points on the contour of the microscopic coding area; the edge point position information may be the position information of the pixel points on the edge of the microscopic coding area; the total number of edge points may be the total number of edge points of each microscopic coding area.

[0039] Specifically, contour detection is performed on the microscopic coded image to obtain contour point position information of at least one microscopic coded area in the microscopic coded image; edge detection is performed on the microscopic coded image to obtain edge point position information of at least one microscopic coded area in the microscopic coded image; the number of edge points of each microscopic coded area is counted to obtain the total number of edge points

[0040] In an optional embodiment, the contour of the microscopic coding image can be extracted by a convolution kernel, and the image after contour extraction is binarized to obtain the contour point position information of each microscopic coding area. Exemplarily, the size of the convolution kernel can be [(1, 1, 1, 1), (1, -3, -3, 1), (1, -3, -3, 1), (1, 1, 1, 1)].

[0041] In an optional embodiment, the edge point position information may include but is not limited to the position information of the horizontal edge points and the position information of the vertical edge points; the edge points of the microscopic coded image in the horizontal and vertical directions may be calculated by the Sobel operator (Sobel edge detection operator) to obtain the position information of the horizontal edge points and the position information of the vertical edge points of each microscopic coded area; the number of each horizontal edge point and vertical edge point may be counted to obtain the total number of edge points.

[0042] In an optional embodiment, before respectively identifying the contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image, the microscopic coded image can be grayed to reduce the computational complexity of subsequent forgery detection; the grayed microscopic coded image can be median filtered to reduce the noise in the microscopic coded image; and the microscopic coded image can be enlarged to a preset size to facilitate easier feature extraction from the microscopic coded image.

[0043] S102 . For each microscopic coding region, extract contour features of the microscopic coding region according to contour point position information of the microscopic coding region.

[0044] In this embodiment, the contour feature can be used to characterize the properties of the characteristics of the contour of the microscopic coding region. Exemplarily, the contour feature may include but is not limited to the area surrounded by the contour of the microscopic coding region, the contour perimeter, the contour color, and the contour concavity, etc. Specifically, a certain algorithm is used to extract the contour feature of the microscopic coding region according to the contour point position information of the microscopic coding region for each microscopic coding region. The feature can be represented in the form of a vector or a matrix.

[0045] S103, extracting edge features of the coding area of ​​the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points.

[0046] In this embodiment, the size information of the microscopic coded image may include but is not limited to the length and width of the microscopic coded image. The edge features of the coded region may be used to characterize the edge point features contained in the microscopic coded image; illustratively, the edge features of the coded region may include but are not limited to the edge point density and edge point distribution in the microscopic coded image. Specifically, a certain algorithm is used to extract the edge features of the coded region of the microscopic coded image according to the size information of the microscopic coded image, the edge point position information of each microscopic coded region, and the total number of edge points.

[0047] S104, extracting image noise features and image texture features of the micro-encoded image.

[0048] In this embodiment, the image noise feature may include the mean value of pixel values, the variance of pixel values, the standard deviation of pixel values ​​between all pixels in the micro-encoded image, the mean value, variance and standard deviation of the real part of the frequency domain micro-encoded image, and the mean value, variance and standard deviation of the imaginary part. Image texture features may include, but are not limited to, GLCM (Gray Level Co-occurrence Matrix) features and LBP (Local Binary Pattern) features. Specifically, the pixel value mean, pixel value variance and pixel value standard deviation among all pixel points in the micro-coded image can be calculated; the micro-coded image is converted from the spatial domain to the frequency domain, and the real part mean, real part variance, real part standard deviation, imaginary part mean, imaginary part variance and imaginary part standard deviation in the frequency domain are calculated; the pixel value mean, pixel value variance, pixel value standard deviation, real part mean, real part variance, real part standard deviation, imaginary part mean, imaginary part variance and imaginary part standard deviation are determined as image noise characteristics of the micro-coded image; and a certain algorithm is used to extract the GLCM features and LBP features of the micro-coded image.

[0049] In a specific embodiment, the GLCM features may include contrast features, homogeneity features, energy features, mean features, variance features, entropy features, and correlation features. Texture features with distances of [1, 5, 9, 13] and directions of [0°, 45°, 90°, 135°] may be calculated for the microscopic coded image to obtain 4×4 contrast features, 4×4 homogeneity features, 4×4 energy features, 4×4 mean features, 4×4 variance features, 4×4 entropy features, and 4×4 correlation features.

[0050] S105. Perform forgery detection on the microscopic coded image according to image noise features, image texture features, coded region edge features, and contour features of each microscopic coded region to obtain a forgery detection result of the microscopic coded image.

[0051] Specifically, a certain algorithm can be used to perform forgery detection on the microscopic coded image based on image noise features, image texture features, coding region edge features and contour features of each microscopic coding region to obtain a forgery detection result of the microscopic coded image.

[0052] The embodiment of the present invention respectively identifies the contour point position information, edge point position information and the total number of edge points of at least one microscopic coding area in a microscopic coding image; for each microscopic coding area, according to the contour point position information of the microscopic coding area, extracts the contour feature of the microscopic coding area; according to the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points, extracts the edge feature of the coding area of ​​the microscopic coding image; extracts the image noise feature and the image texture feature of the microscopic coding image; according to the image noise feature, the image texture feature, the edge feature of the coding area and the contour feature of each microscopic coding area, performs forgery detection on the microscopic coding image to obtain a forgery detection result of the microscopic coding image. The present invention extracts the microscopic features of the microscopic coding area, that is, the contour feature and the edge feature, from the microscopic coding image according to the characteristics of the microscopic coding image, and extracts the macroscopic features of the entire microscopic coding image, that is, the image noise feature and the image texture feature; through the image noise feature, the image texture feature, the edge feature of the coding area and the contour feature of each microscopic coding area, the microscopic coding image is detected forged, thereby improving the accuracy of forgery detection on the microscopic coding image.

[0053] Embodiment 2

[0054] Figure 2 This is a flow chart of a method for detecting counterfeiting of a microscopic coded image provided in the second embodiment of the present invention. Based on the technical solutions of the above embodiments, the embodiment of the present invention optimizes and improves the extraction operation of contour features.

[0055] Furthermore, “extracting contour features of the microscopic coding area according to the contour point position information of the microscopic coding area” is refined into “determining the contour area value and the contour perimeter value of the microscopic coding area according to the contour point position information of the microscopic coding area; determining the ratio between the contour perimeter value and the contour area value as the shape complexity of the microscopic coding area; calculating the square value of the contour perimeter, and calculating the similarity of the microscopic coding area to a perfect circle based on the square value of the contour perimeter and the contour area value” to perform forgery detection operations on microscopic coded images.

[0056] It should be noted that, for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions in the aforementioned embodiments.

[0057] See also Figure 2 The forgery detection method of the microscopic coded image shown comprises:

[0058] S201. Respectively identify contour point position information, edge point position information, and the total number of edge points of at least one microscopic coded area in a microscopic coded image.

[0059] S202 . For each microscopic coding region, determine the contour area value and contour perimeter value of the microscopic coding region according to the position information of the contour points of the microscopic coding region.

[0060] In this embodiment, the contour features include contour area, circumscribed circle diameter, circumscribed rectangle aspect ratio, contour shape features and invariant moment features. The contour area can be the area of ​​the area enclosed by the contour; the circumscribed circle diameter can be the diameter of the minimum circumscribed circle of the contour; the circumscribed rectangle aspect ratio can be the ratio between the length and width of the minimum circumscribed rectangle of the contour. The contour shape features may include, but are not limited to, shape complexity and perfect circle similarity. Shape complexity can be used to characterize the complexity of the shape of the contour; the higher the shape complexity, the more complex the shape of the microscopic coding area; the lower the shape complexity, the simpler the shape of the microscopic coding area. Perfect circle similarity can be used to characterize the similarity between the shape of the contour and the perfect circle; the closer the perfect circle similarity is to 1, the closer the shape of the contour is to a perfect circle; otherwise, the less close it is to a perfect circle. The contour area value is also the numerical value of the contour area, and the contour perimeter value is also the numerical value of the perimeter of the contour.

[0061] In a non-forged and clear micro-coded image, the micro-coded points are usually dots, and the micro-coded areas are usually clear and complete circular areas; in a forged micro-coded image, the micro-coded area may be formed by connecting multiple micro-coded points, and its shape is an irregular curve shape, not a perfect circle. By calculating the shape complexity and perfect circle similarity of the micro-coded area, and using the shape complexity and perfect circle similarity as contour features, the accuracy of forgery detection of micro-coded images can be improved.

[0062] S203. Determine the ratio between the contour perimeter value and the contour area value as the shape complexity of the micro-encoding region.

[0063] S204, calculating the square value of the contour perimeter, and calculating the perfect circle similarity of the micro-encoded region based on the square value of the contour perimeter and the contour area value.

[0064] Exemplarily, the perfect circle similarity of the microscopic coding region can be calculated by the following formula:

[0065] ;

[0066] in, Indicates the perfect circle similarity; Indicates the contour area value; Indicates the contour perimeter value.

[0067] S205. Extract edge features of the coding region of the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each microscopic coding region, and the total number of edge points.

[0068] S206, extracting image noise features and image texture features of the micro-coded image.

[0069] S207, performing forgery detection on the microscopic coded image according to the image noise features, the image texture features, the edge features of the coded region and the contour features of each microscopic coded region, and obtaining a forgery detection result of the microscopic coded image.

[0070] Optionally, the microscopic coded image is detected for forgery based on the image noise features, image texture features, coding region edge features and contour features of each microscopic coding region to obtain a forgery detection result of the microscopic coded image, including: for each first contour feature, counting the maximum value of each microscopic coding region under the first contour feature; wherein the first contour feature includes contour area, shape complexity, perfect circle similarity, circumscribed circle diameter and circumscribed rectangle aspect ratio; according to the statistically obtained maximum value and the first contour features of each microscopic coding region, each microscopic coding region is classified, and the number of microscopic coding regions under each classification category is counted; according to the number of microscopic coding regions under each classification category, the histogram distribution result of the first contour feature is determined; the invariant moment features of each microscopic coding region are fused to obtain an invariant moment fusion feature; according to the image noise features, image texture features, coding region edge features, invariant moment fusion features and the histogram distribution results of each first contour feature, the microscopic coded image is detected for forgery to obtain a forgery detection result of the microscopic coded image.

[0071] Specifically, for each first contour feature, the maximum value of each micro coding area under the first contour feature is counted; the range of each classification category is determined based on the maximum value obtained by statistics and the set number of categories; each micro coding area is classified according to the range of each classification category and the first contour feature of each micro coding area, and the number of micro coding areas under each classification category is counted; the number of micro coding areas under each classification category is determined as the histogram distribution result of the first contour feature. For example, the set number of categories is 10; for the contour area, the maximum value of the contour area of ​​each micro coding area is counted; if the maximum value obtained by statistics is 100, the range of each classification category is [0, 10], (10, 20], (20, 30], (30, 40], (40, 50], (50, 60], (60, 70], (70, 80], (80, 90], (90, 100]; the number of micro coding areas under each classification category is counted; if the number under each classification category is 18, 6 2, 41, 45, 78, 57, 76, 23, 9 and 24, then the histogram distribution result of the contour area is (18, 62, 41, 45, 78, 57, 76, 23, 9, 24); a certain algorithm is used to fuse the invariant moment features of each microscopic coding region to obtain the invariant moment fusion feature; according to the image noise features, image texture features, coding region edge features, invariant moment fusion features and the histogram distribution results of each first contour feature, the microscopic coding image is subjected to forgery detection to obtain the forgery detection result of the microscopic coding image.

[0072] It can be understood that the above technical scheme can statistically calculate the contour area histogram distribution results, shape complexity histogram distribution results, perfect circle similarity histogram distribution results, circumscribed circle diameter histogram distribution results and circumscribed rectangle aspect ratio histogram distribution results of all microscopic coding regions included in the microscopic coding image, so as to obtain the histogram distribution characteristics of the contours of all microscopic coding regions in the microscopic coding image; fuse the invariant moment features of each microscopic coding region to obtain the invariant moment fusion feature; perform forgery detection on the microscopic coding image according to the histogram distribution results of the image noise feature, image texture feature, coding region edge feature, invariant moment fusion feature and each first contour feature, and obtain the forgery detection result of the microscopic coding image, which enriches the contour information of the microscopic coding region in the microscopic coding image, reduces the amount of data calculation in the forgery detection process, and improves the accuracy of forgery detection of the microscopic coding image.

[0073] Optionally, the invariant moment feature includes at least one invariant moment sub-feature; the invariant moment features of each microscopic coding region are fused to obtain an invariant moment fusion feature, including: for each invariant moment sub-feature, according to the invariant moment sub-features of each microscopic coding region, statistically analyzing the mean, variance, standard deviation, skewness and kurtosis of the invariant moment sub-feature; and determining the mean, method, standard deviation, skewness and kurtosis of each invariant moment sub-feature as the invariant moment fusion feature.

[0074] Among them, the invariant moment feature can specifically be the HU invariant moment feature; the HU invariant moment feature can include but is not limited to 7 invariant moment sub-features, which can respectively characterize the concavity and convexity of the contour, the sharpness, the average distance from the moment center to the contour, and the degree of deviation from the moment center to the contour. The invariant moment sub-feature can be represented in the form of a vector, and the invariant moment sub-feature is insensitive to the translation, rotation, scaling and mirror transformation of the micro-encoded image. Specifically, for each invariant moment sub-feature, the mean, variance, standard deviation, skewness and kurtosis of the invariant moment sub-feature between each micro-encoded area are counted; the mean, mean, standard deviation, skewness and kurtosis of each invariant moment sub-feature are determined as the invariant moment fusion feature. Exemplarily, if the microscopic coding image includes n microscopic coding regions; each microscopic coding region has an invariant moment feature of size 7×1, wherein the elements in the invariant moment feature are invariant moment sub-features; for the n microscopic coding regions, there are a total of n 7×1 invariant moment features; for each invariant moment sub-feature, the mean, variance, standard deviation, skewness and kurtosis of the invariant moment sub-feature between each microscopic coding region are counted to obtain 7 features of size 5×1; these 7 5×1 features are spliced ​​to finally obtain a 5×7 feature, and this 5×7 feature is determined as the invariant moment fusion feature.

[0075] It can be understood that by adopting the above technical scheme, for each invariant moment sub-feature, according to the invariant moment sub-features of each microscopic coding area, the mean, variance, standard deviation, skewness and kurtosis under the invariant moment sub-features can be respectively counted; the mean, method, standard deviation, skewness and kurtosis of each invariant moment sub-feature are determined as the invariant moment fusion feature, thereby obtaining the invariant moment fusion feature that can comprehensively represent each microscopic coding area in the microscopic coding image, while enriching the contour information of the microscopic coding area in the microscopic coding image, reducing the amount of data calculation in the forgery detection process, and improving the accuracy of forgery detection of the microscopic coding image based on the invariant moment fusion feature.

[0076] The embodiment of the present invention determines the contour area value and the contour perimeter value of the microscopic coding area according to the position information of the contour points of the microscopic coding area; determines the ratio between the contour perimeter value and the contour area value as the shape complexity of the microscopic coding area; calculates the square value of the contour perimeter, and calculates the perfect circle similarity of the microscopic coding area according to the square value of the contour perimeter and the contour area value. It is possible to calculate the shape complexity and the perfect circle similarity of the microscopic coding area, and use the shape complexity and the perfect circle similarity as contour features, thereby improving the accuracy of forgery detection of microscopic coding images.

[0077] Embodiment 3

[0078] Figure 3A This is a flow chart of a method for detecting forgery of a microscopic coded image provided in the third embodiment of the present invention. Based on the technical solutions of the above embodiments, the embodiment of the present invention optimizes and improves the edge feature extraction operation.

[0079] Further, “extracting edge features of the coding area of ​​the microscopic coding image based on the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points” is refined into “determining the total number of pixels of the microscopic coding image based on the size information of the microscopic coding image; calculating the ratio between the total number of edge points and the total number of pixels to obtain the regional edge density; performing polar coordinate conversion on the edge point position information of each microscopic coding area to obtain the angle value of each edge point in polar coordinates; determining the regional edge roughness of the microscopic coding image based on the angle value of each edge point in polar coordinates” to improve the edge feature extraction operation.

[0080] It should be noted that, for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions in the aforementioned embodiments.

[0081] See also Figure 3A The method for detecting counterfeiting of a microscopically coded image as shown comprises:

[0082] S301, respectively identifying contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in a microscopic coded image.

[0083] S302 . For each microscopic coding region, extract contour features of the microscopic coding region according to contour point position information of the microscopic coding region.

[0084] S303. Determine the total number of pixels of the micro coded image according to the size information of the micro coded image.

[0085] In this embodiment, the total number of pixels may be the total number of pixels in the microscopic coded image. The size information of the microscopic coded image includes length and width. Specifically, the length of the microscopic coded image is multiplied by the width of the microscopic coded image to obtain the total number of pixels in the microscopic coded image. Exemplarily, the length and width may be represented by the number of pixels, for example, the length may be 100 pixels, the width may be 50 pixels, and the total number of pixels is 5000.

[0086] S304: Calculate the ratio between the total number of edge points and the total number of pixel points to obtain the regional edge density.

[0087] Specifically, the ratio between the total number of edge points and the total number of pixels is determined as the regional edge density

[0088] S305 , performing polar coordinate conversion on the edge point position information of each microscopic coding area to obtain the angle value of each edge point in polar coordinates.

[0089] S306 , determining the regional edge roughness of the microscopic coded image according to the angle value of each edge point in polar coordinates.

[0090] In this embodiment, the regional edge roughness can be used to characterize the distribution of edge points in different directions, that is, at different angles. Specifically, each edge point can be divided into at least one category according to the angle value of each edge point in polar coordinates; the number of edge points in each category is counted; the regional edge roughness in the category is determined by the ratio between the number of edge points in the category and the total number of edge points; the vector composed of the regional edge roughness in each category is determined as the regional edge roughness of the micro-encoded image. Exemplarily, each edge point can be classified according to the angle range under each polar coordinate; the angle range of each category can be (0°, 45°], (45°, 90°], (90°, 135°], (135°, 180°], (180°, 225°], (225°, 270°], (270°, 315°] and (315°, 360°] in sequence; the number of edge points in each angle range is counted; for each angle range, the ratio between the number of edge points in the angle range and the total number of pixel points is determined as the first-order edge roughness of the angle range; the vector composed of the first-order edge roughness of each angle range is determined as the regional edge roughness of the micro-encoded image.

[0091] In an optional embodiment, the regional edge roughness may include the regional edge roughness of the first edge point and the regional edge roughness of the second edge point. The first edge point and the second edge point may be obtained by performing edge detection on the microscopic coding image using a Sobel operator based on the first-order derivative and a Sobel operator based on the second-order derivative respectively; wherein the first edge point may be an edge point obtained by performing edge detection using a Sobel operator based on the first-order derivative; the second edge point may be an edge point obtained by performing edge detection using a Sobel operator based on the second-order derivative; the regional edge roughness of the first edge point and the regional edge roughness of the second edge point are calculated respectively; it should be noted that the process of calculating the regional edge roughness of the first edge point and the regional edge roughness of the second edge point is similar to the process of calculating the regional edge roughness of the microscopic coding image described above, and will not be repeated here; the regional edge roughness of the first edge point and the regional edge roughness of the second edge point are determined as the regional edge roughness of the microscopic coding image.

[0092] S307, extracting image noise features and image texture features of the micro-encoded image.

[0093] Optionally, the image texture features include local texture features of the image; extracting the image texture features of the micro-coded image includes: for each pixel in the micro-coded image, calculating the LBP (Local Binary Pattern) feature value of the pixel; counting the maximum value of the LBP feature values ​​of each pixel; classifying the LBP feature values ​​of each pixel according to the statistical maximum value to obtain a classification result; and determining the image local texture features of the micro-coded image according to the classification result.

[0094] The classification result may include the number of pixels in each category. Specifically, for each pixel in the micro-encoded image, the LBP (Local Binary Pattern) feature value of the pixel is calculated; the maximum value of the LBP feature value of each pixel is counted; the LBP feature value of each pixel is classified according to the maximum value counted to obtain the classification result; the number of the classified categories is the same as the number of the maximum values ​​counted; the vector composed of the number of pixels in each category is determined as the local texture feature of the image.

[0095] Optionally, for each pixel in the micro-coded image, the LBP (Local Binary Pattern) eigenvalue of the pixel is calculated, including: for each pixel in the micro-coded image, determining 8 neighboring pixels adjacent to the pixel; comparing the pixel value of the pixel with the pixel value of each neighboring pixel, if it is greater than or equal to, determining the comparison result to be 1, and if it is less than, determining the comparison result to be 0; generating an 8-bit binary number; converting the 8-bit binary number into a decimal number to obtain the LBP eigenvalue of the pixel.

[0096] It can be understood that by adopting the above technical solution, the LBP (Local Binary Pattern) eigenvalue of each pixel in the micro-coded image can be calculated; the maximum value of the LBP eigenvalue of each pixel can be counted; the LBP eigenvalue of each pixel can be classified according to the statistical maximum value to obtain the distribution result of the LBP feature, thereby improving the accuracy of the local texture feature of the image, and further improving the accuracy of forgery detection of non-micro-coded images.

[0097] S308. Perform forgery detection on the microscopic coded image according to the image noise features, image texture features, coded region edge features, and contour features of each microscopic coded region to obtain a forgery detection result of the microscopic coded image.

[0098] In an optional embodiment, the microscopic coded image can also be converted into the frequency domain, a mask is defined for selecting the high-frequency area, the energy of the high-frequency area is calculated, and the high-frequency information features are obtained after normalization; the microscopic coded image is detected for forgery based on the high-frequency information features, image noise features, image texture features, coding area edge features and contour features of each microscopic coding area to obtain a forgery detection result of the microscopic coded image.

[0099] In an optional embodiment, a well-trained forgery detection model can be used to perform forgery detection on a microscopic coded image based on high-frequency information features, image noise features, image texture features, coding region edge features, and contour features of each microscopic coding region to obtain a model output result; the model output result is compared with a set threshold to determine whether the input image is a forged microscopic coding pattern. It should be noted that the present invention does not limit the type of forgery detection model, and illustratively, it can be an xgboost (Extreme Gradient Boosting) model.

[0100] Furthermore, a batch of real micro-coded images and forged micro-coded images can be collected as training sample images of the model to train the model. Forged micro-coded images can be obtained by scanning and printing real micro-coded products with different mobile phones at different angles, different lighting and different environments; training the model includes: extracting high-frequency information features, image noise features, image texture features, coding area edge features and contour features of each micro-coded area of ​​each training sample image; combining high-frequency information features, image noise features, image texture features, coding area edge features and contour features of each micro-coded area into a feature vector; dividing the training sample images into a training set and a validation set; setting the parameters of the model, including the learning rate, maximum depth and number of trees; using the training set to train the model, adjusting the model parameters through cross-validation, and optimizing the model performance; evaluating the accuracy, precision and recall rate of the model through the validation set to ensure the generalization ability of the model.

[0101] Optional, Figure 3B It is a schematic diagram of the structure of a forgery detection model. Figure 3B As shown, it includes an image acquisition module, an image preprocessing module, a feature extraction module, a model output module and a threshold determination module. Among them, the image acquisition module can be used to acquire the microscopic coded image to be detected; the image preprocessing module can be used to grayscale, denoise and amplify the acquired microscopic coded image; the feature extraction module can be used to extract image noise features, image texture features, coding area edge features and contour features of each microscopic coding area; the model output module can be used to perform forgery detection on the microscopic coded image according to the image noise features, image texture features, coding area edge features and contour features of each microscopic coding area, and obtain the forgery confidence of the microscopic coded image; the threshold determination module can be used to compare the forgery confidence and set the confidence threshold, and determine whether the microscopic coded image is a forged image according to the comparison result.

[0102] The present invention can extract the microscopic features of the microscopic coded image in a targeted manner according to the characteristics of the microscopic coded image, including the contour area, the diameter of the circumscribed circle, the aspect ratio of the circumscribed rectangle, the contour shape features, the invariant moment features and the edge features of the coded area, etc.; and extract the macroscopic features of the microscopic coded image, including the image noise features, the image local texture features and the high-frequency features, etc.; realize the efficient anti-counterfeiting detection of the microscopic coded pattern, improve the accuracy of the detection, and can reduce the false detection and missed detection; have strong anti-interference ability to ensure stable performance in complex environments; have fast processing speed to realize real-time or near real-time anti-counterfeiting verification; and can be applied to scenes such as certificates, bills, and commodity packaging that require high-precision anti-counterfeiting.

[0103] The embodiment of the present invention determines the total number of pixels of a microscopic coded image according to the size information of the microscopic coded image; calculates the ratio between the total number of edge points and the total number of pixels to obtain the regional edge density; performs polar coordinate conversion on the edge point position information of each microscopic coded region to obtain the angle value of each edge point in the polar coordinates; determines the regional edge roughness of the microscopic coded image according to the angle value of each edge point in the polar coordinates, thereby improving the information richness of the microscopic coded region and further improving the accuracy of counterfeit detection of the microscopic coded image.

[0104] Embodiment 4

[0105] Figure 4 This is a schematic diagram of the structure of a microscopic code image forgery detection device provided in Embodiment 4 of the present invention. This embodiment can be applied to the case of detecting whether a microscopic code pattern is a forged image, the device can execute a microscopic code image forgery detection method, the microscopic code image forgery detection device can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device, such as a server.

[0106] See also Figure 4 The forgery detection device for the microscopic code image shown in the figure comprises a position information acquisition module 401, a first feature extraction module 402, a second feature extraction module 403, a third feature extraction module 404 and a forgery detection module 405, wherein:

[0107] A position information acquisition module 401 is used to respectively identify contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image;

[0108] A first feature extraction module 402 is used to extract contour features of each microscopic coding region according to contour point position information of the microscopic coding region;

[0109] The second feature extraction module 403 is used to extract the edge features of the coding area of ​​the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each microscopic coding area and the total number of edge points;

[0110] The third feature extraction module 404 is used to extract image noise features and image texture features of the micro-encoded image;

[0111] The forgery detection module 405 is used to perform forgery detection on the microscopic coded image according to the image noise characteristics, image texture characteristics, coded region edge characteristics and contour characteristics of each microscopic coded region to obtain a forgery detection result of the microscopic coded image.

[0112] The present invention aims at the characteristics of a microscopic coded image, extracts microscopic features of a microscopic coded area from the microscopic coded image, namely, contour features and edge features, and extracts macroscopic features of the entire microscopic coded image, namely, image noise features and image texture features; the microscopic coded image is detected for forgery through the image noise features, image texture features, edge features of the coded area and contour features of each microscopic coded area, thereby improving the accuracy of forgery detection of the microscopic coded image.

[0113] Optionally, the contour features include contour area, circumscribed circle diameter, circumscribed rectangle aspect ratio, contour shape features and invariant moment features.

[0114] Optionally, the contour shape features include shape complexity and perfect circle similarity;

[0115] The first feature extraction module 402 includes:

[0116] An area value determination unit, used to determine a contour area value and a contour perimeter value of the microscopic coding area according to position information of contour points of the microscopic coding area;

[0117] A complexity calculation unit, used for determining the ratio between the contour perimeter value and the contour area value as the shape complexity of the microscopic coding area;

[0118] The similarity calculation unit is used to calculate the square value of the contour perimeter and calculate the perfect circle similarity of the micro-encoding area based on the square value of the contour perimeter and the contour area value.

[0119] Optionally, the forgery detection module 405 includes:

[0120] A first maximum value statistics unit is used to count the maximum values ​​of each microscopic coding area under the first contour feature for each first contour feature; wherein the first contour feature includes contour area, shape complexity, perfect circle similarity, circumscribed circle diameter and circumscribed rectangle aspect ratio;

[0121] A quantity counting unit, used for classifying each microscopic coding region according to the maximum value obtained by statistics and the first contour feature of each microscopic coding region, and counting the number of microscopic coding regions in each classification category;

[0122] A histogram distribution result determination unit, used to determine the histogram distribution result of the first contour feature according to the number of microscopic coding areas under each classification category;

[0123] A feature fusion unit is used to fuse the invariant moment features of each microscopic coding area to obtain an invariant moment fusion feature;

[0124] The forgery detection unit is used to perform forgery detection on the microscopic coded image according to the image noise feature, image texture feature, coding area edge feature, invariant moment fusion feature and the histogram distribution result of each first contour feature to obtain the forgery detection result of the microscopic coded image.

[0125] Optionally, the invariant moment feature includes at least one invariant moment sub-feature;

[0126] Feature fusion unit, specifically used for:

[0127] For each invariant moment sub-feature, according to the invariant moment sub-features of each microscopic coding region, the mean, variance, standard deviation, skewness and kurtosis under the invariant moment sub-features are statistically analyzed;

[0128] The mean, means, standard deviation, skewness and kurtosis of each invariant moment sub-feature are determined as the invariant moment fusion feature.

[0129] Optionally, the encoding region edge features include region edge density and region edge roughness;

[0130] The second feature extraction module 403 includes:

[0131] A total number determination unit, used to determine the total number of pixels of the microscopic coded image according to the size information of the microscopic coded image;

[0132] An edge density calculation unit is used to calculate the ratio between the total number of edge points and the total number of pixel points to obtain the regional edge density;

[0133] A coordinate conversion unit, used to convert the edge point position information of each microscopic coding area into polar coordinates to obtain the angle value of each edge point in polar coordinates;

[0134] The roughness feature calculation unit is used to determine the regional edge roughness of the microscopic coded image according to the angle value of each edge point in polar coordinates.

[0135] Optionally, the image texture feature includes an image local texture feature;

[0136] The third feature extraction module 504 includes:

[0137] A feature extraction unit, for calculating the LBP (Local Binary Pattern) feature value of each pixel in the microscopic coding image;

[0138] A second maximum value counting unit is used to count the maximum value of the LBP feature value of each pixel point;

[0139] The classification unit is used to classify the LBP feature value of each pixel point according to the statistical maximum value to obtain the classification result;

[0140] The texture feature determination unit is used to determine the local texture features of the micro-coded image according to the classification result.

[0141] The device for detecting forgery of a microscopic coded image provided by the embodiment of the present invention can execute the method for detecting forgery of a microscopic coded image provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method for detecting forgery of a microscopic coded image.

[0142] Embodiment 5

[0143] Figure 5 A schematic diagram of the structure of an electronic device 500 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0144] like Figure 5 As shown, the electronic device 500 includes at least one processor 501, and a memory connected to the at least one processor 501 in communication, such as a read-only memory (ROM) 502, a random access memory (RAM) 503, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 501 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 to the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0145] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0146] The processor 501 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 501 performs the various methods and processes described above, such as a method for detecting counterfeiting of a microscopic coded image.

[0147] In some embodiments, the counterfeit detection method of the microscopic coded image may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the processor 501, one or more steps of the counterfeit detection method of the microscopic coded image described above may be performed. Alternatively, in other embodiments, the processor 501 may be configured to execute the counterfeit detection method of the microscopic coded image by any other appropriate means (e.g., by means of firmware).

[0148] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0149] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable microscopically encoded image counterfeit detection device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0150] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0151] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0152] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0153] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0154] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0155] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. 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 detecting counterfeiting of a microscopic coded image, characterized in that: The method comprises: Respectively identifying contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image; For each microscopic coding region, extracting contour features of the microscopic coding region according to contour point position information of the microscopic coding region; Extracting edge features of the coding area of ​​the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each of the microscopic coding areas, and the total number of edge points; Extracting image noise features and image texture features of the microscopic coded image; Performing forgery detection on the microscopic coded image according to the image noise feature, the image texture feature, the edge feature of the coded region, and the contour feature of each of the microscopic coded regions to obtain a forgery detection result of the microscopic coded image; The contour features include contour area, circumscribed circle diameter, circumscribed rectangle aspect ratio, contour shape features and invariant moment features; Wherein, the outline shape features include shape complexity and perfect circle similarity; The step of extracting the contour features of the microscopic coding area according to the contour point position information of the microscopic coding area comprises: Determine the contour area value and contour perimeter value of the microscopic coding region according to the position information of the contour points of the microscopic coding region; Determine the ratio between the contour perimeter value and the contour area value as the shape complexity of the microscopic encoding region; Calculating the square value of the contour perimeter, and calculating the perfect circle similarity of the microscopic coding area according to the square value of the contour perimeter and the contour area value; Among them, the shape complexity is used to indicate the complexity of the shape of the contour. A high shape complexity indicates that the shape of the microscopic coding area is complex; a low shape complexity indicates that the shape of the microscopic coding area is simple. The perfect circle similarity is used to indicate the similarity between the shape of the contour and the perfect circle. If the perfect circle similarity is close to 1, it indicates that the shape of the contour is close to a perfect circle; otherwise, it indicates that the shape of the contour is not close to a perfect circle.

2. The method according to claim 1, characterized in that The performing forgery detection on the microscopic coded image according to the image noise feature, the image texture feature, the edge feature of the coded region and the contour feature of each of the microscopic coded regions to obtain a forgery detection result of the microscopic coded image includes: For each first contour feature, the maximum value of each microscopic coding area under the first contour feature is counted; wherein the first contour feature includes contour area, shape complexity, perfect circle similarity, circumscribed circle diameter and circumscribed rectangle aspect ratio; Classifying each microscopic coding region according to the maximum value obtained by the statistics and the first contour feature of each microscopic coding region, and counting the number of microscopic coding regions in each classification category; Determining a histogram distribution result of the first contour feature according to the number of microscopic coding areas under each classification category; The invariant moment features of each of the microscopic coding regions are fused to obtain an invariant moment fusion feature; According to the image noise feature, the image texture feature, the coding area edge feature, the invariant moment fusion feature and the histogram distribution result of each of the first contour features, the microscopic coding image is subjected to forgery detection to obtain a forgery detection result of the microscopic coding image.

3. The method according to claim 2, characterized in that The invariant moment feature includes at least one invariant moment sub-feature; The step of fusing the invariant moment features of the microscopic coding regions to obtain the invariant moment fusion features includes: For each invariant moment sub-feature, according to the invariant moment sub-feature of each of the microscopic coding regions, the mean, variance, standard deviation, skewness and kurtosis of the invariant moment sub-feature are counted; The mean, means, standard deviation, skewness and kurtosis of each of the invariant moment sub-features are determined as invariant moment fusion features.

4. The method according to claim 1, characterized in that: The coding region edge features include region edge density and region edge roughness; The step of extracting edge features of the coding region of the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each microscopic coding region, and the total number of edge points includes: Determine the total number of pixels of the microscopic coded image according to the size information of the microscopic coded image; Calculate the ratio between the total number of edge points and the total number of pixel points to obtain the edge density of the region; Performing polar coordinate conversion on the edge point position information of each microscopic coding area to obtain the angle value of each edge point in polar coordinates; The regional edge roughness of the microscopic coded image is determined according to the angle value of each edge point in polar coordinates.

5. The method according to claim 1, characterized in that The image texture features include local image texture features; The step of extracting the image texture features of the microscopic coded image comprises: For each pixel in the microscopic coded image, calculating the LBP feature value of the pixel; Counting the maximum value of the LBP feature values ​​of each pixel point; Classifying the LBP feature values ​​of each pixel point according to the maximum value of the statistics to obtain a classification result; According to the classification result, the local texture features of the microscopic coded image are determined.

6. A device for detecting counterfeiting of a microscopic coded image, characterized in that: The device comprises: A position information acquisition module, used to respectively identify contour point position information, edge point position information and the total number of edge points of at least one microscopic coded area in the microscopic coded image; The first feature extraction module is used to extract the contour features of each microscopic coding area according to the contour point position information of the microscopic coding area; wherein the contour features include contour area, circumscribed circle diameter, circumscribed rectangle aspect ratio, contour shape features and invariant moment features; wherein the contour shape features include shape complexity and perfect circle similarity; wherein the shape complexity is used to indicate the complexity of the shape of the contour, and a high shape complexity indicates that the shape of the microscopic coding area is complex; a low shape complexity indicates that the shape of the microscopic coding area is simple; the perfect circle similarity is used to indicate the similarity between the shape of the contour and the perfect circle; if the perfect circle similarity is close to 1, it indicates that the shape of the contour is close to a perfect circle; otherwise, it indicates that the shape of the contour is not close to a perfect circle; A second feature extraction module is used to extract edge features of the coding area of ​​the microscopic coding image according to the size information of the microscopic coding image, the edge point position information of each of the microscopic coding areas and the total number of edge points; A third feature extraction module, used to extract image noise features and image texture features of the microscopic coded image; a forgery detection module, configured to perform forgery detection on the microscopic coded image according to the image noise feature, the image texture feature, the edge feature of the coded region and the contour feature of each of the microscopic coded regions, and obtain a forgery detection result of the microscopic coded image; Among them, the first feature extraction module includes an area value determination unit, a complexity calculation unit and a similarity calculation unit; the area value determination unit is used to determine the contour area value and contour perimeter value of the microscopic coding area according to the position information of the contour points of the microscopic coding area; the complexity calculation unit is used to determine the ratio between the contour perimeter value and the contour area value as the shape complexity of the microscopic coding area; the similarity calculation unit is used to calculate the square value of the contour perimeter, and calculate the perfect circle similarity of the microscopic coding area according to the square value of the contour perimeter and the contour area value.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method for detecting counterfeiting of a microscopic coded image according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for detecting counterfeiting of a microscopic coded image according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Dot matrix code authentic identification method and system

    CN115270840A