Cigarette box authenticity detection method, device, electronic equipment and storage medium

By extracting and comparing the image data of the target to be detected, the problem of difficulty in identifying the authenticity of the product in the prior art is solved, effective authenticity of the target is achieved, and the accuracy of the detection results is improved.

CN114693589BActive Publication Date: 2025-04-04GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011595535.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-04-04
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively identify the authenticity of products, especially as counterfeit and inferior products counterfeit products are constantly improving, it is difficult for users to distinguish the authenticity of products based on experience.

Method used

By obtaining the image data of the target to be detected, determining the area to be detected, collecting spectral data of the specified frequency band, performing denoising processing, dividing multi-spectral data segments, extracting local and global multi-spectral features, splicing into target multi-spectral features, and comparing them with preset truth value features to determine the authenticity of the target to be detected.

Benefits of technology

Effective authenticity detection of the target is achieved, the effectiveness of multi-spectral features is improved, the accuracy of authenticity detection results is increased, and it is suitable for various goals that identify authenticity due to material differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693589B_ABST
    Figure CN114693589B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method, device, electronic device and storage medium for detecting the authenticity of cigarette boxes. Through the multi-spectral characteristics of cigarette boxes, effective detection of the authenticity of cigarette boxes is achieved, and the method is applicable to various cigarette boxes whose authenticity is identified due to material differences. Combining local multi-spectral characteristics with global multi-spectral characteristics for analysis can improve the effectiveness of multi-spectral characteristics, thereby increasing the accuracy of authenticity detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image analysis technology, and in particular to a method, device, electronic device and storage medium for detecting the authenticity of cigarette boxes. Background Art

[0002] Fighting against counterfeit and shoddy products is of great significance to safeguarding the legitimate rights and interests of consumers and promoting a healthy and good market order. In the prior art, whether a product (such as a cigarette box) is a counterfeit or shoddy product is mainly identified by the user's experience. However, with the continuous improvement of counterfeiting technology, it is difficult for users to identify the authenticity of the product based on experience. Therefore, an effective product authenticity detection method is urgently needed. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for detecting the authenticity of a target, so as to effectively detect the authenticity of a target. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for detecting authenticity of an object, the method comprising:

[0005] Acquire image data of a target to be detected, and determine a region to be detected of the target to be detected in the image data;

[0006] Collecting the spectrum of the specified frequency band in the area to be detected to obtain target multi-spectral data;

[0007] Performing denoising on the target multispectral data to obtain preprocessed multispectral data;

[0008] Dividing the preprocessed multispectral data into a plurality of multispectral data segments, and obtaining a plurality of local multispectral features according to each of the multispectral data segments;

[0009] Performing feature extraction on the preprocessed multispectral data to obtain global multispectral features;

[0010] The plurality of local multispectral features and the global multispectral feature are spliced ​​to obtain a target multispectral feature;

[0011] The target multispectral feature is compared with the preset true value multispectral feature to obtain the authenticity detection result of the target to be detected.

[0012] In a possible implementation manner, the acquiring image data of the target to be detected and determining the area to be detected of the target to be detected in the image data includes:

[0013] Acquire image data of the target to be detected, and convert the image data into a YUV format;

[0014] According to a preset area division method, the image data in YUV format is divided into a plurality of target image areas;

[0015] For each target image area, calculate the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area;

[0016] The target image region with the highest average saturation is selected from the target image region with the smallest average variance to obtain the region to be detected.

[0017] In a possible implementation manner, the performing denoising on the target multispectral data to obtain preprocessed multispectral data includes:

[0018] intercepting a preset first number of values ​​among the target multispectral data to obtain first multispectral data;

[0019] performing a zero-mean normalization operation on the first multispectral data to obtain second multispectral data;

[0020] One-dimensional smoothing filtering is performed on the second multispectral data to obtain preprocessed multispectral data.

[0021] In a possible implementation, dividing the pre-processed multispectral data into a plurality of multispectral data segments, and obtaining a plurality of local multispectral features according to each of the multispectral data segments, includes:

[0022] Dividing the preprocessed multispectral data into a preset number of multispectral data segments;

[0023] For each multispectral data segment, calculating a data segment mean of the multispectral data segment;

[0024] For each multi-spectral data segment, a fast Fourier transform is performed on the multi-spectral data segment and an absolute value is taken to obtain a characteristic data segment of the multi-spectral data segment;

