Counterfeit currency automatic identification method and device based on hyperspectral imaging

Through calibration, correction and analysis of hyperspectral imaging technology, the inefficiency and high cost problems of existing counterfeit currency detection are solved, and efficient and accurate counterfeit currency identification is achieved.

CN120340160APending Publication Date: 2025-07-18WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510459556.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing counterfeit currency detection technology relies on ultraviolet light detection, and the process is slow and error-prone, and hyperspectral imaging equipment is costly and inconvenient, and differences in spectral segment sensitivity lead to a decrease in classification accuracy.

Method used

The automatic identification method of counterfeit currency based on hyperspectral imaging is adopted. By obtaining RGB images and reflection spectral data, calibration and conversion, nonlinear correction and dark current correction, a color correction matrix is constructed, color correction and principal component analysis are performed, and the color difference value is calculated to identify counterfeit currency.

Benefits of technology

Improve the accuracy of counterfeit currency identification, reduce costs, reduce human errors, improve detection efficiency, and make the device portable and stable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120340160A_ABST
    Figure CN120340160A_ABST
Patent Text Reader

Abstract

The invention discloses a counterfeit currency automatic identification method and device based on hyperspectral imaging. The method comprises the following steps: acquiring an RGB image and reflection spectrum data of a banknote to be detected; calibrating the RGB image, and converting the RGB value of the calibrated RGB image into an XYZ standard color space to obtain XYZ image data; converting the reflection spectrum data into an XYZ standard color space to obtain XYZ reflection spectrum data; performing nonlinear correction and dark current correction on camera parameters; constructing a color correction matrix based on the corrected camera parameters, performing color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectrum data, and comparing the corrected XYZ image data with the XYZ reflection spectrum data; and converting the corrected XYZ image data into a CIELAB color space, calculating a color difference value between the real currency and the corrected XYZ image data, and when the color difference value exceeds a preset color difference threshold value, determining that the to-be-detected paper currency is a counterfeit currency. According to the invention, the accuracy of counterfeit currency detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of banknote recognition, and particularly to an automatic counterfeit banknote recognition method, device, storage medium and electronic device based on hyperspectral imaging. Background Art

[0002] In recent years, counterfeit banknotes have circulated rapidly in various economies around the world, causing serious harm to the financial market and social order. Due to the continuous development of forgery technology, the production of counterfeit banknotes has become increasingly sophisticated, making it difficult for the human eye to distinguish between genuine and fake banknotes.

[0003] Existing counterfeit banknote detection technologies usually rely on ultraviolet (UV) light to detect ink marks invisible to the human eye. However, this method requires manual operators to verify the authenticity of banknotes one by one, which is not only a slow process but also prone to errors.

[0004] In addition, although hyperspectral imaging (HSI) systems have been applied in other anti-counterfeiting detections, they have not been widely used in counterfeit banknote detection. Near-infrared hyperspectral imaging (NIR-HSI) has been developed in recent years for detecting forged documents, but there are still many limitations, such as: expensive and not portable equipment: most existing hyperspectral and multispectral devices require expensive components such as spectrometers, optical heads, and multispectral or hyperspectral lighting systems, resulting in high equipment costs and inconvenience in carrying; sensitivity differences in different spectral bands: in the spectral bands of different wavelengths in the existing methods, the gray values of counterfeit banknotes and genuine banknotes are similar, resulting in a decrease in classification accuracy. Summary of the Invention

[0005] Embodiments of this application provide an automatic counterfeit banknote recognition method, device, storage medium and electronic device based on hyperspectral imaging, which can improve the accuracy of counterfeit banknote recognition and reduce the cost of counterfeit banknote recognition.

