Image anti-counterfeiting identification method and system based on random texture
Through multispectral image processing technology, using superpixel segmentation and multi-kernel learning methods, a support vector machine classifier with combined kernel functions is constructed, which solves the problem of insufficient utilization of texture and structural information in existing banknote anti-counterfeiting technology and realizes efficient recognition of highly simulated counterfeit banknotes.
Patent Information
- Application Number
- CN202511008495.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing banknote anti-counterfeiting technology has difficulty in deeply mining the fine texture and spatial structure information contained in multispectral data, and the heterogeneous feature fusion method is insufficient, resulting in limited improvement in recognition performance.
By acquiring multispectral images of banknotes in multiple spectral bands, superpixel segmentation and steerable pyramid are used to extract anisotropic phase consistency features. Combined with weighted undirected graph and multi-kernel learning methods, a combined kernel function is constructed and applied to support vector machine classifier for recognition.
The recognition accuracy of highly simulated counterfeit banknotes has been improved. The extracted random texture features are highly stable, the spectral spatial structure features are difficult to imitate, and the multi-core learning optimization combination has improved the discrimination ability.
Smart Images

Figure CN120612759A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of anti-counterfeiting identification, and in particular to an image anti-counterfeiting identification method and system based on random textures. Background Art
[0002] Banknotes, as legal tender, are an important medium of exchange, and their security is directly linked to national financial stability and socioeconomic order. Traditional banknote anti-counterfeiting technologies rely primarily on manual identification and supplementary authentication with simple devices such as UV lamps and magnetic detectors. Manual identification methods are highly subjective, inefficient, and inadequate for counterfeit banknotes, which are increasingly realistic and difficult to detect. Simple physical detection equipment can only verify a single or a few security features, allowing counterfeiters to circumvent detection by mimicking specific material properties, resulting in limited anti-counterfeiting capabilities. With the advancement of computer vision technology, automatic recognition methods based on image processing have emerged. Early research focused on acquiring RGB or grayscale banknote images under visible light, using methods such as color histograms, edges, optical character recognition (OCR), or basic texture features such as gray-level co-occurrence matrices to determine authenticity. However, these methods capture a single dimension of information. For counterfeit banknotes with sophisticated printing techniques and highly accurate imitations of colors and basic patterns, their recognition accuracy and robustness are insufficient to meet practical application requirements. Furthermore, they are susceptible to interference from external factors such as lighting variations, wrinkles, and stains on the banknote. To overcome the limitations of a single imaging mode, acquiring banknote images under multiple narrowband spectra can capture spectral differences in materials such as ink and paper fibers that are indistinguishable to the human eye and conventional cameras, significantly enriching the feature information available for identification. Currently, anti-counterfeiting techniques using multispectral imagery typically focus on analyzing pixel spectral curves or independently extracting traditional texture features such as local binary patterns and Gabor features from each spectral channel. These features are then simply concatenated and fed into a classifier. These approaches suffer from several shortcomings: first, they fail to fully exploit the highly random and unique microtexture structure of banknotes, which is formed by paper fibers and the unique printing process. Second, they often overlook the spatial layout and interrelationships of different spectral response regions, effectively failing to utilize the spectral-spatial structural information. When fusing multiple features of different properties, simple serial or parallel approaches fail to adaptively adjust their weights based on their contribution to the classification task, potentially leading to information redundancy or the loss of critical information, limiting the improvement in recognition performance. Therefore, how to deeply mine the fine texture and spatial structure information contained in multispectral data and realize the effective fusion of heterogeneous features is a difficult problem that needs to be overcome in current banknote anti-counterfeiting technology. Summary of the Invention
[0003] In order to improve the accuracy of identifying the authenticity of banknotes and bills, the present invention provides an image anti-counterfeiting identification method based on random texture, comprising the following steps: Acquire a multispectral image of a predetermined area of the banknote to be tested in N different spectral bands, where N is an integer greater than or equal to 3; perform superpixel segmentation on the multispectral image, construct a steerable pyramid based on the internal pixels of the superpixels to extract anisotropic phase consistency features, and obtain random texture features by performing an inner product operation with a preset intrinsic texture basis learned from a genuine banknote sample; A weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency between superpixels as nodes, the eigenvalue spectrum of the normalized Laplace matrix of the weighted undirected graph is calculated, and the entropy, skewness and kurtosis of the eigenvalue spectrum are used as spectral spatial structure features; A Gaussian radial basis kernel function and a spectral distance kernel function are defined for the random texture features and spectral spatial structure features, respectively. A multi-kernel learning method is used to calculate the optimal linear combination weight of the two kernel functions by collaboratively maximizing the correlation between the kernel function and the target and minimizing the empirical risk of the classifier, thus constructing a combined kernel function. The combined kernel function is applied to a pre-trained support vector machine classifier, and the authenticity of the banknote to be tested is determined according to the output result of the classifier.
[0004] Optionally, the step of obtaining a multispectral image of a preset area of the banknote to be tested in N different spectral bands is specifically as follows: N is set to 8, and the 8 spectral bands are 450nm, 530nm, 660nm, 780nm, 850nm, 940nm, 1050nm and 1200nm; the preset area is the portrait area on the front of the banknote.
[0005] Optionally, constructing a steerable pyramid based on internal pixels of a superpixel to extract anisotropic phase consistency features is specifically as follows: The multispectral image is segmented into 500 superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm; A steerable pyramid with 4 scales and 6 directions is constructed for each superpixel to obtain anisotropic phase-consistency features.
[0006] Optionally, the weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency relationship between nodes, specifically: Calculate the mean vector of any two superpixels i and j in N spectral bands and , and the global covariance matrix Σ; By formula Calculate the spectral Mahalanobis distance between nodes; The weight of an edge between superpixels i and j is iff they are spatially adjacent. for , where σ is the distance scaling parameter, and the weight is 0 if there is no adjacency.
[0007] Optionally, the constructing of the combined kernel function is specifically: Applying Gaussian radial basis kernel function to the random texture feature to obtain the first kernel function ; A second kernel function is obtained by defining a spectrum distance kernel function based on the spectral spatial structure feature ; Through linear combination A combined kernel function is constructed, where the weight coefficient β is determined by co-maximizing the correlation between the kernel function and the target, and the value range of β is [0, 1].
[0008] Optionally, the support vector machine classifier is a model pre-trained on a data set containing samples of genuine banknotes and counterfeit banknotes, wherein genuine banknote samples are marked as +1 and counterfeit banknote samples are marked as -1; The judgment of the banknote to be tested is based on the output value of the support vector machine classifier to the combined kernel function input. When the output value is +1, it is judged to be a real banknote, and when the output value is -1, it is judged to be a counterfeit banknote.
[0009] On the other hand, the present invention also proposes an image anti-counterfeiting recognition system based on random texture, comprising the following modules: A random texture acquisition module is configured to acquire a multispectral image of a predetermined region of the banknote to be tested in N different spectral bands, where N is an integer greater than or equal to 3; perform superpixel segmentation on the multispectral image, construct a steerable pyramid based on the internal pixels of the superpixels to extract anisotropic phase consistency features, and obtain random texture features by performing an inner product operation with a preset intrinsic texture basis learned from a genuine banknote sample; A structural feature acquisition module is used to construct a weighted undirected graph based on the spectral Mahalanobis distance and spatial adjacency relationship between superpixels, calculate the eigenvalue spectrum of the normalized Laplace matrix of the weighted undirected graph, and use the entropy, skewness and kurtosis of the eigenvalue spectrum as spectral spatial structural features; A kernel function acquisition module is used to define a Gaussian radial basis kernel function and a spectral distance kernel function for the random texture features and the spectral spatial structure features, respectively, and adopt a multi-kernel learning method to calculate the optimal linear combination weight of the two kernel functions by collaboratively maximizing the correlation between the kernel function and the target and minimizing the empirical risk of the classifier to construct a combined kernel function; The recognition module is used to apply the combined kernel function to a pre-trained support vector machine classifier and determine the authenticity of the banknote to be tested according to the output result of the classifier.
[0010] Optionally, the step of obtaining a multispectral image of a preset area of the banknote to be tested in N different spectral bands is specifically as follows: N is set to 8, and the 8 spectral bands are 450nm, 530nm, 660nm, 780nm, 850nm, 940nm, 1050nm and 1200nm; the preset area is the portrait area on the front of the banknote.
[0011] Optionally, constructing a steerable pyramid based on internal pixels of a superpixel to extract anisotropic phase consistency features is specifically as follows: The multispectral image is segmented into 500 superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm; A steerable pyramid with 4 scales and 6 directions is constructed for each superpixel to obtain anisotropic phase-consistency features.
[0012] Optionally, the weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency relationship between nodes, specifically: Calculate the mean vector of any two superpixels i and j in N spectral bands and , and the global covariance matrix Σ; By formula Calculate the spectral Mahalanobis distance between nodes; The weight of an edge between superpixels i and j is iff they are spatially adjacent. for , where σ is the distance scaling parameter, and the weight is 0 if there is no adjacency.
[0013] Optionally, the constructing of the combined kernel function is specifically: Apply Gaussian radial basis kernel function to the random texture feature and spectral spatial structure feature respectively to obtain the first kernel function and the second kernel function ; Through linear combination A combined kernel function is constructed, where the weight coefficient β is determined by co-maximizing the correlation between the kernel function and the target, and the value range of β is [0, 1].
[0014] Optionally, the support vector machine classifier is a model pre-trained on a data set containing samples of genuine banknotes and counterfeit banknotes, wherein genuine banknote samples are marked as +1 and counterfeit banknote samples are marked as -1; The judgment of the banknote to be tested is based on the output value of the support vector machine classifier to the combined kernel function input. When the output value is +1, it is judged to be a real banknote, and when the output value is -1, it is judged to be a counterfeit banknote.
[0015] The present invention discloses a banknote anti-counterfeiting identification method. Compared with the existing technology, its beneficial effects are: 1) spectral fingerprint information of materials such as ink and paper that is beyond the recognition range of the human eye and ordinary cameras is obtained through multi-spectral imaging technology. The extracted random texture features, through the combination of a controllable pyramid and an intrinsic texture basis, obtain a highly unique microstructure formed by paper fibers and a special printing process, which is insensitive to changes in illumination and has strong feature stability; 2) spectral response and spatial distribution are uniformly modeled, and the extracted spectral spatial structure features can describe the layout rules of different anti-counterfeiting materials from a macroscopic level, and this feature is difficult to imitate; and the microscopic random texture features and the macroscopic spectral spatial structure features are optimized and combined through a multi-kernel learning method, fully leveraging the complementary advantages of the two heterogeneous information, constructing a classification model with stronger discrimination ability, thereby improving the recognition accuracy of highly simulated counterfeit banknotes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Schematic diagram of edge weight calculation for spatiotemporal graph; Figure 2 is a schematic diagram of a multispectral image; Figure 3 Schematic diagram of steerable pyramid feature extraction; Figure 4 Schematic diagram of combining kernels for multi-core learning; Figure 5 Schematic diagram of support vector machine classification. DETAILED DESCRIPTION
[0017] 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 embodiments described 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 those skilled in the art without making creative efforts are within the scope of protection of this application.
[0018] The terms "first", "second" and corresponding terminology numbers in the specification and claims of this application 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 terms used in this way can be interchanged under appropriate circumstances. This is merely a way of distinguishing when describing objects with the same properties in the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units, but may include other units that are not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0019] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. The term "and / or" or the character " / " in this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B, or A / B, can mean: A exists alone, A and B exist at the same time, or B exists alone. Specific embodiments
[0021] The present invention provides an image anti-counterfeiting recognition method based on random texture, such as Figure 1 As shown, the following steps are included: S1, obtaining a multispectral image of a predetermined area of a banknote to be tested in N different spectral bands, where N is an integer greater than or equal to 3; performing superpixel segmentation on the multispectral image, constructing a steerable pyramid based on the internal pixels of the superpixels to extract anisotropic phase consistency features, and obtaining random texture features by performing an inner product operation with a preset intrinsic texture basis learned from a genuine banknote sample; For the acquisition of multispectral images, in an optional embodiment, an industrial camera equipped with a liquid crystal tunable filter or a set of discrete bandpass filters is used to aim at a preset area of the banknote and sequentially capture images of N spectral channels. For example, eight bands with central wavelengths of 450 nm, 530 nm, 660 nm, 780 nm, 850 nm, 940 nm, 1050 nm and 1200 nm are selected to form a multispectral data cube, such as Figure 2 As shown. These bands are chosen because different types of inks and papers exhibit completely different reflection or absorption characteristics at these specific wavelengths. For example, an ink that appears black under visible light may become transparent or have high reflectivity under 940nm infrared light, a phenomenon that is difficult to imitate by ordinary counterfeiting technology. By collecting images in these eight bands, rich information that far exceeds the recognition capabilities of the human eye can be obtained. The portrait area is usually the most complex part of the banknote design and the part with the most concentrated anti-counterfeiting technology. It contains fine textures, microtext and other invisible features produced by intaglio printing. In one embodiment, focusing the analysis on the portrait area can reduce the amount of data that needs to be processed while ensuring recognition accuracy, thereby improving the efficiency and speed of the entire recognition process. This targeted area selection allows the system to focus on the key information that can best distinguish authenticity.
[0022] The Simple Linear Iterative Clustering (SLIC) algorithm is used to segment the multispectral image into several compact and similarly sized superpixel regions. For all pixels within each superpixel, a steerable pyramid with four scales and six directions is constructed, and a phase-consistency map is calculated for each scale and direction. The response values of all maps are concatenated to form the phase-consistency feature vector for the superpixel. The preset intrinsic texture basis is obtained by performing principal component analysis (PCA) on a set of phase-consistency feature vectors extracted from a large number of genuine banknote samples and taking the first K principal component vectors. The inner product of the phase-consistency feature vector of the current superpixel is performed one by one with these K intrinsic texture basis vectors to obtain a K-dimensional random texture feature vector.
[0023] In a preferred embodiment, constructing a steerable pyramid based on the internal pixels of a superpixel to extract anisotropic phase consistency features is specifically as follows: The multispectral image is segmented into 500 superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm; A steerable pyramid with 4 scales and 6 directions is constructed for each superpixel to obtain anisotropic phase-consistency features.
[0024] Using a simple linear iterative clustering algorithm, the acquired multispectral image of the portrait area is segmented into 500 superpixels. Superpixels are collections of pixels that are similar in color and spatial position. This simplifies the image from millions of pixels into 500 meaningful blocks. This not only greatly reduces the complexity of subsequent computations, but also allows for better preservation of the image's local structural information through block-based analysis, reducing interference from individual pixel noise and making feature extraction more stable.
[0025] After obtaining the superpixel segmentation, a steerable pyramid with 4 different scales and 6 different directions is constructed for each superpixel. The steerable pyramid can comprehensively examine the texture details inside the superpixel from coarse to fine and from different angles. Figure 3 A schematic diagram of an operational pyramid decomposition at three scales and three directions is shown. By calculating anisotropic phase-congruence features, this embodiment can detect fine, directional lines and textures on banknotes produced by processes such as intaglio printing. These features are insensitive to illumination variations. Furthermore, the multi-scale, multi-directional analysis ensures that even the most subtle differences in printed texture can be accurately quantified, enabling the distinction between the fine craftsmanship of genuine banknotes and the crude imitations of counterfeit banknotes.
[0026] S2, constructing a weighted undirected graph based on the spectral Mahalanobis distance and spatial adjacency between superpixels as nodes, calculating the eigenvalue spectrum of the normalized Laplacian matrix of the weighted undirected graph, and using the entropy, skewness, and kurtosis of the eigenvalue spectrum as spectral spatial structure features; Each node in the weighted undirected graph represents a superpixel. If two superpixels are directly adjacent in space, an edge is established between the corresponding nodes. The weight of the edge is determined by the spectral Mahalanobis distance, which is the Mahalanobis distance between the average spectral vectors of two superpixels calculated using the spectral covariance matrix of all pixels in the entire image. The weight value is set to the negative exponential function value of the distance. Based on the weighted adjacency matrix, the normalized Laplace matrix of the graph is constructed, and the eigenvalue decomposition is performed on it to obtain the spectrum composed of all eigenvalues. The three statistics of the Shannon entropy, the third-order moment skewness, and the fourth-order moment kurtosis of the spectrum are calculated to form a three-dimensional spectral spatial structure feature vector.
[0027] In a preferred embodiment, the weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency relationship between nodes, specifically: Calculate the mean vector of any two superpixels i and j in N spectral bands and , and the global covariance matrix Σ; By formula Calculate the spectral Mahalanobis distance between nodes; The weight of an edge between superpixels i and j is iff they are spatially adjacent. for , where σ is the distance scaling parameter, and the weight is 0 if there is no adjacency.
[0028] To describe the intrinsic connections between different regions on a banknote, this example uses the superpixels obtained in the previous step as nodes in a graph. Edges in the graph are established only between spatially adjacent superpixels. The constructed graph reflects the physical layout and neighborhood relationships of each region on the banknote image. This integrates the previously discrete superpixel regions into a network with a topological structure.
[0029] The edge weights in the graph, or the strength of the connection between two adjacent superpixels, are quantified by their spectral similarity. The advantage of the Mahalanobis distance is that it accounts for the correlation between the data in eight spectral bands and normalizes it using a global covariance matrix, eliminating the influence of differences in the value range and variance across bands. The smaller the calculated Mahalanobis distance, the more similar the spectral characteristics of the two superpixels, and the greater the weight of the edge between them. This weighted approach captures the spectral relationship between adjacent regions composed of different inks or materials, forming a unique description of the spectral spatial structure of the banknote.
[0030] S3, defining a Gaussian radial basis kernel function and a spectral distance kernel function for the random texture features and the spectral spatial structure features, respectively, and using a multi-kernel learning method to calculate the optimal linear combination weight of the two kernel functions by collaboratively maximizing the correlation between the kernel function and the target and minimizing the empirical risk of the classifier, thereby constructing a combined kernel function; In one embodiment, a standard Gaussian radial basis kernel function is used for random texture features, and an independent Gaussian radial basis kernel function, namely, a spectral distance kernel function, is also used for spectral spatial structure features.
[0031] In another embodiment, the Gaussian radial basis kernel function is , , is the random texture feature vector of sample i and sample j, and the spectrum distance kernel function is ,in, , is the spectral spatial structure feature vector of sample i and sample j, and is a tunable hyperparameter.
[0032] A multi-kernel learning algorithm based on kernel alignment is adopted. The multi-kernel learning algorithm aims to maximize the alignment between the combined kernel and the ideal target kernel matrix. The linear combination weight coefficients of the two kernel functions are iteratively optimized. At the same time, the classifier is trained during the iterative process to ensure the minimum empirical risk, and an optimal combined kernel matrix is obtained.
[0033] In another embodiment, two sets of feature data are extracted from the training samples, namely random texture features and spectral spatial structure features, and the corresponding two basic kernel functions are Gaussian radial basis kernel function k1 and spectral distance kernel function k2; the authenticity labels of all training samples, for example, +1 for genuine banknotes and -1 for counterfeit banknotes. The goal is to construct a combined kernel function In order to find the optimal weight value and ,and The optimization includes two objectives: on the one hand, the similarity between samples measured by the combined kernel function is highly correlated with the true label distribution, that is, real banknotes are similar to real banknotes and dissimilar to counterfeit banknotes; on the other hand, the classification error rate of the support vector machine (SVM) classifier using the combined kernel function on all training samples should be minimized.
[0034] The process of finding the optimal weight is obtained through an optimization algorithm. An objective function consisting of two parts is established, which quantifies the correlation between the kernel function and the target and the empirical risk of the classifier. The weight is given at the beginning. and A set of initial values, for example, all 50%. Then an iterative loop is performed: in each step, a temporary kernel function is combined based on the current weights, and the SVM classifier is trained with the temporary kernel function. Then the total score of the objective function is calculated, that is, how low the risk is and how high the correlation is. Based on the score, an optimization algorithm such as gradient descent calculates the direction to adjust the weights so that the total score will be better in the next iteration. Until the weights and The value of converges and stabilizes, and no longer changes significantly. The weight after convergence is the optimal linear combination weight used to construct the combined kernel function.
[0035] In one embodiment, the linear combination weight coefficient β to be optimized is obtained by solving a joint optimization problem. The joint optimization problem combines the search for the optimal weight β and the training of the support vector machine classifier in the same objective function. The objective function is to find the optimal combination kernel under the condition that the weight constraint is satisfied to maximize the classification interval of the support vector machine classifier on the training samples. The joint optimization problem is expressed as the following maximum-maximization problem in the dual form of the support vector machine:
[0036] Where L is the total number of training samples; , is the feature vector of the i-th and j-th training samples; are the category labels of the i-th and j-th training samples respectively; is the Lagrange multiplier in the dual problem of support vector machine; The Grange multiplier Constraints must be met as well as , where C is the preset regularization penalty coefficient; The optimal weight coefficient is obtained by solving the joint optimization problem And the corresponding optimal Lagrangian set ; Using the optimal weight coefficient Constructing a combined kernel function And applied to the pre-trained support vector machine classifier, the decision function of the classifier is composed of the optimal Lagrange multiplier set and the training samples.
[0037] The inner maximization of the maximum-maximization problem corresponds to minimizing the empirical risk of the classifier. SVM finds the optimal classification hyperplane by maximizing the classification interval, and maximizing the interval is also a risk minimization strategy. The outer maximization corresponds to maximizing the correlation between the kernel function and the target, trying different combinations of kernel functions until an optimal combination kernel is found. The best criterion is whether it can make the inner SVM classifier achieve the highest performance level within the possible range.
[0038] In a preferred embodiment, the construction of the combined kernel function is specifically as follows: Applying Gaussian radial basis kernel function to the random texture feature to obtain the first kernel function ; A second kernel function is obtained by defining a spectrum distance kernel function based on the spectral spatial structure feature ; Through linear combination A combined kernel function is constructed, where the weight coefficient β is determined by co-maximizing the correlation between the kernel function and the target, and the value range of β is [0, 1].
[0039] Since a single type of feature may not be sufficient to fully capture all the differences between genuine and counterfeit banknotes, this embodiment integrates two complementary information: random texture features and spectral spatial structure features. In order to effectively integrate these two features of different nature into the support vector machine classifier, random texture feature vectors representing microscopic details are extracted from the banknote image. However, these features are very complex, and the feature vectors of genuine and counterfeit banknotes may be difficult to distinguish using a simple rule in the original space. The Gaussian radial basis kernel function (RBF kernel) does not directly compare the values of the two feature vectors, but calculates their similarity in a higher-dimensional feature space. If the two texture features are very similar, the kernel function will give a high score close to 1; otherwise, it will give a low score close to 0, resulting in a texture-based similarity matrix. The spectral spatial structural features calculated by graph theory methods, namely the three values of entropy, skewness and kurtosis, are the structural summary of the overall color layout and complexity of the banknote. In order to enable the classifier to better utilize this information, the spectral distance kernel function is used to measure the similarity of the structural summaries between different banknotes and calculate how similar the structural summary vectors of two banknotes are. One implementation method is to use the Gaussian radial basis kernel function again to calculate and obtain a similarity matrix representing the spectral spatial structure. .
[0040] The two kernel matrices are fused into a single combined kernel function via a weighted linear combination. The weight coefficient β determines the relative importance of texture features and spectral spatial structure features in the final decision. The value of β is learned using an optimization algorithm that maximizes kernel-target alignment. The optimization algorithm that maximizes kernel-target alignment searches for an optimal β value based on the training data, ensuring that the fused combined kernel is consistent with the true classification label (real or counterfeit), thereby maximizing classifier performance. Figure 4 Schematic diagram of combining kernels for multi-core learning.
[0041] S4, applying the combined kernel function to a pre-trained support vector machine classifier, and determining the authenticity of the banknote to be tested according to the output result of the classifier.
[0042] A binary support vector machine model is trained using a training set containing a large number of known genuine and counterfeit banknotes and the optimal combined kernel function calculated in the previous steps. During the recognition phase, two features are extracted from the banknotes and fed into the pre-trained support vector machine model. The model uses the combined kernel function to calculate a decision value and outputs a classification label. For example, a positive output of 1 indicates a genuine banknote, while a negative output of 1 indicates a counterfeit banknote.
[0043] In a preferred embodiment, the support vector machine classifier is a model pre-trained on a data set containing samples of genuine banknotes and counterfeit banknotes, wherein genuine banknote samples are marked as +1 and counterfeit banknote samples are marked as -1; The judgment of the banknote to be tested is based on the output value of the support vector machine classifier to the combined kernel function input. When the output value is +1, it is judged to be a real banknote, and when the output value is -1, it is judged to be a counterfeit banknote.
[0044] During the training phase, a large dataset is prepared, containing numerous samples of authenticated genuine banknotes and various types of counterfeit banknotes. In this dataset, each genuine banknote is assigned a label of positive 1, while each counterfeit banknote is assigned a label of negative 1. Using this labeled dataset and the combined kernel function described above, the support vector machine algorithm learns an optimal decision model that can most effectively distinguish genuine from counterfeit banknotes in the feature space.
[0045] When a banknote needs to be authenticated, its features are extracted according to the previous steps and its combined kernel function representation is calculated. This representation is then input into the trained support vector machine model. The model performs calculations based on the learned decision rules and outputs a discriminant value. If the output value is positive 1, the system determines that the banknote is genuine; if the output value is negative 1, it is considered counterfeit. Figure 5 shown.
[0046] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some feature data can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0047] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0048] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0049] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
Claims
1. A random texture-based image anti-counterfeiting recognition method, characterized in that: The following steps are involved: Acquire a multispectral image of a predetermined area of the banknote to be tested in N different spectral bands, where N is an integer greater than or equal to 3; perform superpixel segmentation on the multispectral image, construct a steerable pyramid based on the internal pixels of the superpixels to extract anisotropic phase consistency features, and obtain random texture features by performing an inner product operation with a preset intrinsic texture basis learned from a genuine banknote sample; A weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency between superpixels as nodes, the eigenvalue spectrum of the normalized Laplace matrix of the weighted undirected graph is calculated, and the entropy, skewness and kurtosis of the eigenvalue spectrum are used as spectral spatial structure features; A Gaussian radial basis kernel function and a spectral distance kernel function are defined for the random texture features and spectral spatial structure features, respectively. A multi-kernel learning method is used to calculate the optimal linear combination weight of the two kernel functions by collaboratively maximizing the correlation between the kernel function and the target and minimizing the empirical risk of the classifier, thus constructing a combined kernel function. The combined kernel function is applied to a pre-trained support vector machine classifier, and the authenticity of the banknote to be tested is determined according to the output result of the classifier.
2. The method according to claim 1, characterized in that The method of obtaining a multispectral image of a preset area of the banknote to be tested in N different spectral bands is specifically as follows: N is set to 8, and the 8 spectral bands are 450nm, 530nm, 660nm, 780nm, 850nm, 940nm, 1050nm and 1200nm; the preset area is the portrait area on the front of the banknote.
3. The method according to claim 1, characterized in that The method of constructing a steerable pyramid based on the internal pixels of superpixels to extract anisotropic phase consistency features is as follows: The multispectral image is segmented into 500 superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm; A steerable pyramid with 4 scales and 6 directions is constructed for each superpixel to obtain anisotropic phase-consistency features.
4. The method according to claim 1, wherein The weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency relationship between nodes, specifically: Calculate the mean vector of any two superpixels i and j in N spectral bands and , and the global covariance matrix Σ; By formula Calculate the spectral Mahalanobis distance between nodes; The weight of an edge between superpixels i and j is iff they are spatially adjacent. for , where σ is the distance scaling parameter, and the weight is 0 if there is no adjacency.
5. The method according to claim 1, wherein The construction of the combined kernel function is specifically as follows: Applying Gaussian radial basis kernel function to the random texture feature to obtain the first kernel function ; A second kernel function is obtained by defining a spectrum distance kernel function based on the spectral spatial structure feature ; Through linear combination A combined kernel function is constructed, where the weight coefficient β is determined by co-maximizing the correlation between the kernel function and the target, and the value range of β is [0, 1].
6. The method according to claim 1, characterized in that The support vector machine classifier is a model pre-trained on a data set containing samples of real and counterfeit banknotes, where real banknote samples are marked as +1 and counterfeit banknote samples are marked as -1; The judgment of the banknote to be tested is based on the output value of the support vector machine classifier to the combined kernel function input. When the output value is +1, it is judged to be a real banknote, and when the output value is -1, it is judged to be a counterfeit banknote.
7. An image anti-counterfeiting recognition system based on random texture, characterized in that: Includes the following modules: A random texture acquisition module is configured to acquire a multispectral image of a predetermined region of the banknote to be tested in N different spectral bands, where N is an integer greater than or equal to 3; perform superpixel segmentation on the multispectral image, construct a steerable pyramid based on the internal pixels of the superpixels to extract anisotropic phase consistency features, and obtain random texture features by performing an inner product operation with a preset intrinsic texture basis learned from a genuine banknote sample; A structural feature acquisition module is used to construct a weighted undirected graph based on the spectral Mahalanobis distance and spatial adjacency relationship between superpixels, calculate the eigenvalue spectrum of the normalized Laplace matrix of the weighted undirected graph, and use the entropy, skewness and kurtosis of the eigenvalue spectrum as spectral spatial structural features; A kernel function acquisition module is used to define a Gaussian radial basis kernel function and a spectral distance kernel function for the random texture features and the spectral spatial structure features, respectively, and adopt a multi-kernel learning method to calculate the optimal linear combination weight of the two kernel functions by collaboratively maximizing the correlation between the kernel function and the target and minimizing the empirical risk of the classifier to construct a combined kernel function; The recognition module is used to apply the combined kernel function to a pre-trained support vector machine classifier and determine the authenticity of the banknote to be tested according to the output result of the classifier.
8. The system according to claim 7, characterized in that The method of obtaining a multispectral image of a preset area of the banknote to be tested in N different spectral bands is specifically as follows: N is set to 8, and the 8 spectral bands are 450nm, 530nm, 660nm, 780nm, 850nm, 940nm, 1050nm and 1200nm; the preset area is the portrait area on the front of the banknote.
9. The system according to claim 7, wherein: The method of constructing a steerable pyramid based on the internal pixels of superpixels to extract anisotropic phase consistency features is as follows: The multispectral image is segmented into 500 superpixels using the Simple Linear Iterative Clustering (SLIC) algorithm; A steerable pyramid with 4 scales and 6 directions is constructed for each superpixel to obtain anisotropic phase-consistency features.
10. The system according to claim 7, wherein: The weighted undirected graph is constructed based on the spectral Mahalanobis distance and spatial adjacency relationship between nodes, specifically: Calculate the mean vector of any two superpixels i and j in N spectral bands and , and the global covariance matrix Σ; By formula Calculate the spectral Mahalanobis distance between nodes; The weight of an edge between superpixels i and j is iff they are spatially adjacent. for , where σ is the distance scaling parameter, and the weight is 0 if there is no adjacency.