[0025] For each multispectral data segment, determining a low-frequency mean value of a characteristic data segment of the multispectral data segment in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval;

[0026] Wherein, for each multispectral data segment, the local multispectral features of the multispectral data segment include a data segment mean, a low-frequency mean, and a high-frequency mean of the multispectral data segment.

[0027] In a possible implementation, extracting features from the preprocessed multispectral data to obtain global multispectral features includes:

[0028] Performing a fast Fourier transform on the pre-processed multi-spectral data and taking an absolute value to obtain global feature data of the pre-processed multi-spectral data;

[0029] Determine a low-frequency mean value of the global feature data in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval;

[0030] The global multispectral feature includes a low-frequency mean and a high-frequency mean of the preprocessed multispectral data.

[0031] In a possible implementation manner, the target multispectral feature includes a preset second number of target feature values, and the preset true value multispectral feature includes a preset second number of sample feature values;

[0032] The step of comparing the target multispectral feature with a preset true value multispectral feature to obtain a result of the authenticity detection of the target to be detected includes:

[0033] Respectively calculating the similarities between the target feature value and the sample feature value corresponding to the target multispectral feature and the preset true value multispectral feature to obtain a preset second number of similarities;

[0034] Determining a target similarity mean according to the preset second number of similarities;

[0035] When the target similarity mean is greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be true; when the target similarity mean is not greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be false.

[0036] In a second aspect, an embodiment of the present application provides a device for detecting authenticity of an object, the device comprising:

[0037] A module for determining an area to be detected, used to obtain image data of an object to be detected and determine an area to be detected of the object to be detected in the image data;

[0038] A spectral data acquisition module is used to acquire the spectrum of a specified frequency band in the area to be detected to obtain target multi-spectral data;

[0039] A noise removal module, used for performing noise removal processing on the target multispectral data to obtain preprocessed multispectral data;

[0040] A local multispectral feature determination module, used for dividing the pre-processed multispectral data into a plurality of multispectral data segments, and obtaining a plurality of local multispectral features according to each of the multispectral data segments;

[0041] A global multispectral feature determination module is used to extract features from the pre-processed multispectral data to obtain global multispectral features;

[0042] A target multispectral feature determination module, used for splicing the multiple local multispectral features and the global multispectral feature to obtain a target multispectral feature;

[0043] The authenticity detection result determination module is used to compare the target multispectral feature with the preset true value multispectral feature to obtain the authenticity detection result of the target to be detected.

[0044] In a possible implementation manner, the module for determining the area to be detected is specifically configured to:

[0045] Acquire image data of the target to be detected, and convert the image data into a YUV format;

[0046] According to a preset area division method, the image data in YUV format is divided into a plurality of target image areas;

[0047] For each target image area, calculate the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area;

[0048] The target image region with the highest average saturation is selected from the target image region with the smallest average variance to obtain the region to be detected.

[0049] In a possible implementation manner, the noise removal module is specifically configured to:

[0050] intercepting a preset first number of values ​​among the target multispectral data to obtain first multispectral data;

[0051] performing a zero-mean normalization operation on the first multispectral data to obtain second multispectral data;

[0052] One-dimensional smoothing filtering is performed on the second multispectral data to obtain preprocessed multispectral data.

[0053] In a possible implementation manner, the local multi-spectral feature determination module is specifically used to:

[0054] Dividing the preprocessed multispectral data into a preset number of multispectral data segments;

[0055] For each multispectral data segment, calculating a data segment mean of the multispectral data segment;

[0056] For each multi-spectral data segment, a fast Fourier transform is performed on the multi-spectral data segment and an absolute value is taken to obtain a characteristic data segment of the multi-spectral data segment;

[0057] For each multispectral data segment, determining a low-frequency mean value of a characteristic data segment of the multispectral data segment in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval;

[0058] Wherein, for each multispectral data segment, the local multispectral features of the multispectral data segment include a data segment mean, a low-frequency mean, and a high-frequency mean of the multispectral data segment.

[0059] In a possible implementation manner, the global multi-spectral feature determination module is specifically used to:

[0060] Performing a fast Fourier transform on the pre-processed multi-spectral data and taking an absolute value to obtain global feature data of the pre-processed multi-spectral data;

[0061] Determine a low-frequency mean value of the global feature data in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval;