[0006] Embodiments of this application provide an automatic counterfeit banknote recognition method based on hyperspectral imaging, including: Obtain the RGB image and reflection spectral data of the banknote to be detected; Calibrate the RGB image and convert the RGB values of the calibrated RGB image to the XYZ standard color space to obtain XYZ image data; Convert the reflection spectral data to the XYZ standard color space to obtain XYZ reflection spectral data; Based on the XYZ image data, perform non-linear correction and dark current correction on the camera parameters to obtain the corrected camera parameters; Construct a color correction matrix based on the corrected camera parameters, perform color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectral data, and compare the corrected XYZ image data with the XYZ reflection spectral data to ensure that they are consistent; Perform principal component analysis on the hyperspectral data to obtain the principal components of the hyperspectral data, and perform spectral reconstruction based on the principal components of the hyperspectral data to obtain a simulated spectrum; Convert the corrected XYZ image data to the CIELAB color space, calculate the color difference between the genuine banknote and the corrected XYZ image data, and when the color difference exceeds a preset color difference threshold, determine that the banknote to be detected is a counterfeit.

[0007] Further, in the above method for automatically identifying counterfeit banknotes based on hyperspectral imaging, wherein the non-linear correction and dark current correction of the camera parameters based on the XYZ image data to obtain the corrected camera parameters include: Calculate the non-linear response correction variable, and perform non-linear correction on the camera parameters through the non-linear response correction scalar. The non-linear response correction variable is:

[0008] where X, Y, and Z respectively represent the X, Y, and Z values corresponding to the conversion of RGB values to the XYZ standard color space, and T is the transpose; Calculate the dark current correction matrix, and perform dark current correction on the camera parameters through the dark current correction matrix. The dark current correction matrix is:

[0009] where is a constant.

[0010] Further, in the above method for automatically identifying counterfeit banknotes based on hyperspectral imaging, wherein the construction of the color correction matrix based on the corrected camera parameters includes: Construct a basic matrix based on the linearized RGB values, and combine the basic matrix with the non-linear response correction variable to avoid overcorrection. The basic matrix is:

[0011] Construct a color correction matrix based on the dark current correction matrix. The color correction matrix is: 。

[0012] Further, in the above-mentioned automatic counterfeit currency recognition method based on hyperspectral imaging, the color correction of the XYZ image data based on the color correction matrix and the XYZ reflection spectral data includes: Perform color correction through the following formula:

[0013]

[0014] Wherein, represents the XYZ reflection spectral data, represents the pseudo-inverse of the matrix and represents the XYZ image data after color correction.

[0015] Further, in the above-mentioned automatic counterfeit currency recognition method based on hyperspectral imaging, after the step of color-correcting the XYZ image data based on the color correction matrix and the XYZ reflection spectral data, it includes: Calculate the root mean square error between the XYZ image data and the XYZ reflection spectral data to evaluate the accuracy of the correction result:

[0016] Wherein, N is the number of color samples.

[0017] Further, in the above-mentioned automatic counterfeit currency recognition method based on hyperspectral imaging, the conversion of the corrected XYZ image data to the CIELAB color space is calculated by the following formula:

[0018]

[0019]

[0020] Wherein, represents the luminance value, represents the color component from green to red, represents the color component from blue to yellow, , , respectively represent the XYZ values of the standard reference white, and the function is an adjustment function.

[0021] Further, in the above-mentioned automatic counterfeit currency recognition method based on hyperspectral imaging, the calculation of the color difference between the genuine currency and the corrected XYZ image data is calculated by the following formula:

[0022]

[0023]

[0024]

[0025]

[0026]

[0027]

[0028] wherein, is the color difference value, is the brightness difference value, is the brightness value of the calibrated XYZ image, is the true coin brightness reference value, is the calibrated color value, is the color value of the calibrated XYZ image, is the true coin color reference value, is the hue angle difference value, is the hue angle value of the calibrated XYZ image, is the true coin hue angle reference value, is the weighting factor, is the scale factor.

[0029] The embodiment of the present application also provides a fake coin automatic recognition device based on hyperspectral imaging, including: A camera for acquiring the RGB image of the banknote to be detected; A lighting lamp for providing uniform illumination when acquiring the RGB image of the banknote to be detected; A diffuser for uniformly scattering the light emitted by the lighting lamp to the entire shooting area; A dimming switch for adjusting the intensity of the optical fiber emitted by the lighting lamp; A touch display screen for receiving user instructions; A microprocessor for identifying the RGB image of the banknote to be detected and determining whether the banknote to be detected is a fake coin.