[0062] The global multispectral feature includes a low-frequency mean and a high-frequency mean of the preprocessed multispectral data.

[0063] In a possible implementation, the target multispectral feature includes a preset second number of target feature values, and the preset true value multispectral feature includes a preset second number of sample feature values; the authenticity detection result determination module is specifically used to:

[0064] Respectively calculating the similarities between the target feature value and the sample feature value corresponding to the target multispectral feature and the preset true value multispectral feature to obtain a preset second number of similarities;

[0065] Determining a target similarity mean according to the preset second number of similarities;

[0066] When the target similarity mean is greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be true; when the target similarity mean is not greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be false.

[0067] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;

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

[0069] The processor is used to implement any target authenticity detection method described in the present application when executing the program stored in the memory.

[0070] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, it implements any target authenticity detection method described in the present application.

[0071] Beneficial effects of the embodiments of the present application:

[0072] The target authenticity detection method, device, electronic device and storage medium provided in the embodiments of the present application realize effective detection of the target authenticity through the multispectral characteristics of the target, and are applicable to various targets whose authenticity is identified due to material differences; combining local multispectral characteristics with global multispectral characteristics for analysis can improve the effectiveness of multispectral characteristics, thereby increasing the accuracy of authenticity detection results. Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0074] Figure 1 A schematic diagram of a method for detecting authenticity of an object according to an embodiment of the present application;

[0075] Figure 2 A schematic diagram of a possible implementation of step S101 in an embodiment of the present application;

[0076] Figure 3 A schematic diagram of a possible implementation of step S103 in an embodiment of the present application;

[0077] Figure 4 A schematic diagram of a possible implementation of step S104 in an embodiment of the present application;

[0078] Figure 5 A schematic diagram of a possible implementation of step S105 in an embodiment of the present application;

[0079] Figure 6 A schematic diagram of a possible implementation of step S107 in an embodiment of the present application;

[0080] Figure 7 A schematic diagram of a target authenticity detection device according to an embodiment of the present application;

[0081] Figure 8 A schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0083] First, the terms in this application are explained:

[0084] Multispectral analysis: Use multispectral equipment in the short-wave infrared band to select pure-color and relatively high-saturation areas of the target for multispectral data collection, perform feature analysis on the collected multispectral data, and distinguish the authenticity of the target based on the feature differences of the multispectrum.

[0085] Z-score standardization (zero-mean standardization): A data normalization method that normalizes the data by calculating the mean and standard deviation of the original data. The processed data conforms to the standard normal distribution, that is, the mean is 0 and the standard deviation is 1.

[0086] FFT (Fast Fourier Transform): FFT is an efficient algorithm for discrete Fourier transform. Fourier transform is a method for converting time domain signals into frequency domain signals.

[0087] In order to effectively detect the authenticity of a target, the present invention provides a method for detecting the authenticity of a target. Figure 1 , the method comprising:

[0088] S101, acquiring image data of a target to be detected, and determining a region to be detected of the target to be detected in the image data.

[0089] The object authenticity detection method of the embodiment of the present application can be implemented by an electronic device, for example, the electronic device can be a smart phone, a smart camera, a personal computer, etc. The object to be detected is any object that needs to be authenticated. In the scenario of product authenticity detection, the object to be detected can be the packaging of the product, for example, a cigarette box, a wine box, a cosmetic box, a bottle, etc.

[0090] The area to be detected is the area where the spectral characteristics of the target to be detected are more obvious, such as the area where the saturation of the spectral color is higher (greater than the preset saturation threshold). The area to be detected can be customized for different types of targets to be detected. Computer vision technology can be used to determine the type of target to be detected and detect the detection area from the image data. The user can also input the type of target to be detected, and detect the area to be detected of the target to be detected of a known type through the relevant area detection algorithm.

[0091] S102, collecting the spectrum of the specified frequency band in the above-mentioned area to be detected to obtain target multi-spectral data.

[0092] The designated frequency band may be customized according to actual conditions. In one example, the designated frequency band is a short-wave infrared band, for example, 900 nm to 1700 nm.

[0093] S103, performing denoising processing on the target multispectral data to obtain preprocessed multispectral data.

[0094] Generally, there will be noise in the directly extracted target multispectral data, so the target multispectral data needs to be denoised to obtain preprocessed multispectral data. The specific method of denoising can refer to the spectral denoising method in the related art, which is not limited here.