[0030] The embodiment of the present application also provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions are adapted to be loaded by a processor to execute any one of the above-mentioned fake coin automatic recognition methods based on hyperspectral imaging.

[0031] An embodiment of the present application also provides an electronic device, including a processor and a memory. The processor is electrically connected to the memory. The memory is used to store instructions and data, and the processor is used for the steps in the automatic counterfeit currency recognition method based on hyperspectral imaging described in any one of the above.

[0032] The automatic counterfeit currency recognition method, device, storage medium and electronic device based on hyperspectral imaging provided by the present application. The present application uses hyperspectral imaging technology to accurately analyze the spectral characteristics of the banknote to be detected and genuine banknotes, and accurately identify by comparing the color difference values between the banknote to be detected and counterfeit banknotes, enhancing the classification ability, significantly improving the detection accuracy, avoiding the phenomena of missed detection and misdetection, and at the same time improving the detection efficiency. And the present application further reduces the detection error by correcting the camera parameters and constructing a color correction matrix to correct the XYZ image data. Description of the Drawings

[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0034] Figure 1 It is a flowchart of the automatic counterfeit currency recognition method based on hyperspectral imaging provided by the embodiment of the present application.

[0035] Figure 2 It is another flowchart of the automatic counterfeit currency recognition method based on hyperspectral imaging provided by the embodiment of the present application.

[0036] Figure 3 It is a schematic structural diagram of the automatic counterfeit currency recognition device based on hyperspectral imaging provided by the embodiment of the present application.

[0037] Figure 4 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Detailed Embodiments

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.

[0039] Embodiments of the present application provide a method, apparatus, storage medium, and electronic device for automatically identifying counterfeit banknotes based on hyperspectral imaging. An apparatus for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by embodiments of the present application can be integrated into an electronic device, which can be a device such as a terminal, a server, etc. Among them, the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a microprocessing box, or other devices, etc.

[0040] Please refer to Figure 1 With Figure 2 , Figure 1 is a flowchart of the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by embodiments of the present application. Figure 2 is another flowchart of the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by embodiments of the present application, which is applied to an electronic device. The method for automatically identifying counterfeit banknotes based on hyperspectral imaging is used to convert the acquired RGB image into a visible light spectral image, and identify counterfeit banknotes by calculating the color difference between the spectral data and genuine banknotes. To achieve this goal, it is necessary to accurately establish the mapping relationship between the RGB image and the spectrometer measurement data. Therefore, the present application provides a method for automatically identifying counterfeit banknotes based on hyperspectral imaging, including the following steps: S1. Obtain the RGB image and reflection spectral data of the banknote to be detected.

[0041] Specifically, the banknote can be detected by a spectrometer to obtain the reflection spectral data.

[0042] S2. Calibrate the RGB image, and convert the RGB values of the calibrated RGB image to the XYZ standard color space to obtain XYZ image data.

[0043] The camera is set to save 8-bit JPG format images in the sRGB (0-255) color space. First, the RGB values are converted to linear RGB through a gamma correction function to ensure the physical accuracy of the color data. Next, through the conversion matrix M, the linearized RGB values are converted to the CIE 1931 XYZ standard color space.

[0044] The calibration and conversion are performed through the following formula:

[0045]

[0046]

[0047]

[0048] Among them, Represents the normalized RGB values (ranging from 0 to 1), Represents the gamma correction function for RGB to linearize color values, Represents the matrix for color space correction, and [T] represents the transformation matrix for converting RGB to XYZ color space.

[0049] S3, Convert the reflected spectral data to the XYZ standard color space to obtain the XYZ reflected spectral data.

[0050] When combining image data with laboratory spectral measurements, the key challenge lies in the heterogeneity of the data dimensions of the two. What the camera captures are the integrated values of the RGB three channels, while the spectrometer measures the continuous spectral reflectance in the range of 400 - 700 nm. The present invention converts the spectral data into the CIE 1931 XYZ color space through formulas (5) - (8), essentially constructing a "translator": converting the continuous spectral language of the spectrometer into the color space language equivalent to the camera image. This process enables us to directly compare the color performance of the same object under the two measurement systems, thereby quantifying the inherent bias of the camera system.