[0095] S104, dividing the pre-processed multispectral data into a plurality of multispectral data segments, and obtaining a plurality of local multispectral features according to each of the multispectral data segments.

[0096] The number of multispectral data segments can be customized according to actual conditions. In one example, the number of multispectral data segments is positively correlated with the length of the preprocessed multispectral data. The length of each multispectral data segment can be the same or different. For the convenience of calculation, in one example, the lengths of the multispectral data segments are the same. Feature extraction can be performed on each multispectral data segment to obtain multiple local multispectral features. In one example, the local multispectral feature can include at least one of the data segment mean, high-frequency mean, or low-frequency mean of the multispectral data segment.

[0097] S105, performing feature extraction on the pre-processed multispectral data to obtain global multispectral features.

[0098] In one example, the global multispectral feature may include at least one of a data segment mean, a low-frequency mean, and a high-frequency mean of the pre-processed multispectral data.

[0099] S106, combining the plurality of local multispectral features and the global multispectral feature to obtain a target multispectral feature.

[0100] The local multispectral features and the global multispectral features are spliced, for example, in the form of a feature matrix, thereby obtaining the target multispectral features.

[0101] S107, comparing the target multispectral feature with a preset true value multispectral feature to obtain a authenticity detection result of the target to be detected.

[0102] The preset true value multispectral feature is a multispectral feature of a pre-extracted true target, and the true target is of the same type as the target to be detected. The method for extracting the preset true value multispectral feature can be the same as the method for extracting the target multispectral feature. The target used to extract the preset true value multispectral feature is the "true" target. The "true" target in this application refers to the "genuine", which can also be understood as a target whose authenticity detection result is true. The similarity between the target multispectral feature and the preset true value multispectral feature can be calculated, for example, by calculating the Gaussian probability vector of the two, etc., so as to obtain the authenticity detection result of the target to be detected.

[0103] In the embodiment of the present application, the authenticity of the target is effectively detected through the multispectral characteristics of the target, which is suitable for various targets whose authenticity is identified due to material differences; combining local multispectral characteristics with global multispectral characteristics for analysis can improve the effectiveness of multispectral characteristics, thereby increasing the accuracy of authenticity detection results.

[0104] In one possible implementation, see Figure 2 , the step of acquiring the image data of the target to be detected and determining the area to be detected of the target to be detected in the image data comprises:

[0105] S1011, obtaining image data of the target to be detected, and converting the image data into a YUV format.

[0106] Generally, the image data collected by the camera is in RGB format, and the image data in RGB format needs to be converted into YUV format. It can be understood by those skilled in the art that if the acquired image data is directly in YUV format, there is no need to perform format conversion, and this step can be omitted.

[0107] S1012: Divide the image data in YUV format into a plurality of target image regions according to a preset region division method.

[0108] The preset region division method can be freely set according to the actual situation. For example, the image data can be divided into multiple target image regions of preset sizes. In one example, a circle with a radius of R is used as a sliding window, and the number of pixels is specified as a step size to divide the image data in YUV format into multiple target image regions, wherein each target image region may overlap, and R is a preset number. Of course, a square with a side length of R can also be used as a sliding window.

[0109] S1013, for each target image area, calculating the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area.

[0110] The Y component represents brightness and the UV component represents chrominance.

[0111] S1014, selecting the target image region with the highest average saturation from the target image regions with the smallest average variance to obtain the region to be detected.

[0112] Taking a circle with a radius of R as an example, for the image data in YUV format, the average variance Var in the target image area with a window radius of R is calculated for the Y component, and the average saturation Sat in the target image area with a window radius of R is calculated for the UV component:

[0113]

[0114]

[0115]

[0116] Where n represents the nth target image area, i represents the x-axis coordinate of the pixel in the target image area, and j represents the y-axis coordinate of the pixel in the target image area. Among the target image areas with the smallest Var, the target image area with the highest Sat is selected as the area to be detected.

[0117] In an embodiment of the present application, the target image area with the highest average saturation is selected as the area to be detected from the target image area with the smallest average variance, that is, the target image area with the highest average saturation is selected as the area to be detected from the target image area with consistent brightness. This can ensure that the brightness of the area to be detected is consistent and the saturation is high, so that the spectral characteristics of the area to be detected are more suitable for spectral detection (spectral data with high saturation are more suitable for component analysis), which can increase the accuracy of the authenticity detection results.

[0118] In one possible implementation, see Figure 3 , the above-mentioned target multispectral data is subjected to denoising to obtain pre-processed multispectral data, including:

[0119] S1031, intercepting a preset first number of values ​​among the target multispectral data to obtain first multispectral data.

[0120] The target multispectral data is one-dimensional data. In order to reduce the influence of noise, a preset first number of values ​​can be intercepted from the one-dimensional target multispectral data as the first multispectral data. The preset first number can be set according to the actual situation. In an example, when the specified frequency band is 900-1700nm, the preset first number can be set to 640, that is, the data corresponding to 981-1620nm is intercepted.

[0121] S1032, performing a zero-mean normalization operation on the first multispectral data to obtain second multispectral data.

[0122] The specific method of zero-mean normalization operation can refer to the method of zero-mean normalization operation in the related art. In one example, the first multispectral data is used for data ori Represents that the zero-mean normalization operation can be composed of calculating data ori Mean μ ori , standard deviation var ori , data ori Normalize to get data std , k is the scaling factor:

[0123]

[0124] Among them, data std is the second multispectral data.

[0125] S1033, performing one-dimensional smoothing filtering on the second multispectral data to obtain preprocessed multispectral data.

[0126] The specific method of one-dimensional smoothing filtering can refer to the one-dimensional smoothing filtering method in the related art, and is not specifically limited in this application.

[0127] In the embodiments of the present application, the target multispectral data is denoised in a variety of ways, which can reduce the noise in the pre-processed multispectral data after denoising, thereby increasing the accuracy of the authenticity detection result.

[0128] In one possible implementation, see Figure 4 , the pre-processed multispectral data is divided into a plurality of multispectral data segments, and a plurality of local multispectral features are obtained according to each of the multispectral data segments, including:

[0129] S1041, dividing the preprocessed multispectral data into a preset number of multispectral data segments.

[0130] S1042: For each multi-spectral data segment, calculate a data segment mean of the multi-spectral data segment.

[0131] S1043, for each multi-spectral data segment, perform a fast Fourier transform on the multi-spectral data segment and take an absolute value to obtain a characteristic data segment of the multi-spectral data segment.

[0132] S1044, for each multi-spectral data segment, determining a low-frequency mean value of a characteristic data segment of the multi-spectral data segment in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval.

[0133] Wherein, for each multispectral data segment, the local multispectral features of the multispectral data segment include a data segment mean, a low-frequency mean, and a high-frequency mean of the multispectral data segment.

[0134] The preset number of segments can be set according to the actual situation. In one example, taking the first quantity as 640 and the preset number of segments as 5, the length of a multi-spectral data segment is 128, denoted as local_data n , where n represents the nth multi-spectral data segment. For each local_data n calculate the local mean as the eigenvalue feature m , that is, the data segment mean; for each local_data n perform a fast Fourier transform and take the absolute value to obtain the feature data segment Then calculate the mean of the low-frequency interval [low1, low2] of the feature data as the eigenvalue feature m , that is, the low-frequency mean; calculate the mean of the high-frequency interval [high1, high2] of the feature data as the eigenvalue feature m , that is, the high-frequency mean; where n ranges from 1 to 5, m ranges from 1 to 15, 0 ≤ low1 < low2 < high1 < high2, and the specific values of low1, low2, high1, and high2 can be custom-set according to the actual situation. The local multi-spectral features of each spectral data segment include 3 features: the data segment mean, the low-frequency mean, and the high-frequency mean of the multi-spectral data segment. A total of 15 features are included in 5 multi-spectral data segments:

[0135]

[0136] Among them,

[0137] In the embodiment of the present application, the data segment mean, the low-frequency mean, and the high-frequency mean are used to represent the local multi-spectral features of a multi-spectral data segment. The local multi-spectral features are more comprehensive and representative, thereby increasing the accuracy of the authenticity detection result.

[0138] In a possible implementation manner, refer to Figure 5 , perform feature extraction on the above preprocessed multi-spectral data to obtain global multi-spectral features, including:

[0139] S1051, perform a fast Fourier transform on the above preprocessed multi-spectral data and take the absolute value to obtain the global feature data of the above preprocessed multi-spectral data.

[0140] S1052, determine the low-frequency mean of the above global feature data in the specified low-frequency interval and the high-frequency mean in the specified high-frequency interval.