[0051] The formula for converting the reflected spectral data into the CIE 1931 XYZ color space is as follows:

[0052] Where, S(λ) represents the spectral power distribution of the light source, R(λ) represents the reflectance of the object at wavelength λ, x(λ), y(λ), z(λ) represent the color matching functions of the XYZ color space, k represents the normalization factor for adjusting the result, X represents the energy of the light source in the long wavelength band (mainly the red and green spectral parts), Y represents the brightness of the color, and Z represents the energy of the light source in the short wavelength band (blue spectral part).

[0053] Through the comparison between the spectral - XYZ conversion and the image data, we have completed two key tasks: 1) established the error distribution map of the camera system; 2) obtained the initial parameter set for non - linear correction. These results provide a quantitative basis for the subsequent color matrix optimization, enabling the algorithm to specifically compensate for sensor defects instead of simply applying general correction coefficients. The output of this step is not only the converted XYZ values but also the "calibration anchor point" for the entire correction process.

[0054] S4, Based on the XYZ image data, perform non - linear correction and dark current correction on the camera parameters to obtain the corrected camera parameters.

[0055] Specifically, calculate the non - linear response correction variable, and perform non - linear correction on the camera parameters through the non - linear response correction scalar. The non - linear response correction variable is:

[0056] Among them, X, Y, and Z respectively represent the values of X, Y, and Z corresponding to the RGB values converted to the XYZ standard color space, and T is the transpose; Calculate the dark current correction matrix, and perform dark current correction on the camera parameters through the dark current correction matrix. The dark current correction matrix is:

[0057] Among them, is a constant.

[0058] S5. Construct a color correction matrix based on the corrected camera parameters, perform color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectral data, and compare the corrected XYZ image data with the XYZ reflection spectral data to ensure that the corrected XYZ image data and the XYZ reflection spectral data are consistent.

[0059] Specifically, construct a basic matrix based on the linearized RGB values, and combine the basic matrix with the non-linear response correction variable to avoid overcorrection. The basic matrix is:

[0060] Construct a color correction matrix based on the dark current correction matrix. The color correction matrix is: .

[0061] Perform color correction through the following formula:

[0062]

[0063] Among them, represents the XYZ reflection spectral data, which are the spectral reflectances of 24 colors obtained by a spectrometer under controlled illumination conditions and converted to the XYZ color space. represents the matrix The pseudo-inverse of, in hyperspectral imaging and color correction, its role is to solve the linear equations that may have redundancy or non-complete reversibility problems, ensuring that the corrected XYZ color data can best fit the standard reference spectrum. represents the XYZ image data after color correction. The role of [C] is to effectively map the spectral data to the XYZ color space so that these standardized data can be used as a reference during the correction process.

[0064] In one embodiment, after the step of performing color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectral data, it includes: Calculate the root mean square error between the XYZ image data and the XYZ reflection spectral data to evaluate the accuracy of the calibration result:

[0065] where N is the number of color samples.

[0066] When the root mean square error of 24 colors is within 0.19, it indicates that the calibration result is very accurate, and at this time, it can be shown that the calibrated XYZ image data and the XYZ reflection spectral data are consistent.

[0067] S6. Perform principal component analysis on the hyperspectral data to obtain the principal components of the hyperspectral data, and perform spectral reconstruction based on the principal components of the hyperspectral data to obtain the simulated spectrum.

[0068] To further analyze the reflection spectral data obtained from the spectrometer ( ), principal component analysis (PCA) is used to reduce the data dimension and improve the data processing efficiency. The purpose of PCA is to find the main components of the data change and represent the data with these components. The steps of PCA include: 1) Data standardization: Standardize the reflection spectral data to ensure that each feature has the same scale.

[0069] 2) Calculate the covariance matrix: Obtain the covariance between features to understand their correlation.

[0070] 3) Eigenvalue decomposition: Find the principal components of the data by eigenvalue decomposition of the covariance matrix.

[0071] 4) Dimensionality reduction: Select the first 6 principal components to represent the main change trend of the data.