[0141] Among them, the above global multi-spectral features include the low-frequency mean and the high-frequency mean of the above preprocessed multi-spectral data.

[0142] Preprocessing multispectral data std_smooth Perform fast Fourier transform and take absolute value to obtain the global feature data F of preprocessed multispectral data global , and then count F global The mean of the low frequency interval [low1, low2] and the high frequency interval [high1, high2] is used as the global frequency feature value feature 16 (i.e. low frequency mean), feature 17 (i.e. high frequency mean), 0 <low1<low2<high1<high2。

[0143]

[0144] Among them, F global =|FFT(data std_smooth )|

[0145] In the embodiment of the present application, the data segment mean, low-frequency mean and high-frequency mean are used to represent the global multi-spectral features. The global multi-spectral features are more comprehensive and more representative, thereby increasing the accuracy of the authenticity detection results.

[0146] In a possible implementation manner, the target multispectral feature includes a preset second number of target feature values, and the preset true value multispectral feature includes a preset second number of sample feature values; see Figure 6 , the above-mentioned target multispectral features are compared with the preset true value multispectral features to obtain the authenticity detection result of the above-mentioned target to be detected, including:

[0147] S1071, respectively calculating similarities between the target feature value and the sample feature value corresponding to the target multispectral feature and the preset true value multispectral feature to obtain a preset second number of similarities.

[0148] For example, in the target multispectral feature x Corresponding to the feature in the preset true value multispectral feature x , the value range of x is 1 to 17.

[0149] S1072: Determine a target similarity mean value according to the preset second number of similarities.

[0150] S1073, when the target similarity mean is greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be true; when the target similarity mean is not greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be false.

[0151] In one example, the preset true value multispectral feature is obtained from the multispectral features of multiple "true" targets. Multiple "true" modules can be selected to extract multispectral features, thereby obtaining the preset true value multispectral feature to reduce the contingency of the preset true value multispectral feature, enhance the anti-interference ability, and thus increase the accuracy of the authenticity detection result.

[0152] For example, we can extract m multispectral feature values ​​of real targets of the same type as the target to be detected: x , x = 1 ~ 17, we can get the m*x feature matrix, and count the mean μ of each set of features x and variance

[0153]

[0154]

[0155]

[0156] Calculate the probability that the target to be detected is a true target, and the target multispectral feature is recorded as F:{f1,f2,…f 17}, calculate the Gaussian probability vector P that is true: {p1,p2,…,p 17}:

[0157]

[0158] The elements in the probability vector P are sorted from small to large, and the average value of the sorting interval [3, 7] can be statistically calculated as the probability that the target to be detected is true. The final probability statistics can also be performed through other scoring principles to obtain the mean target similarity.

[0159] In an embodiment of the present application, the similarities between the target feature values ​​and the sample feature values ​​corresponding to the target multispectral feature and the preset true value multispectral feature are calculated respectively, and the target similarity mean is further calculated. The similarity calculation sampling covers a more comprehensive range, which can increase the accuracy of the authenticity detection results.

[0160] The present application also provides a device for detecting the authenticity of an object. Figure 7 , the device comprises:

[0161] The module 11 for determining the area to be detected is used to obtain image data of the target to be detected and determine the area to be detected of the target to be detected in the image data;

[0162] The spectrum data acquisition module 12 is used to acquire the spectrum of the specified frequency band in the above-mentioned area to be detected to obtain target multi-spectral data;

[0163] A noise removal module 13 is used to perform noise removal processing on the target multispectral data to obtain pre-processed multispectral data;

[0164] The local multispectral feature determination module 14 is used to divide the pre-processed multispectral data into a plurality of multispectral data segments, and obtain a plurality of local multispectral features according to each of the multispectral data segments;

[0165] A global multispectral feature determination module 15 is used to extract features from the pre-processed multispectral data to obtain global multispectral features;

[0166] A target multispectral feature determination module 16 is used to combine the above-mentioned multiple local multispectral features and the above-mentioned global multispectral features to obtain a target multispectral feature;

[0167] The authenticity detection result determination module 17 is used to compare the target multispectral feature with the preset true value multispectral feature to obtain the authenticity detection result of the target to be detected.

[0168] In a possible implementation, the module for determining the area to be detected is specifically used to: obtain image data of the target to be detected, and convert the image data into a YUV format; divide the image data in the YUV format into a plurality of target image areas according to a preset area division method; for each target image area, calculate the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area; select the target image area with the highest average saturation from the target image areas with the smallest average variance to obtain the area to be detected.

[0169] In a possible implementation, the noise removal module is specifically used to: intercept a preset first number of values ​​in the middle of the target multispectral data to obtain first multispectral data; perform a zero-mean normalization operation on the first multispectral data to obtain second multispectral data; perform a one-dimensional smoothing filter on the second multispectral data to obtain preprocessed multispectral data.

[0170] In a possible implementation, the local multispectral feature determination module is specifically used to: divide the preprocessed multispectral data into a preset number of multispectral data segments; for each multispectral data segment, calculate the data segment mean of the multispectral data segment; for each multispectral data segment, perform a fast Fourier transform on the multispectral data segment and take the absolute value to obtain a feature data segment of the multispectral data segment; for each multispectral data segment, determine the low-frequency mean of the feature data segment of the multispectral data segment in a specified low-frequency interval and the high-frequency mean in a specified high-frequency interval; wherein, for each multispectral data segment, the local multispectral feature of the multispectral data segment includes the data segment mean, the low-frequency mean and the high-frequency mean of the multispectral data segment.

[0171] In a possible implementation, the global multispectral feature determination module is specifically used to: perform fast Fourier transform on the preprocessed multispectral data and take the absolute value to obtain global feature data of the preprocessed multispectral data; determine the low-frequency mean of the global feature data in a specified low-frequency interval and the high-frequency mean in a specified high-frequency interval; wherein the global multispectral feature includes the low-frequency mean and the high-frequency mean of the preprocessed multispectral data.

[0172] In a possible implementation, the target multispectral feature includes a preset second number of target feature values, and the preset true value multispectral feature includes a preset second number of sample feature values; the authenticity detection result determination module is specifically used to: respectively calculate the similarity between the target multispectral feature and the corresponding target feature values ​​and sample feature values ​​in the preset true value multispectral feature to obtain a preset second number of similarities; determine the target similarity mean according to the preset second number of similarities; when the target similarity mean is greater than a preset similarity threshold, determine the authenticity detection result of the target to be detected to be true; when the target similarity mean is not greater than the preset similarity threshold, determine the authenticity detection result of the target to be detected to be false.

[0173] The embodiment of the present application also provides an electronic device, including: a processor and a memory;

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

[0175] When the processor is used to execute the computer program stored in the memory, any target authenticity detection method described in the present application is implemented.

[0176] Optional, see Figure 8 In addition to the processor 21 and the memory 23, the electronic device of the embodiment of the present application also includes a communication interface 22 and a communication bus 24, wherein the processor 21, the communication interface 22, and the memory 23 communicate with each other through the communication bus 24.

[0177] The communication bus mentioned in the above electronic device may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0178] The communication interface is used for communication between the above electronic device and other devices.

[0179] The memory may include RAM (Random Access Memory) or NVM (Non-Volatile Memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0180] The above-mentioned processor can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0181] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any target authenticity detection method described in the present application is implemented.

[0182] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any target authenticity detection method described in the present application.

[0183] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.

[0184] It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope disclosed in this application. Relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0185] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, computer program product, electronic device, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0186] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A method for detecting authenticity of a target, characterized in that: The method comprises: Acquire image data of a target to be detected, and determine a region to be detected of the target to be detected in the image data; Collecting the spectrum of the specified frequency band in the area to be detected to obtain target multi-spectral data; Performing denoising on the target multispectral data to obtain preprocessed multispectral data; Dividing the preprocessed multispectral data into a preset number of multispectral data segments; For each multispectral data segment, calculating a data segment mean of the multispectral data segment; For each multi-spectral data segment, a fast Fourier transform is performed on the multi-spectral data segment and an absolute value is taken to obtain a characteristic data segment of the multi-spectral data segment; For each multispectral data segment, determine the low-frequency mean of the characteristic data segment of the multispectral data segment in the specified low-frequency interval and the high-frequency mean in the specified high-frequency interval; for each multispectral data segment, the local multispectral feature of the multispectral data segment includes the data segment mean, the low-frequency mean and the high-frequency mean of the multispectral data segment; Performing a fast Fourier transform on the pre-processed multi-spectral data and taking an absolute value to obtain global feature data of the pre-processed multi-spectral data; Determine the low-frequency mean of the global feature data in a specified low-frequency interval and the high-frequency mean in a specified high-frequency interval; the global multispectral feature includes the low-frequency mean and the high-frequency mean of the pre-processed multispectral data; splicing the plurality of local multispectral features and the global multispectral features to obtain a target multispectral feature; The target multispectral feature is compared with the preset true value multispectral feature to obtain the authenticity detection result of the target to be detected.