[0072] To convert the RGB image data captured by the digital camera into simulated hyperspectral data, the low-dimensional RGB data is mapped to the high-dimensional spectral space to obtain finer spectral features. The significance of this step is to reconstruct the reflection spectra of each wavelength through a specific algorithm (such as a regression model or an interpolation method) so that it can be used for precise analysis of colors and materials.

[0073] S7. Convert the calibrated XYZ image data to the CIELAB color space, calculate the color difference between the genuine banknote and the calibrated XYZ image data, and when the color difference exceeds the preset color difference threshold, determine that the banknote to be detected is a counterfeit.

[0074] The CIELAB color space is a color model based on human eye perception, so it can more accurately evaluate the differences between colors. We convert the corrected XYZ color data into the CIELAB color space. This conversion is a key step in evaluating color differences when detecting genuine and counterfeit coins. By converting the XYZ data into the CIELAB space, it is easier to calculate the visual differences between two color samples. It is calculated by the following formula:

[0075]

[0076]

[0077] Among them, represents the luminance value, represents the color component from green to red, represents the color component from blue to yellow, , , respectively represent the XYZ values of the standard reference white. The function is an adjustment function used to linearize smaller input values.

[0078]

[0079] Among them, n represents the normalized X, Y, and Z values.

[0080] The color difference between the genuine coin and the corrected XYZ image data is calculated by the following formula:

[0081]

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] Among them, is the color difference value, is the luminance difference value, is the luminance value of the corrected XYZ image, is the genuine coin luminance reference value, is the corrected color value, is the color value of the corrected XYZ image, is the color reference value of genuine currency, is the hue angle difference value, is the hue angle value of the corrected XYZ image, is the hue angle reference value of genuine currency, is the weighting factor, is the scale factor.

[0088] Calculated value. If the color difference value exceeds the set threshold of 2.0, it can be determined that the banknote is counterfeit. This threshold is calibrated according to experimental data and visual perception to ensure the accuracy of the judgment.

[0089] The counterfeit currency detection system based on the snapshot hyperspectral imaging algorithm of the present invention has the following significant advantages compared with the prior art: (1) Improve detection efficiency: The present invention adopts snapshot hyperspectral imaging technology, which can quickly capture and process counterfeit currency images, greatly shortening the detection time and improving the overall detection efficiency.

[0090] (2) Enhance detection accuracy: Using hyperspectral imaging technology to accurately analyze the spectral characteristics of counterfeit and genuine currency, enhancing the classification ability, significantly improving the detection accuracy, and avoiding missed detection and misdetection phenomena.

[0091] (3) Reduce the risk of human error: This system has an automatic processing ability, reducing the dependence on manual operations, reducing the risk of errors caused by human factors, and improving the reliability of the detection process.

[0092] (4) The device is economical and portable: By optimizing the system design and using low-cost components, the device is more economical and portable, meeting the convenience requirements in practical applications.

[0093] (5) Stable lighting conditions: A module is designed to keep the lighting conditions constant while reducing all surrounding light, ensuring the stability and reliability of the detection results.

[0094] According to the method described in the above embodiments, this embodiment will further describe from the perspective of a counterfeit currency automatic recognition device based on hyperspectral imaging. The counterfeit currency automatic recognition device based on hyperspectral imaging can be specifically implemented as an independent entity or integrated in an electronic device, which can be a device such as a terminal, a server, etc. Among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a micro processing box, or other devices, etc.

[0095] Please refer to Figure 3 , Figure 3Specifically described is a counterfeit currency automatic recognition device based on hyperspectral imaging provided by an embodiment of the present application, which is applied to an electronic device. The counterfeit currency automatic recognition device based on hyperspectral imaging may include: A camera for acquiring an RGB image of a banknote to be detected.

[0096] A USB camera adopting the UVC (USB Video Class) protocol, which supports the transmission of image and video data through a USB interface and is used to capture images of banknotes. The system identifies and controls the camera through a standard UVC driver. The image data collected by the camera is transmitted to a microprocessor for preliminary processing and storage, and is operated and adjusted through a user interface such as a touch screen. The standardization and plug-and-play characteristics of the UVC camera simplify the hardware integration process and improve the compatibility and adaptability of the system.

[0097] A lighting lamp for providing uniform illumination when acquiring an RGB image of a banknote to be detected.