2. The method according to claim 1, characterized in that The step of acquiring image data of the target to be detected and determining a region to be detected of the target to be detected in the image data comprises: Acquire image data of the target to be detected, and convert the image data into a YUV format; According to a preset area division method, the image data in YUV format is divided into a plurality of target image areas; For each target image area, calculate the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area; The target image region with the highest average saturation is selected from the target image region with the smallest average variance to obtain the region to be detected.

3. The method according to claim 1, characterized in that The step of performing denoising on the target multispectral data to obtain preprocessed multispectral data includes: intercepting a preset first number of values ​​among the target multispectral data to obtain first multispectral data; performing a zero-mean normalization operation on the first multispectral data to obtain second multispectral data; One-dimensional smoothing filtering is performed on the second multispectral data to obtain preprocessed multispectral data.

4. The method according to any one of claims 1 to 3, characterized in that: The target multispectral feature includes a preset second number of target feature values, and the preset true value multispectral feature includes a preset second number of sample feature values; The step of comparing the target multispectral feature with a preset true value multispectral feature to obtain a result of the authenticity detection of the target to be detected includes: Respectively calculating the similarities between the target feature value and the sample feature value corresponding to the target multispectral feature and the preset true value multispectral feature to obtain a preset second number of similarities; Determining a target similarity mean according to the preset second number of similarities; When the target similarity mean is greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be true; when the target similarity mean is not greater than the preset similarity threshold, the authenticity detection result of the target to be detected is determined to be false.

5. A target authenticity detection device, characterized in that: The device comprises: A module for determining an area to be detected, used to obtain image data of an object to be detected and determine an area to be detected of the object to be detected in the image data; A spectral data acquisition module is used to acquire the spectrum of a specified frequency band in the area to be detected to obtain target multi-spectral data; A noise removal module, used for performing noise removal processing on the target multispectral data to obtain preprocessed multispectral data; A local multispectral feature determination module is used to divide the pre-processed multispectral data into a preset number of multispectral data segments; for each multispectral data segment, calculate the data segment mean of the multispectral data segment; for each multispectral data segment, perform a fast Fourier transform on the multispectral data segment and take the absolute value to obtain a feature data segment of the multispectral data segment; for each multispectral data segment, determine the low-frequency mean of the feature data segment of the multispectral data segment in a specified low-frequency interval and the high-frequency mean in a specified high-frequency interval; for each multispectral data segment, the local multispectral feature of the multispectral data segment includes the data segment mean, the low-frequency mean and the high-frequency mean of the multispectral data segment; A global multispectral feature determination module is used to perform a fast Fourier transform on the pre-processed multispectral data and take an absolute value to obtain global feature data of the pre-processed multispectral data; determine a low-frequency mean value of the global feature data in a specified low-frequency interval and a high-frequency mean value in a specified high-frequency interval; the global multispectral feature includes the low-frequency mean value and the high-frequency mean value of the pre-processed multispectral data; A target multispectral feature determination module is used to splice a plurality of the local multispectral features and the global multispectral features to obtain a target multispectral feature; The authenticity detection result determination module is used to compare the target multispectral feature with the preset true value multispectral feature to obtain the authenticity detection result of the target to be detected.

6. The device according to claim 5, characterized in that The module for determining the area to be detected is specifically used for: Acquire image data of the target to be detected, and convert the image data into a YUV format; According to a preset area division method, the image data in YUV format is divided into a plurality of target image areas; For each target image area, calculate the average variance of the Y component and the average saturation of the UV component of each pixel in the target image area; The target image region with the highest average saturation is selected from the target image region with the smallest average variance to obtain the region to be detected.

7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to implement the target authenticity detection method described in any one of claims 1-4 when executing the program stored in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the target authenticity detection method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Multi-light spectrum palm print identity authentication method and its special-purpose collection instrument

    CN101211410A

  • An object identification method based on multi-layer information

    CN109145799A