[0098] Specifically, a COB LED lighting lamp is used. The COB LED lighting lamp plays a key role in providing uniform illumination in the device, ensuring the consistency and stability of light during image acquisition. It controls the intensity of light through interaction with the main control microprocessor and a dimming switch, and closely cooperates with the image acquisition module to achieve high-quality image capture. The COB LED strip has a uniform spectral response in the blue, green, and red spectra.

[0099] A diffuser for uniformly scattering the light emitted by the lighting lamp to the entire shooting area.

[0100] Specifically, a white quartz crystal glue profile diffuser is used. The white quartz crystal glue profile diffuser is installed at the front end of the LED light source and fixed in the same frame as the light source. Through this physical structure, the diffuser uniformly scatters the light emitted by the LED light source to the entire shooting area. When installing, it is necessary to ensure the position and angle of the diffuser so that the light can cover the entire acquisition area in the best way. The diffuser ensures the stability and consistency of light during image acquisition, enabling the camera to capture high-quality images under uniform illumination conditions.

[0101] A dimming switch for adjusting the intensity of the light emitted by the lighting lamp.

[0102] Specifically, an LED dimming switch is used. The LED dimming switch is a device for controlling the brightness of COB LED lighting fixtures. It operates based on control signals sent by a microprocessor, adjusting the light intensity to meet the requirements of image acquisition. The dimming switch receives instructions from the microprocessor and controls the light output of the COB LED lights by adjusting the current or PWM (Pulse Width Modulation) signals, thus ensuring that the captured images maintain high quality and consistency under different lighting conditions.

[0103] A touch display screen for receiving user instructions.

[0104] The TFT (Thin-Film Transistor) touch display screen has a size of 2.8 inches and a resolution of 320×240 16-bit color pixels. It is the human-machine interaction center of the entire device, providing visual feedback by displaying the image acquisition interface and system status. Users can interact through the touch screen to control various parameters of the system. The display is connected to the main control device via SPI (Serial Peripheral Interface) or GPIO (General Purpose Input / Output), and the microprocessor is responsible for processing the update of the display content and the parsing of touch signals, making the entire image acquisition process intuitive and easy to operate.

[0105] A microprocessor for identifying the RGB image of the banknote to be detected and determining whether the banknote to be detected is counterfeit.

[0106] Specifically, an ARM Cortex-A7 Raspberry Pi 4 Model B is used as the microprocessor. The main responsibilities of the microprocessor are to manage the image acquisition process, adjust the lighting system, process data, and interact with other hardware components. By controlling the camera to capture banknote images, it ensures stable light conditions and consistent image quality. At the same time, it provides a touch screen interface to interact with users, performs preliminary processing and storage of data, monitors the operating status of each hardware component, and ensures the stable operation of the system. The microprocessor first initializes each hardware component and adjusts the LED lighting brightness according to the ambient light to ensure the best lighting conditions. When the user starts the acquisition through the touch screen, the microprocessor controls the camera to capture images and receive data, and performs preliminary processing and storage of the images. Throughout the process, the microprocessor continuously monitors the system status and makes real-time adjustments as needed to ensure the accuracy and consistency of the acquisition.

[0107] In specific implementation, each of the above modules and / or units can be implemented as an independent entity, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of each of the above modules and / or units, please refer to the method embodiments above. For the beneficial effects that can be specifically achieved, please also refer to the beneficial effects in the method embodiments above, which will not be elaborated here.

[0108] In addition, an embodiment of the present application further provides an electronic device, which can be a device such as a computer or a tablet computer. The electronic device can implement the steps in any embodiment of the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present invention. For details, please refer to the previous embodiments, which will not be elaborated here.

[0109] Figure 4 The specific structural block diagram of the electronic device provided by the embodiment of the present invention is shown. The electronic device can be used to implement the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided in the above embodiments. The electronic device 500 can be a device such as a terminal or a server. Among them, the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a microprocessing box, or other devices, etc.

[0110] The RF circuit 510 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF circuit 510 may include various existing circuit elements for performing these functions. For example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and so on. The RF circuit 510 can communicate with various networks such as the Internet, an enterprise intranet, a wireless network or communicate with other devices through a wireless network. The above-mentioned wireless network may include a cellular phone network, a wireless local area network or a metropolitan area network. The above-mentioned wireless network can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, and even those that have not been developed yet.

[0111] The memory 520 can be used to store software programs and modules, such as the corresponding program instructions / modules in the above embodiments. The processor 580 executes various functional applications and data processing by running the software programs and modules stored in the memory 520, that is, to implement functions such as taking pictures with the front camera, processing the captured images, and switching the display color of the display content on the display screen. The memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 520 may further include a memory remotely disposed relative to the processor 580, and these remote memories can be connected to the electronic device 500 through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0112] The input unit 530 can be used to receive input digital or character information, and generate a keyboard and a mouse related to user settings and function controls. The display unit 540 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces, and these graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 540 may include a display panel 541. Optionally, the display panel 541 can be configured in the form of an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).

[0113] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the electronic device 500. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, and the speaker 561 converts it into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and then converted into audio data. After the audio data is output to the processor 580 for processing, it is sent to another terminal, such as through the RF circuit 510, or the audio data is output to the memory 520 for further processing. The audio circuit 560 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device 500.

[0114] The electronic device 500 can help the user receive requests, send information, etc. through the transmission module 570 (such as a Wi-Fi module), and it provides the user with wireless broadband Internet access. Although the transmission module 570 is shown in the figure, it can be understood that it does not belong to the essential composition of the electronic device 500 and can be completely omitted within the scope of not changing the essence of the invention according to needs.

[0115] The processor 580 is the control center of the electronic device 500, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 520, and by calling the data stored in the memory 520, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580 either.

[0116] The electronic device 500 also includes a power supply 590 (such as a battery) for powering each component. In some embodiments, the power supply can be logically connected to the processor 580 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 590 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0117] Although not shown, the electronic device 500 also includes a camera (such as a front camera and a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, where one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: Obtain the RGB image and reflection spectrum data of the banknote to be detected; Calibrate the RGB image, and convert the RGB values of the calibrated RGB image to the XYZ standard color space to obtain XYZ image data; Convert the reflection spectrum data to the XYZ standard color space to obtain XYZ reflection spectrum data; Perform non-linear correction and dark current correction on the camera parameters based on the XYZ image data to obtain the corrected camera parameters; Construct a color correction matrix based on the corrected camera parameters, perform color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectrum data, and compare the corrected XYZ image data with the XYZ reflection spectrum data to ensure that the corrected XYZ image data is consistent with the XYZ reflection spectrum data; Perform principal component analysis on the hyperspectral data to obtain the principal components of the hyperspectral data, and perform spectral reconstruction based on the principal components of the hyperspectral data to obtain a simulated spectrum; Convert the corrected XYZ image data to the CIELAB color space, calculate the color difference between the genuine banknote and the corrected XYZ image data, and when the color difference exceeds a preset color difference threshold, determine that the banknote to be detected is a counterfeit banknote.

[0118] In specific implementation, each of the above modules can be implemented as an independent entity, or can be combined arbitrarily and implemented as the same or several entities. For the specific implementation of each of the above modules, reference can be made to the foregoing method embodiments, which will not be elaborated herein.

[0119] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. For this purpose, an embodiment of the present invention provides a storage medium in which multiple instructions are stored, and these instructions can be loaded by a processor to execute the steps of any one of the embodiments of the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present invention.

[0120] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0121] Since the instructions stored in this storage medium can execute the steps in any one of the embodiments of the method for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present invention, the beneficial effects achievable by any of the methods for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present invention can be achieved. For details, refer to the foregoing embodiments, which will not be elaborated herein.

[0122] The above has introduced in detail a method, device, storage medium, and electronic device for automatically identifying counterfeit banknotes based on hyperspectral imaging provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An automatic counterfeit currency recognition method based on hyperspectral imaging, characterized in that, The method includes: Obtaining an RGB image and reflection spectrum data of the banknote to be detected; Calibrating the RGB image, and converting the RGB values of the calibrated RGB image into the XYZ standard color space to obtain XYZ image data; Converting the reflection spectrum data into the XYZ standard color space to obtain XYZ reflection spectrum data; Performing non-linear correction and dark current correction on the camera parameters based on the XYZ image data to obtain corrected camera parameters; Constructing a color correction matrix based on the corrected camera parameters, performing color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectrum data, and comparing the corrected XYZ image data with the XYZ reflection spectrum data to ensure that the corrected XYZ image data is consistent with the XYZ reflection spectrum data; Performing principal component analysis on the hyperspectral data to obtain the principal components of the hyperspectral data, and performing spectral reconstruction based on the principal components of the hyperspectral data to obtain a simulated spectrum; Converting the corrected XYZ image data into the CIELAB color space, calculating the color difference between the genuine banknote and the corrected XYZ image data, and when the color difference exceeds a preset color difference threshold, determining that the banknote to be detected is a counterfeit banknote.

2. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 1, wherein The performing non-linear correction and dark current correction on the camera parameters based on the XYZ image data to obtain corrected camera parameters includes: Calculating a non-linear response correction variable, and performing non-linear correction on the camera parameters through the non-linear response correction scalar, where the non-linear response correction variable is: where X, Y, and Z respectively represent the X, Y, and Z values corresponding to the RGB values converted into the XYZ standard color space, and T is the transpose; Calculating a dark current correction matrix, and performing dark current correction on the camera parameters through the dark current correction matrix, where the dark current correction matrix is: Among them, is a constant.

3. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 2, wherein The constructing a color correction matrix based on the corrected camera parameters includes: Constructing a basis matrix based on the linearized RGB values, and combining the basis matrix with the non-linear response correction variable to avoid overcorrection, where the basis matrix is: Constructing a color correction matrix based on the dark current correction matrix, where the color correction matrix is: 。 4. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 3, wherein The performing color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectrum data includes: Performing color correction through the following formula: Among them, represents the XYZ reflection spectral data, represents the matrix pseudo-inverse of, represents the XYZ image data after color correction.

5. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 1, wherein After the step of performing color correction on the XYZ image data based on the color correction matrix and the XYZ reflection spectrum data, it includes: Calculating the root mean square error between the XYZ image data and the XYZ reflection spectrum data to evaluate the accuracy of the correction result: wherein, N is the number of color samples.

6. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 1, characterized in that The converting the corrected XYZ image data into the CIELAB color space is calculated through the following formula: Among them, represents the luminance value, represents the color component from green to red, represents the color component from blue to yellow, , , respectively represent the XYZ values of the standard reference white, and the function is an adjustment function.

7. The automatic counterfeit currency recognition method based on hyperspectral imaging according to claim 6, wherein The calculating the color difference between the genuine banknote and the corrected XYZ image data is calculated through the following formula: Among them, is the color difference value, is the brightness difference value, is the brightness value of the corrected XYZ image, is the reference brightness value of the genuine coin, is the corrected color value, is the color value of the corrected XYZ image, is the reference color value of the genuine coin, is the hue angle difference value, is the hue angle value of the corrected XYZ image, is the reference hue angle value of the genuine coin, is the weighting factor, is the scale factor.

8. An automatic counterfeit currency recognition device based on hyperspectral imaging, which is used to implement the automatic counterfeit currency recognition method based on hyperspectral imaging described in claim 8, and is characterized in that, It includes: A camera for obtaining an RGB image of the banknote to be detected; A lighting lamp for providing uniform illumination when obtaining an RGB image of the banknote to be detected; A diffuse reflector for uniformly scattering the light emitted by the illumination lamp over the entire shooting area; A dimming switch for adjusting the intensity of the optical fiber emitted by the illumination lamp; A touch display screen for receiving user instructions; A microprocessor for identifying the RGB image of the banknote to be detected and determining whether the banknote to be detected is a counterfeit banknote.

9. A computer-readable storage medium, characterized in that, Multiple instructions are stored in the computer-readable storage medium, and the instructions are adapted to be loaded by a processor to execute the hyperspectral image classification method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, Comprising a processor and a memory, the processor is electrically connected to the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps in the hyperspectral image classification method according to any one of claims 1 to 7.