Paper currency identification method based on deep texture representation
Patent Information
- Application Number
- CN202610974015.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-09-29
AI Technical Summary
同时,复杂的磁性特征检测需要相应的硬件设备支持,这可能增加设备成本
本发明通过并行提取纸币正、反面上四个关键防伪点(变色油墨、变色线、微型文字、白色矩形块)的差异化深度特征,并进行决策级融合,显著提升了鉴伪性能。具体而言,针对变色油墨和变色线,采用HSV色彩空间分析与多维度特征(颜色、结构、形状等)融合比较,增强了颜色仿冒的鉴别力;针对微型文字,通过动态模板匹配定位与局部LBP纹理统计,有效抵抗了印刷偏移与微细纹理伪造;针对白色矩形块,引入像素差分网络(PiDiNet)进行边缘去噪,实现了亚像素级精度的宽高比几何测量。最后,通过多防伪点判别结果的智能融合规则,能够准确区分真币、高仿假币以及因磨损、污渍导致的边界情况。该方法克服了单一特征易被攻破的缺陷,在复杂实际环境下实现了高准确率、高鲁棒性与高效率的纸币鉴伪,有效解决了单一特征易被仿冒的问题,在显著提升鉴伪准确性与可靠性的同时保证了处理效率。
Smart Images

Figure CN122842228A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, and specifically relates to a banknote counterfeiting detection method based on depth texture representation. Background Technology
[0002] With economic development, currency circulation has become increasingly frequent. However, in this process, counterfeiters have become increasingly rampant. After obtaining the anti-counterfeiting features of currency through illegitimate means, they professionally forge the key points of traditional counterfeit detection technologies. For example, they may splice together key anti-counterfeiting features of genuine banknotes to mislead traditional equipment into identifying counterfeit currency as genuine. Furthermore, the counterfeit currency they produce using high-tech methods is extremely realistic, often fooling current mainstream counterfeit currency detection equipment, which has seriously threatened financial security and affected social stability.
[0003] Existing methods for detecting counterfeit banknotes can be mainly divided into three types: methods based on spectral image analysis, manual detection, and methods based on magnetic features.
[0004] 1. Spectral image analysis is currently the most mainstream technology used in counterfeit currency detection equipment. Traditional spectral recognition methods mainly employ infrared light transmission and magnetic signal detection technology. The difference in printing ink between genuine and counterfeit banknotes results in different infrared transmission properties. By illuminating the banknote with infrared light and placing a photoelectric conversion device on the back, false alarms can be detected by analyzing the electrical signal. However, different denominations and regions of the same currency, after being processed with anti-counterfeiting thread and magnetic ink technology, will display different signal waveforms. Magnetic sensors can generate a magnetic induction electromotive force by cutting magnetic lines on the surface. False alarms can then be detected by detecting the magnetic signal waveform. However, with the development of emerging technologies, detection methods have a certain degree of randomness, making these features easy to counterfeit. Furthermore, detecting each feature requires additional hardware, making it difficult to perform accurate calculations for real-time fusion of various security features.
[0005] 2. Manual inspection methods primarily rely on the experience accumulated by staff over many years. Staff visually inspect banknotes for authenticity features (fixed portrait watermarks, fixed floral watermarks, color-changing ink, registration marks, hidden text, etc.) and judge authenticity by touching intaglio patterns to determine if they have a strong tactile feedback. For example, with optically variable denomination numerals, changing the viewing angle causes the numeral's color to change, and a bright band can be seen moving up and down; with optically variable security threads, changing the viewing angle causes the security thread's color to change between red and green, and the bright band moves up and down; the fifth series of RMB banknotes added vertical serial numbers. The prefix and first two digits of the horizontal serial number on the left are dark red, and the last six digits are black, while the prefix and digits of the vertical serial number on the right are blue. However, this method is labor-intensive and inefficient.
[0006] 3. Magnetic feature detection is an effective technology for determining authenticity by identifying the magnetic materials embedded in banknotes. During the production process, special magnetic inks or magnetic strips are embedded in RMB banknotes. The distribution and intensity of these magnetic elements are specific and difficult to imitate. During detection, a magnetic sensor scans the magnetic features on the banknote surface and records its magnetic signal waveform. Genuine banknotes exhibit specific waveform patterns, while counterfeit banknotes, lacking or failing to accurately replicate these magnetic materials, typically do not display the same waveform. Therefore, by comparing the differences in magnetic signals, counterfeit banknotes can be effectively identified. The advantages of magnetic feature detection lie in its efficiency and integration; it can quickly process large quantities of banknotes and can be combined with other detection methods to improve overall accuracy. For example, in ATMs and bank cash handling systems, magnetic detection technology is often combined with optical and ultraviolet detection technologies to provide multi-layered anti-counterfeiting protection. However, magnetic detection technology also faces challenges. With the development of counterfeit banknote manufacturing technology, some highly realistic counterfeit banknotes may mimic magnetic features to a certain extent. Furthermore, complex magnetic feature detection requires corresponding hardware support, which may increase equipment costs.
[0007] In summary, while spectral image analysis-based methods offer high accuracy, the expensive equipment and complex operation and maintenance costs limit their widespread application. Manual inspection relies on the experience and sensory judgment of banknote inspectors, making it susceptible to fatigue and environmental factors, resulting in low accuracy. Magnetic feature detection, although fast and suitable for batch processing, relies on magnetic ink, which may cause it to fail with non-standard or worn banknotes. Furthermore, advancements in counterfeiting technology allow some counterfeit banknotes to partially mimic magnetic features, affecting the reliability of detection. All the aforementioned methods suffer from shortcomings in balancing accuracy and convenience, making it difficult to achieve an ideal balance between the two. Summary of the Invention
[0008] To address the aforementioned problems in the existing technology, this invention provides a banknote counterfeit detection method based on depth texture representation. The technical problem to be solved by this invention is achieved through the following technical solution: This invention provides a banknote counterfeit detection method based on depth texture representation, the method comprising: S1. Obtain the original image of the banknote to be identified and preprocess it to obtain the processed front image and the processed back image; S2. Extract the color-changing ink region from the processed front image and generate a color-changing ink feature map; S3. Extract the color-changing line region from the processed front image and perform segmented feature processing to obtain multiple color-changing line sub-region images; S4. Dynamically locate the national emblem area in the processed front image, and extract the micro-text area based on the positioning result to obtain multiple sampling block images of the micro-text area; S5. Extract the white rectangular block region from the processed back image and calculate the aspect ratio of the white rectangular block region; S6. Based on the feature map of the color-changing ink, the multiple sub-region images of the color-changing line, the multiple sampled block images of the micro-text region, and the aspect ratio of the white rectangular block region, compare them with the corresponding features of the standard genuine banknote sample, and calculate the single-point discrimination results corresponding to the four anti-counterfeiting points: color-changing ink, color-changing line, micro-text, and white rectangular block. S7. Based on all the single-point discrimination results obtained, the final banknote authenticity authentication result is obtained.
[0009] The beneficial effects of this invention are: This invention significantly improves counterfeit detection performance by extracting differentiated depth features of four key anti-counterfeiting points (color-changing ink, color-changing line, microtext, and white rectangular blocks) on the front and back of banknotes in parallel and performing decision-level fusion. Specifically, for the color-changing ink and color-changing line, HSV color space analysis and multi-dimensional feature (color, structure, shape, etc.) fusion comparison are used to enhance the ability to identify color counterfeits. For the microtext, dynamic template matching positioning and local LBP texture statistics are used to effectively resist printing offset and microtexture counterfeits. For the white rectangular blocks, a pixel difference network (PiDiNet) is introduced for edge denoising, achieving sub-pixel level precision in aspect ratio geometric measurement. Finally, through intelligent fusion rules of multi-anti-counterfeiting point discrimination results, it can accurately distinguish between genuine banknotes, high-quality counterfeit banknotes, and boundary conditions caused by wear and stains. This method overcomes the vulnerability of single features to attack, achieving high accuracy, robustness, and efficiency in banknote authentication under complex real-world environments. It effectively solves the problem of single features being easily counterfeited, significantly improving the accuracy and reliability of authentication while ensuring processing efficiency. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a banknote authentication method based on depth texture representation provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the image preprocessing and feature extraction process corresponding to steps S1 to S5 in an embodiment of the present invention; Figure 3 This is a schematic diagram of the multi-anti-counterfeiting point discrimination and final fusion process corresponding to steps S6~S7 in an embodiment of the present invention; Figures 4a-4d This is a visualization of the color-changing ink similarity in step S6 of this embodiment of the invention; Figures 5a-5g This is a visualization of the similarity of the color-changing lines in step S6 of an embodiment of the present invention. Detailed Implementation
[0011] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0012] Edge detection is a technique used in image processing to identify and locate regions of significant brightness variation in an image. Commonly used edge detection algorithms include Sobel and Canny. In this invention, the Canny edge detection algorithm is mainly used for fine processing, and its steps include: Gaussian blur: Gaussian blur is applied to the image through convolution to reduce noise. The formula for this step is: ; in, It is a Gaussian kernel function used to define the weights of neighboring pixels; These are image pixel values. , The neighborhood coordinate index of the convolution kernel is used to traverse all pixels covered by the Gaussian kernel; The half-window size of the Gaussian kernel determines the size of the neighborhood involved in the computation, for example... =1 corresponds to 3 3. Convolution kernel, =2 corresponds to 5 5 convolution kernels, The larger the value, the larger the range of pixels involved in smoothing, resulting in a stronger noise reduction effect but less image detail is preserved.
[0013] Gradient calculation: The Sobel operator is used to calculate the magnitude and direction of the gradient in the image. The formula is: , ; The formulas for calculating gradient magnitude and direction are: , ; in, This represents the gradient component of the image in the horizontal direction (X direction), reflecting the rate of change of pixel grayscale values along the horizontal direction; G represents the gradient component of the image in the vertical direction (Y direction), reflecting the rate of change of pixel gray values along the vertical direction; G is the gradient magnitude, representing the intensity of the edge. The gradient direction represents the angle of the edge's orientation, ranging from [0, 2]. This is used to determine the gradient direction in the subsequent nonmaximum suppression step.
[0014] Non-maximum suppression: Non-maximum suppression is applied to the gradient magnitude along the gradient direction to refine the edges.
[0015] Dual-threshold detection: Edges are identified and connected by setting two thresholds, a high one and a low one. Pixels below the low threshold are suppressed, pixels above the high threshold are preserved, and pixels in between are determined based on connectivity.
[0016] In counterfeit detection projects, banknotes often suffer from noise interference such as stains, wear, and creases due to long-term circulation, affecting the accuracy of feature extraction. This invention considers using a pixel difference convolutional network (PDC) to efficiently eliminate noise, thus effectively solving the noise suppression problem in edge detection. For example, PiDiNet can be used.
[0017] Specifically, addressing several technical challenges currently faced in the field of counterfeit currency detection, this invention proposes a banknote authentication method based on depth texture representation. For example... Figure 1 As shown, the method may include the following steps: S1. Obtain the original image of the banknote to be identified and preprocess it to obtain the processed front image and the processed back image; S2. Extract the color-changing ink region from the processed front image and generate a color-changing ink feature map. S3. Extract the color-changing line region from the processed front image and perform segmented feature processing to obtain multiple color-changing line sub-region images. S4. Dynamically locate the national emblem area in the processed front image, and extract the micro-text area based on the positioning result to obtain multiple sampling block images of the micro-text area; S5. Extract the white rectangular block region from the processed back image and calculate the aspect ratio of the white rectangular block region; S6. Based on the feature map of color-changing ink, multiple sub-region images of color-changing lines, multiple sampled block images of micro-text regions, and the aspect ratio of white rectangular block regions, compare them with the corresponding features of standard genuine banknote samples to calculate the single-point discrimination results of the four anti-counterfeiting points: color-changing ink, color-changing lines, micro-text, and white rectangular blocks. S7. Based on all the single-point discrimination results obtained, the final banknote authenticity authentication result is obtained.
[0018] This invention takes the image of the banknote to be detected as input. First, based on the fixed anti-counterfeiting structure of the banknote, it locates and extracts images of multiple key anti-counterfeiting areas (color-changing ink, color-changing lines, microtext, and white rectangular blocks) in parallel. Then, based on the characteristics of different anti-counterfeiting points, it performs region segmentation, depth texture and precise geometric feature extraction, and multi-dimensional similarity comparison with standard samples to obtain the single-point discrimination result of each point. Finally, it makes a comprehensive decision based on all discrimination results and outputs the banknote authenticity authentication result.
[0019] Compared to existing technologies, this invention achieves the following beneficial effects: First, it reduces detection costs and complexity by replacing expensive spectral or dedicated magnetic detection equipment with a pure image analysis method, making the system more economical and easier to implement. Second, it improves the objectivity and automation level of identification by overcoming the drawbacks of manual detection being susceptible to experience, fatigue, and subjective judgment through intelligent image processing technology. Most importantly, it significantly enhances the accuracy and robustness of counterfeit detection: on the one hand, by extracting and analyzing multi-regional and multi-type deep features (such as color, texture, and geometry) in parallel and fusing them into decisions, it effectively overcomes the vulnerability of relying on single features to highly realistic counterfeit currency; on the other hand, the targeted technologies employed (such as HSV-based color analysis, edge detection, and dynamic template positioning) make it more adaptable to banknote wear, stains, printing offsets, and complex backgrounds. In summary, this invention achieves a better balance between detection accuracy, system reliability, ease of operation, and cost control, providing an efficient solution to address the ever-evolving counterfeiting technologies.
[0020] The following explains each step separately. The processing procedures for S1~S5 can be found in [reference needed]. Figure 2 Understand that the inputs to S2, S3, and S4 are the processed frontal images, while the input to S5 is the processed backal image. S2, S3, S4, and S5 can be processed in parallel. The processing steps for S6 and S7 can be found in [reference needed]. Figure 3 understand.
[0021] In a specific embodiment of the present invention, S1, acquiring the original image of the banknote to be authenticated and preprocessing it to obtain a processed front image and a processed back image, includes the following steps: S11. Obtain the original image of the banknote to be identified as counterfeit. The original image includes the front image and the back image of the banknote. The banknotes to be identified as counterfeit can include Renminbi (RMB).
[0022] The front image of the banknote is used to extract anti-counterfeiting features such as color-changing ink, color-changing lines, and microtext, while the back image of the banknote is used to extract geometric anti-counterfeiting features such as white rectangular blocks.
[0023] S12. Read the width, height and resolution information of the original image, establish a relative coordinate system based on the image size, and output the preprocessed front image and the preprocessed back image.
[0024] The preprocessing step involves establishing a unified two-dimensional coordinate system on the digital image (the original image of the banknote to be authenticated). Specifically, this can be done by setting the top-left pixel of the image as the origin (0, 0), with the horizontal direction to the right as the positive X-axis and the vertical direction downwards as the positive Y-axis.
[0025] After this step, each pixel in the image has a unique (x, y) coordinate. This unified coordinate system is the foundation and prerequisite for all subsequent processing steps to accurately locate and crop specific anti-counterfeiting areas. It does not change the image pixel values itself, but provides a spatial reference for all subsequent geometric operations.
[0026] This step, by defining the origin and coordinate axis directions, provides a unified geometric space framework for subsequent processes and is a prerequisite for all subsequent location-based feature extraction operations. The positions of each anti-counterfeiting area are then determined using image scale coordinates or dynamic positioning results to adapt to images of different resolutions.
[0027] In a specific embodiment of the present invention, S2, extracting the color-changing ink region from the processed front image and generating a color-changing ink feature map, includes the following steps: S21. Based on the proportions of the front of the banknote, the region of interest where the color-changing ink is located is cropped from the processed front image to obtain the color-changing ink ROI. Based on a predetermined front-side layout proportion corresponding to the banknote's denomination (i.e., the fixed relative position of the color-changing ink security feature on the banknote), a rectangular region containing the entire color-changing ink pattern is calculated and cropped from the processed front-side image. This region is a predefined Region of Interest (ROI), and its coordinates are determined based on the unified pixel coordinate system established in S12. This results in a smaller image containing only the color-changing ink and its surrounding local background, known as the color-changing ink ROI image (or simply color-changing ink ROI). This step eliminates interference from other irrelevant areas in the image, significantly improving the efficiency and accuracy of subsequent processing.
[0028] S22. Convert the color-changing ink ROI to the HSV color space, and apply at least two sets of color thresholds for color segmentation, then merge the segmented masks. The ROI of the color-changing ink was converted from the BGR (Blue-Green-Red) color space to the HSV (Hue, Saturation, Value) color space. The HSV space can separate color information from brightness information, is more robust to changes in lighting, and is more suitable for color-based segmentation.
[0029] Since color-changing ink exhibits two primary colors (e.g., green / blue) under different viewing angles, at least two sets of HSV color threshold ranges need to be set, corresponding to these two color states respectively. Using these at least two sets of color threshold ranges in the HSV color space, the color-changing ink region is segmented, and masks obtained from different threshold ranges are merged to cover the color changes of the color-changing ink under different imaging conditions.
[0030] Specifically, applying these thresholds to segment the HSV image obtained by converting the ROI of the color-changing ink to the HSV color space yields multiple binary masks. White pixels (value 255) represent regions falling within the corresponding threshold range (i.e., suspected ink regions), while black pixels (value 0) represent the background. These masks targeting different color ranges are then logically ORed (merged) to obtain a composite binary mask containing all pixel regions that could potentially belong to the color-changing ink. The final output is a merged, preliminary binary mask image. In this mask, white connected components correspond to the initially identified candidate regions for the color-changing ink.
[0031] S23. Perform morphological processing on the merged mask and filter small connected regions to obtain the color-changing ink region mask. The merged mask output from S22 undergoes morphological processing, including morphological opening and closing operations. The aim is to remove discrete noise, fill small holes within the ink areas caused by uneven color or reflection, and smooth the boundaries of the ink areas to fill in localized breaks.
[0032] Next, the area of all white connected regions in the morphologically processed mask is calculated. Small connected regions with areas smaller than a preset threshold are set to black, i.e., removed. This step can further remove a few discrete noise points that do not belong to the actual ink pattern. The preset threshold here can be set as needed.
[0033] Ultimately, a more accurate binary mask for the color-changing ink region, after purification and optimization, can be obtained. This mask preserves the main color-changing ink region, where the neutral white area accurately represents the complete shape and position of the color-changing ink, with a clean background.
[0034] S24. Based on the color-changing ink area mask, extract the target area of the color-changing ink from the ROI of the color-changing ink before color space conversion, and convert the background area into a transparent channel to obtain the color-changing ink feature map.
[0035] This step first extracts the target region of the color-changing ink. The HSV color space is used only for color thresholding and to generate a mask for the color-changing ink region. After obtaining the mask, it is mapped back to the original color-changing ink ROI of the same location and size, which is the ROI image before color space conversion. The target region of the color-changing ink is then extracted from the original ROI. This avoids color distortion caused by directly outputting the HSV image and preserves the original color and structural information required for subsequent similarity calculations.
[0036] Specifically, the color-changing ink area mask is used as a selection area and applied to the original BGR format ROI image. Only the white pixels (corresponding to the ink area) in the mask retain the color value of the corresponding pixels in the original ROI image; for the black pixels (background) in the mask, their original colors are ignored.
[0037] Then, a transparent background feature map is generated. Specifically, the extracted color-changing ink target area (i.e., the color-changing ink pattern) is placed on a new layer, and its background is set to completely transparent (Alpha channel value of 0). For the color-changing ink target area itself, its Alpha channel value is set to 255 (opaque). This generates an RGBA format image, i.e., the color-changing ink feature map. This image contains only the clear color-changing ink pattern, with a completely transparent background. This format facilitates direct and accurate pixel-level or feature-level comparisons between this feature map and standard sample feature maps in subsequent steps, without worrying about interference from complex backgrounds. The output color-changing ink feature map is used to subsequently calculate various feature indicators such as color, structure, pixel differences, shape, and feature point matching within this single anti-counterfeiting point of color-changing ink.
[0038] In a specific embodiment of the present invention, S3, extracting the color-changing line region from the processed front image and performing segmented feature processing to obtain multiple color-changing line sub-region images, includes the following steps: S31. Based on the proportions of the front of the banknote, crop out the region of interest where the color-changing line is located from the processed front image to obtain the ROI of the color-changing line. This step is similar to S21 in the color-changing ink processing process. Based on the preset layout and proportion of the front of the banknote of this denomination, under a unified pixel coordinate system (established in S12), a rectangular area containing the entire color-changing line feature is calculated and cut out on the right side of the banknote. This is the region of interest where the color-changing line is located, and the ROI of the color-changing line is obtained. The location of this ROI is predetermined based on the fixed layout of the banknote design.
[0039] This step ultimately yields a smaller image, namely the color-changing line ROI image, which mainly contains the target color-changing line and its adjacent background, removing interference from other parts of the image.
[0040] S32. Convert the color-changing line ROI to the HSV color space, and apply multiple sets of HSV thresholds for threshold segmentation to extract the candidate regions of the color-changing line. First, the color-changing line ROI is converted from the BGR color space to the HSV color space to better separate color information and adapt to changes in lighting.
[0041] Then, based on the red color scheme or other corresponding color ranges, multiple sets of HSV thresholds are set to extract candidate regions for color-changing lines.
[0042] Specifically, since the color-changing line will also change color at different angles, multiple sets of preset HSV threshold ranges (corresponding to the several colors it may present) need to be applied to threshold the image. Each threshold will generate a binary mask that identifies the pixels falling within that color range.
[0043] Finally, mask merging is performed, which involves combining the multiple binary masks targeting different color ranges (using a logical "OR" operation) to form a comprehensive preliminary mask. In this mask, the white areas represent the set of all pixels that could potentially belong to the color-changing line (regardless of their current color).
[0044] The final output is a merged, preliminary binary mask image, namely the binary mask image of the color-changing line candidate region (referred to as the color-changing line candidate region). The white connected components are the initially identified color-changing line regions.
[0045] S33. Perform morphological processing on the candidate regions of the color-changing line and filter out small connected regions to obtain the color-changing line mask. First, a series of morphological operations are performed on the mask image of the candidate region for the color-changing line. These operations include opening to remove small noise points, closing to fill small holes inside the region, and connecting adjacent broken parts. This makes the shape of the color-changing line region more complete and the boundaries smoother.
[0046] Then, the area of all white connected regions in this mask image is calculated and analyzed. Small connected regions with an area smaller than a preset threshold (i.e., areas significantly smaller than the actual color-changing line regions) are removed to eliminate residual discrete noise. The preset threshold here can be set as needed.
[0047] The final result is a more accurate binary mask of the color-changing line region, which has been purified and optimized for connectivity; this is referred to as the color-changing line mask. This mask can clearly reflect a basically continuous and complete color-changing line band.
[0048] S34. Extract the target region of the color-changing line based on the color-changing line mask, and convert the background region into a transparent channel to obtain the color-changing line feature map in RGBA format; First, using the color-changing line mask as a precise selection area, the corresponding pixels are extracted from the original BGR format color-changing line ROI. That is, only the original image color information corresponding to the white area (color-changing line) in the mask is retained to extract the color-changing line target area.
[0049] The extracted color-changing line target area is then placed on a new layer, with its background set to completely transparent (Alpha channel value of 0), while the color-changing line target area itself is opaque (Alpha channel value of 255), thus generating an RGBA format image. This image contains only clear color-changing line patterns without complex backgrounds, facilitating subsequent feature analysis and comparison.
[0050] S35. Divide the color-changing line feature map into multiple sub-regions along the extension direction or height direction of the color-changing line to obtain multiple color-changing line sub-region images.
[0051] The feature map of the entire color-changing line is divided into multiple continuous, non-overlapping rectangular sub-regions along its main extension direction (usually horizontal or near-horizontal). The division can be based on a fixed pixel width or equal division along the entire line length. For example, it can be divided into five sub-regions. The purpose of this step is to decouple the features of the entire line into multiple local features, so that the realism of the color, texture, and other characteristics of the color-changing line in each local segment, as well as the continuity of the entire line, can be evaluated more meticulously later.
[0052] The final result is a set of images representing multiple sub-regions of the color-changing line. Each sub-image is in RGBA format and contains a portion of the color-changing line, collectively representing the segmented features of the entire color-changing line. This set of images is used to subsequently calculate the color, structure, shape, pixel differences, and feature point matching of each sub-region within the single anti-counterfeiting point of the color-changing line, and to determine the segmental continuity and local consistency of the color-changing line.
[0053] In a specific embodiment of the present invention, S4, dynamically locating the national emblem region in the processed front image, and extracting the micro-text region based on the positioning result to obtain multiple sampled block images of the micro-text region, includes the following steps: S41. Scale the preset national emblem template image to a size that matches the processed front image; This step first acquires a preset, high-resolution image of the national emblem as a standard pattern. It then obtains the size information of the processed front image output by S1.
[0054] Then, the size ratio between the processed front image and the preset national emblem template image is calculated. Based on this ratio, the original national emblem template image is scaled proportionally to match its size with the expected actual size of the national emblem in the current front image to be detected. This step is a prerequisite for correct template matching, ensuring that the template and the target object in the search image are of the same scale. The resulting national emblem template image scaled to the appropriate size is then obtained.
[0055] S42. Using a template matching algorithm, locate the position of the national emblem template image in the processed front image to determine the national emblem area; During the micro-text region localization process, the preset national emblem template image is scaled according to the size of the processed front image to obtain a national emblem template image of the appropriate size. Then, the processed front image and the national emblem template image of the appropriate size are converted into grayscale images respectively. Subsequently, a template matching algorithm is used to locate the national emblem region in the grayscale image corresponding to the processed front image. For simplicity, the processed front image mentioned here in S42 refers to the corresponding grayscale image.
[0056] A template matching method is used to locate the national emblem region in the processed front image. Specifically, a template matching algorithm (such as normalized cross-correlation matching) can be used. The scaled national emblem template is used as a sliding window to search the processed front image globally or within a preset region. The algorithm calculates the similarity between the template and various positions in the image, and finds the position with the highest similarity. This position is the location point of the national emblem in the image (usually the coordinates of the upper left corner of a rectangular area). Combined with the size of the template itself, the precise bounding rectangle of the national emblem can be determined. This dynamic positioning method overcomes the problem of inaccurate cropping of fixed coordinates caused by improper banknote placement or differences in image acquisition.
[0057] Ultimately, the location information of the national emblem area can be obtained, usually represented by the coordinates of a rectangle.
[0058] S43. Using the rightmost boundary of the national emblem area as a reference point, and according to the preset relative positional relationship, crop out the micro-text area in the processed front image. Using the rightmost vertical boundary line of the dynamically located national emblem area as the reference anchor point, and based on a pre-measured and defined fixed relative positional relationship between the microtext area and the right boundary of the national emblem (e.g., the microtext area starting from the right boundary of the national emblem and offset to the right by a certain number of pixels, with a fixed width and height), the precise coordinate range of the microtext area is calculated on the processed frontal image. Subsequently, the corresponding image area is cropped according to this coordinate range to obtain the microtext area. This is a microtext area image containing the microtext pattern to be identified. This processing method reduces the impact of scan offset, image size variations, and different input resolutions on the accuracy of microtext localization.
[0059] S44. Perform grayscale conversion and noise reduction on the cropped micro-text area, and then perform edge detection to obtain the micro-text edge map; First, the colored micro-text area image is converted into a grayscale image to simplify subsequent processing and focus on brightness and texture information.
[0060] Then, Gaussian blur and other filtering techniques are applied to the obtained grayscale image to suppress high-frequency random noise such as image sensor noise and paper texture, so as to achieve a smooth image and prepare for edge detection.
[0061] Finally, edge detection operators (such as the Canny operator) are used to process the denoised grayscale image. This operator can keenly capture drastic changes in image brightness, thereby highlighting the stroke outlines of the microtext. Due to the tiny size of the microtext itself, this step can transform its texture information into an edge structure map that is easier to analyze and compare, highlighting subtle differences in microtext strokes, textures, breaks, and blurring.
[0062] The final result is a miniature text edge image (binary image or grayscale image emphasizing the edges). In this image, white lines or highlighted areas represent the stroke edges of the miniature text, with a black or dark background.
[0063] S45. Divide the micro-text edge map into multiple local sampling blocks to obtain multiple sampling block images of the micro-text region.
[0064] The entire microtext edge map is uniformly divided into multiple non-overlapping rectangular local sampling blocks in both the horizontal and vertical directions (e.g., 9 blocks in 3 rows and 3 columns). The purpose of this division is to decompose the overall texture identification task into the identification of multiple local regions, thereby extracting the local texture structure at different locations. This allows for a more detailed evaluation of the print quality, sharpness, and integrity of the microtext at each local location. Even if some areas are blurred, the features of other sharp areas can still be effectively utilized.
[0065] The final result is multiple sampled block images of the microtext region. Each sub-image is a part of the microtext edge map, which is used to determine the authenticity of the microtext by using LBP texture similarity as the core criterion and combining auxiliary indicators such as structural similarity, pixel difference, and histogram similarity.
[0066] In one specific embodiment of the present invention, step S5, extracting the white rectangular block region from the processed back image, includes the following steps: Step a1: Based on the layout of the back of the banknote, crop the region of interest (ROI) containing the white rectangular block from the upper left corner of the processed back image to obtain the white rectangular block ROI; For the processed back image output by S1, based on the fixed layout design of the banknote's back, a rectangular region is cropped from the upper left corner of the back image within the established unified coordinate system, according to preset coordinates and dimensions. This region (ROI) completely encompasses the white rectangular block to be detected and its adjacent surrounding background. This step aims to narrow the processing scope from the entire back image to a specific local area, significantly improving the processing efficiency of subsequent steps and reducing interference from irrelevant backgrounds.
[0067] The resulting white rectangular ROI is a small image that will be the target of all subsequent fine-tuning operations.
[0068] Step a2: Convert the white rectangular ROI to the HSV color space, and segment it according to the color distribution of the white area using at least one set of white threshold ranges to obtain white candidate areas; First, the white rectangular area of interest (ROI) is converted from the BGR color space to the HSV color space. In the HSV color space, white typically exhibits characteristics of low saturation (S) and high brightness (V), which makes it more effective to separate white areas against complex backgrounds.
[0069] Then, based on the color distribution characteristics of white in the HSV space, at least one set of preset HSV threshold ranges (e.g., setting saturation S below a certain threshold and brightness V above a certain threshold) are applied to threshold the image. This step aims to segment all pixels that may belong to the white region from the white rectangular ROI.
[0070] The final result is a binary mask image, namely the white candidate region mask (or simply white candidate region). The white pixels represent the candidate regions that are initially identified and meet the white feature.
[0071] Step a3: Perform region restriction and contour filtering on the white candidate region to obtain the target rectangular region; This step involves restricting and filtering the segmented white candidate regions, retaining the candidate rectangular regions located in the upper left corner and having a larger area, and excluding irrelevant white regions.
[0072] First, find all contours (i.e., the boundaries of white connected regions) in the mask image of the white candidate region. For each found contour, perform the following judgments in sequence to filter out the true target rectangle: 1) Contour Approximation: Approximate the contour polygon with a rectangle and calculate the fitting error. Retain the contours that can be well approximated by rectangles.
[0073] 2) Area and Aspect Ratio Limitations: Calculate the area and aspect ratio of the approximate rectangle. Compare it with a reasonable range pre-defined according to genuine coin standards (such as minimum / maximum area, typical aspect ratio range), and eliminate outlines that are obviously inconsistent in size or shape.
[0074] Then, from the contours that have passed the above screening, select the one that best meets the conditions, usually the one with the largest area, the most central position, or the highest rectangle fit, and use the area determined by it as the target rectangular region.
[0075] It can output the precise contour information of the target rectangular region (represented as a point set or bounding rectangle). This output locks in the initial position and extent of the white rectangular block.
[0076] Step a4: Perform edge denoising on the target rectangular region to obtain a white rectangular block region.
[0077] This edge denoising process can employ PiDiNet pixel difference network, PDC pixel difference convolutional network, Canny edge detection, or other equivalent edge enhancement methods to remove isolated white pixels caused by factors such as paper reflection, stains, and scanning noise, thereby reducing boundary errors in subsequent aspect ratio calculations. This edge denoising process can be performed by an independent processing module, whose output serves as input for subsequent aspect ratio measurements.
[0078] In one specific embodiment of the present invention, step S5, calculating the aspect ratio of the white rectangular block region, includes the following steps: Step b1: Convert the white rectangular area to grayscale and perform noise reduction processing to obtain the processed area; The white rectangular area after edge denoising is converted into a grayscale image to simplify subsequent processing, and Gaussian blur and other filtering operations are applied to the resulting grayscale image to further reduce minor noise interference.
[0079] Step b2: Perform edge detection on the processed area to obtain the edge map of the white rectangular block; Edge detection operators (such as the Canny edge detector) can be used to process the input image, i.e., the processed region. The Canny operator identifies locations of abrupt brightness changes by calculating the image's gradient and outputs clear, continuous, and single-pixel-wide edge lines through non-maximum suppression and double-threshold hysteresis. This accurately delineates all boundaries of the white rectangular block. The final result is a binarized edge map of the white rectangular block. In this map, white pixels (typically with a value of 255) represent detected edges, and black pixels (with a value of 0) represent the background. This image clearly shows a closed rectangle.
[0080] Step b3: Based on the edge map of the white rectangular block, determine the first boundary position of the white rectangular block in the width direction and the second boundary position in the height direction; Specifically, in the edge map of the white rectangular block, starting from the preset starting row, edge pixels that meet the threshold condition are searched row by row, and the average value of the boundary positions in the width direction is calculated as the first boundary position in the width direction; starting from the preset starting column, edge pixels that meet the threshold condition are searched column by column, and the average value of the boundary positions in the height direction is calculated as the second boundary position in the height direction.
[0081] 1) The process of determining the width direction boundary, i.e., obtaining the position of the first boundary, is as follows: In the white rectangular block edge map, starting from the preset starting row, scan line by line from top to bottom.
[0082] For each row, search for the column coordinates of the first white edge pixel from left to right, which is the left boundary, and search for the column coordinates of the first white edge pixel from right to left, which is the right boundary.
[0083] Record the left and right boundary column coordinates of all rows for which left and right boundaries can be found. For convenience, these rows can be called valid rows.
[0084] Calculate the average of the left boundary column coordinates of all valid rows, and calculate the average of the right boundary column coordinates of all valid rows. These two averages represent the average left boundary position of the rectangle in the width direction. ) and average right boundary position ( The first boundary position consists of these two components.
[0085] 2) The process of determining the height boundary, i.e., obtaining the position of the second boundary, is as follows: In the white rectangular block edge map, starting from the preset starting column, scan column by column from left to right.
[0086] For each column, search from top to bottom for the row coordinates of the first white edge pixel, which is the upper boundary, and from bottom to top for the row coordinates of the first white edge pixel, which is the lower boundary.
[0087] Record the coordinates of the upper and lower boundary rows of all valid columns (i.e., columns with upper and lower boundaries).
[0088] Calculate the average coordinates of the top boundary row of all valid columns, and calculate the average coordinates of the bottom boundary row of all valid columns. These two averages represent the average top boundary position of the rectangle in the height direction, respectively. ) and average lower boundary position ( The second boundary position consists of these two components.
[0089] Step b4: Calculate the aspect ratio of the white rectangle based on the positions of the first and second boundaries.
[0090] Calculate the average right boundary position in the first boundary position ( ) and average left boundary position ( The difference between the two values is used to obtain the pixel width of the white rectangle. Calculate the average lower boundary position in the second boundary position ( ) and average upper boundary position ( The difference between the two values is used to obtain the pixel height of the white rectangle. Calculate the ratio of the pixel width to the pixel height of the white rectangle to obtain the aspect ratio of the white rectangle.
[0091] Step S5 ultimately outputs the aspect ratio and edge detection results of the white rectangular block. This output is used for subsequent comparison with the preset aspect ratio range of the genuine coin sample to determine whether the geometric features of the white rectangular block are normal.
[0092] Step S6 involves calculating the multi-feature indicators within each anti-counterfeiting point and forming a single-point discrimination result. In a specific embodiment of the present invention, in S6, the single-point discrimination results corresponding to the four anti-counterfeiting points—color-changing ink, color-changing line, micro-text, and white rectangular block—are calculated, including: S61. For the anti-counterfeiting point of color-changing ink, based on the feature map of color-changing ink, compare and fuse the similarity of multi-dimensional image features with the corresponding features of standard genuine currency samples, and output the comprehensive discrimination value of single point of color-changing ink. This step aims to evaluate the overall similarity between the color-changing ink to be authenticated and a genuine banknote sample in terms of multi-dimensional characteristics such as color, structure, and shape. Please refer to [link / reference]. Figures 4a-4d Understanding. Among them, Figure 4a It is ORB feature point matching similarity. Figure 4b It is the similarity of Earth's movement distance. Figure 4c It is a Hu-invariant rectangular feature. Figure 4d It is histogram similarity.
[0093] First, the color-changing ink feature map is compared with the color-changing ink area in the standard genuine banknote sample. The similarity of color histogram, HSV three-dimensional histogram, structural similarity, pixel difference, ORB or SIFT feature point matching similarity, Hu moment similarity and other indicators are calculated to obtain a set of color-changing ink feature indicators that characterize the similarity of different sides.
[0094] Then, the obtained multiple color-changing ink feature indicators are normalized to eliminate the influence of dimensions. Subsequently, according to a preset weighting scheme, the normalized indicators are weighted and summed, or calculated using other preset fusion formulas. Finally, a single-point comprehensive discrimination value for the color-changing ink is output, which is usually a scalar between 0 and 1. This discrimination value is used to represent the comprehensive similarity of the color-changing ink area in terms of color, structure, shape, and local features. The closer the value is to 1, the higher the comprehensive similarity of the color-changing ink area of the banknote to be counterfeited to the genuine banknote in terms of color, structure, shape, and other multi-dimensional features. This multi-feature fusion strategy effectively avoids misjudgment caused by counterfeiting of a single feature.
[0095] S62. For the anti-counterfeiting point of the color-changing line, based on multiple sub-region images of the color-changing line, perform segmented feature comparison and overall continuity analysis with the corresponding sub-region of the standard genuine coin sample, and output the comprehensive discrimination value of the single point of the color-changing line. This step utilizes multiple color-changing line sub-region images (e.g., five color-changing line sub-region images) generated in step S3. Its core processing principle is to first assess local realism and then analyze overall continuity. Please refer to [link / reference]. Figures 5a-5g Understanding. Among them, Figure 5a This is a comparison chart of the mean square error (MSE) of the five sub-regions of the color-changing line; the other charts show the results of different test samples.
[0096] First, local feature comparisons are performed on sub-regions. Each sub-region image of the color-changing line is compared with its strictly corresponding sub-region in the standard genuine coin sample. For each sub-region pair, feature indices such as color similarity, structural similarity, pixel difference, shape similarity, and feature point matching similarity are calculated, thus obtaining a set of local feature indices for each sub-region, called multi-class feature indices.
[0097] Then, segmented fusion and overall analysis are performed, and multiple feature indicators of multiple color-changing line sub-regions are fused in segments. Specifically, the multiple feature indicators of each sub-region are first normalized and weighted to generate a local discrimination value representing the authenticity of the sub-region; then, an overall continuity analysis is performed, and the overall continuity and local consistency of the color-changing line are calculated based on the local discrimination values of multiple sub-regions to obtain the single-point comprehensive discrimination value of the color-changing line anti-counterfeiting point.
[0098] For each color-changing line sub-region, multiple types of characteristic indicators are calculated first. Since different indicators have different dimensions, each indicator is normalized first. For similarity indicators such as ORB, SIFT, structural similarity and histogram similarity, a larger normalized value indicates that it is closer to a genuine banknote; for difference indicators such as MSE, pixel difference, EMD and Hu moment distance, reverse normalization is performed first to convert them into a unified score where "a larger value means closer to a genuine banknote". Then, multiple types of indicators in the same sub-region are weighted and summed according to preset weights, to obtain a local discrimination value of this sub-region. The overall continuity and local consistency of the color-changing line are calculated by summing the local discrimination values of multiple sub-regions, to obtain the single-point comprehensive discrimination value of the color-changing line anti-counterfeiting feature.
[0099] S63, for micro-text anti-counterfeiting features, based on multiple sampling block images of the micro-text region, local texture similarity statistics and joint threshold judgment are performed with the corresponding blocks of a standard genuine banknote sample, and a single-point discrimination result of the micro-text is output; First, a plurality of sampling block images in the micro-text region are respectively compared with the corresponding sampling blocks in the standard genuine banknote sample, the LBP texture similarity of each block is calculated, and auxiliary indicators such as structural similarity, pixel difference and histogram similarity are combined, and finally a local characteristic indicator with LBP similarity as the core is obtained for each sampling block. After each sampling block image is compared with the corresponding block in the standard genuine banknote sample, a numerical local characteristic indicator is obtained. For example, the -th sampling block's local characteristic indicator can be recorded as . The larger this value is, the closer the texture and structure of this sampling block are to the standard genuine banknote sample; the smaller this value is, the more obvious the difference between this block and the genuine banknote sample is.
[0100] Then, joint threshold judgment is performed. Taking LBP texture similarity as the core criterion, the minimum value of LBP texture similarity among all sampling block images is found to obtain the minimum similarity value, and the number of low-similarity blocks is counted. If the minimum similarity is lower than a first preset threshold, or the number of low-similarity blocks exceeds a second preset threshold, the micro-text anti-counterfeiting feature is determined to be abnormal; otherwise, the micro-text anti-counterfeiting feature is determined to be normal.
[0101] Wherein, low-similarity blocks can be counted by comparing the local characteristic indicator with a preset low-similarity threshold. For example, the micro-text region is divided into 9 sampling blocks, and to are obtained respectively. A low-similarity threshold T_low is set, if a certain block satisfies < T_low, the block is recorded as a low-similarity block, and the count is increased by 1. Finally, the number of low-similarity blocks N_low is obtained through statistics. For example, T_low = 0.75 can be taken as an exemplary threshold, and the actual threshold can be calibrated according to the genuine banknote sample set.
[0102] The first and second preset thresholds can be set as needed and are not limited here. As an example, if the local feature indicators are normalized to the range of 0 to 1, the first preset threshold T_min = 0.60 can be set to determine whether there are severely abnormal blocks; the low similarity threshold T_low = 0.75 can be set to count the number of low similarity blocks; and the quantity threshold is set to 2, meaning that if the number of low similarity blocks exceeds 2, it is considered an anomaly. The above thresholds can be adjusted according to the number of real currency samples, image quality, and application scenario.
[0103] Understandably, the result of the micro-text single-point discrimination in this step is the same as the result of the micro-text anti-counterfeiting point discrimination, i.e., "normal" or "abnormal".
[0104] S64. For the anti-counterfeiting point of the white rectangular block, compare and judge with the preset geometric threshold of the standard genuine coin sample based on the aspect ratio of the white rectangular block area, and output the single point discrimination result of the white rectangular block.
[0105] This step compares the aspect ratio of the white rectangle with a preset aspect ratio range threshold corresponding to a genuine banknote sample to obtain a single-point discrimination result for the anti-counterfeiting point of the white rectangle. If the aspect ratio of the white rectangle of the banknote to be authenticated falls within the preset aspect ratio range threshold, the anti-counterfeiting point is judged as "normal"; otherwise, it is judged as "abnormal". The final output is the single-point discrimination result of the white rectangle.
[0106] The preset aspect ratio range threshold is usually based on the allowable error range obtained from a large number of real currency statistics.
[0107] Step S6 ultimately yields a set of multi-anti-counterfeiting point discrimination results, consisting of the comprehensive discrimination value of single-point color-changing ink, the comprehensive discrimination value of single-point color-changing line, the discrimination result of single-point micro-text, and the discrimination result of single-point white rectangular block.
[0108] Step S7 involves combining the single-point discrimination results of multiple anti-counterfeiting points to make a final authenticity determination. In an optional embodiment of the present invention, S7, based on all the obtained single-point discrimination results, yields the final banknote authenticity verification result, including: A comprehensive judgment is made based on the individual point discrimination results corresponding to the four anti-counterfeiting points: color-changing ink, color-changing line, micro-text, and white rectangular block. If the single-point judgment result of any anti-counterfeiting point is determined to be abnormal, the banknote is output as a suspected counterfeit; if the single-point judgment results of all anti-counterfeiting points are determined to be normal, the banknote is output as a genuine banknote; if the single-point judgment results of some anti-counterfeiting points are in a critical or uncertain state, a comprehensive judgment is made by combining the single-point judgment results of the remaining anti-counterfeiting points.
[0109] Of course, it is understandable that the above comprehensive judgment adopts a relatively strict approach, requiring that if even one single-point judgment result is abnormal, it is ultimately judged as suspected counterfeit currency, and only if the single-point judgment results of all anti-counterfeiting points are normal, is it ultimately judged as genuine currency. This embodiment of the invention can adjust the above strategy according to the situation, for example, by setting relevant thresholds, such as if at least two single-point judgment results of anti-counterfeiting points are normal, it can be ultimately judged as genuine currency, etc., which can be set as needed and are not limited here. Finally, the banknote authenticity authentication result can be output, and the intermediate feature indicators, single-point judgment results, and final judgment results of each anti-counterfeiting point can be output simultaneously to facilitate the traceability and verification of the authentication basis.
[0110] This invention provides a banknote authentication method based on depth texture representation. First, the original image of the banknote to be authenticated is acquired and preprocessed to obtain a processed front image and a processed back image. Then, for the processed front image, on one hand, the color-changing ink region is extracted and a color-changing ink feature map is generated; on the other hand, the color-changing line region is extracted and segmented feature processing is performed to obtain multiple color-changing line sub-region images; furthermore, the national emblem region is dynamically located, and the micro-text region is extracted based on the location result, obtaining multiple sampling block images of the micro-text region; simultaneously, the white rectangular block region is extracted from the processed back image, and the aspect ratio of the white rectangular block region is calculated. Then, based on the color-changing ink feature map, the multiple color-changing line sub-region images, the multiple sampling block images of the micro-text region, and the aspect ratio of the white rectangular block region, they are compared with the corresponding standard genuine banknote sample features to calculate the single-point discrimination results corresponding to the four anti-counterfeiting points: color-changing ink, color-changing line, micro-text, and white rectangular block. Finally, all the single-point discrimination results are used to obtain the final banknote authentication result.
[0111] In step S2, which involves extracting the color-changing ink region and generating a feature map, and in step S3, which involves extracting the color-changing line region and performing segmentation processing, this invention proposes and employs an HSV color space analysis method based on color thresholds to accurately extract the target regions of the color-changing ink and color-changing line from the preprocessed front image, addressing the authentication requirements of the color-changing ink and color-changing line. Furthermore, in step S6, which involves calculating the single-point discrimination results for each anti-counterfeiting point, various advanced detection and analysis methods are comprehensively utilized for feature comparison and discrimination of the two anti-counterfeiting points: the color-changing ink and the color-changing line. These methods include distance measurement, shape measurement, feature point matching, and pixel-level measurement methods. The extracted feature map is analyzed and compared with a standard genuine banknote sample in a multi-dimensional and comprehensive manner. Through these multi-dimensional technical means, the differences between genuine and counterfeit banknotes at this authentication point can be accurately extracted and clearly distinguished, thereby calculating reliable single-point discrimination results.
[0112] In step S5 of this invention, which involves extracting the white rectangular block region and calculating its aspect ratio, a generalized pixel difference neural network (Pidnet) is used for preliminary edge detection when assessing the aspect ratio of the white rectangle for counterfeit detection. Through the network's multi-level feature extraction and fusion capabilities, a coarse outline of the target region is identified. Building upon this, an adaptive refined edge detection algorithm is further introduced, combined with morphological filtering techniques, to refine the identified edges, enhancing their clarity and stability. Finally, through the aforementioned composite image processing techniques, the geometric features of the target region are accurately extracted, and its aspect ratio is calculated, achieving efficient counterfeit currency identification.
[0113] In step S4 of this invention, which involves extracting the microtext region, an image matching-based method is designed to dynamically locate the target region of the microtext. This method uses a preset national emblem sample image as a matching template. The national emblem is dynamically located in the front image through template matching, and then the microtext region is determined and cropped based on a fixed relative position. This method reduces the impact of minor errors and offsets caused by the banknote printing process on accurate positioning.
[0114] In summary, this invention significantly improves counterfeit detection performance by extracting differentiated depth features of four key anti-counterfeiting points (color-changing ink, color-changing line, microtext, and white rectangular blocks) on the front and back of banknotes in parallel and performing decision-level fusion. Specifically, for the color-changing ink and color-changing line, HSV color space analysis and multi-dimensional feature (color, structure, shape, etc.) fusion comparison are used to enhance the ability to identify color counterfeits; for the microtext, dynamic template matching positioning and local LBP texture statistics are used to effectively resist printing offset and microtexture counterfeits; for the white rectangular blocks, a pixel difference network (PiDiNet) is introduced for edge denoising, achieving sub-pixel level precision in aspect ratio geometric measurement. Finally, through intelligent fusion rules of multi-anti-counterfeiting point discrimination results, it can accurately distinguish between genuine banknotes, high-quality counterfeit banknotes, and boundary conditions caused by wear and stains. This method overcomes the vulnerability of single features to attack, achieving high accuracy, robustness, and efficiency in banknote authentication under complex real-world environments. It effectively solves the problem of single features being easily counterfeited, significantly improving the accuracy and reliability of authentication while ensuring processing efficiency.
[0115] The following experimental data illustrates the effectiveness of the method of the present invention.
[0116] This invention collected 24 images of the 2015 edition of the fifth set of 100 RMB banknotes from scanners at 600dpi and 1200dpi, including 16 genuine banknotes and 12 counterfeit banknotes. The experiment demonstrates that the method of this invention improves the accuracy of RMB banknote authentication. Please refer to Table 1 below.
[0117] Table 1. Results of the first version of the dataset for identifying counterfeit points using color-changing lines and color-changing inks.
[0118] Using the 2015 edition of the fifth set of 100-yuan banknotes as the test subject, methods including scale-invariant feature transformation, rapid rotation simplified feature method, and color histogram method were used to calculate similarity to determine authenticity. However, due to the wear and tear and stains on the banknotes, these methods could not efficiently distinguish between genuine and counterfeit banknotes. The method of this invention can achieve efficient identification for different counterfeit detection points.
[0119] The method of this invention first performs a series of preprocessing operations on the input image during the extraction of anti-counterfeiting region features from the original image. This includes cropping the specified region of interest based on the fixed position of each anti-counterfeiting point, converting the image to a color space such as HSV or grayscale to optimize subsequent processing, and applying filtering techniques such as Gaussian blur to reduce image noise, preparing for subsequent accurate feature extraction. Subsequently, in the process of authenticity judgment based on the extracted features, multiple feature extraction and similarity calculation methods are employed. Specifically, this includes calculating color histogram similarity and structural similarity, using algorithms such as ORB and SIFT for feature point matching, and calculating shape similarity such as Hu moments, thereby comprehensively evaluating the consistency between the features to be authenticated and the standard samples from multiple dimensions. Finally, when forming the authentication conclusion, a decision is made by comprehensively applying multiple judgment rules based on the results of the above multi-dimensional feature comparison. By integrating the judgment conclusions of different anti-counterfeiting points, the overall accuracy of authenticity judgment and robustness in complex situations are effectively improved.
[0120] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A banknote counterfeit detection method based on depth texture representation, characterized in that, include: S1. Obtain the original image of the banknote to be identified and preprocess it to obtain the processed front image and the processed back image; S2. Extract the color-changing ink region from the processed front image and generate a color-changing ink feature map; S3. Extract the color-changing line region from the processed front image and perform segmented feature processing to obtain multiple color-changing line sub-region images; S4. Dynamically locate the national emblem area in the processed front image, and extract the micro-text area based on the positioning result to obtain multiple sampling block images of the micro-text area; S5. Extract the white rectangular block region from the processed back image and calculate the aspect ratio of the white rectangular block region; S6. Based on the feature map of the color-changing ink, the multiple sub-region images of the color-changing line, the multiple sampled block images of the micro-text region, and the aspect ratio of the white rectangular block region, compare them with the corresponding features of the standard genuine banknote sample, and calculate the single-point discrimination results corresponding to the four anti-counterfeiting points: color-changing ink, color-changing line, micro-text, and white rectangular block. S7. Based on all the single-point discrimination results obtained, the final banknote authenticity authentication result is obtained.
2. The method according to claim 1, characterized in that, In S2, the color-changing ink region is extracted from the processed front image and a color-changing ink feature map is generated, including: Based on the proportions of the front of the banknote, the region of interest (ROI) containing the color-changing ink is cropped from the processed front image to obtain the color-changing ink ROI. The color-changing ink ROI is converted to the HSV color space, and at least two sets of color thresholds are applied for color segmentation. The resulting masks are then merged. The merged mask is morphologically processed and small connected regions are filtered to obtain the color-changing ink region mask. Based on the color-changing ink region mask, the target region of the color-changing ink is extracted from the ROI of the color-changing ink before color space conversion, and the background region is converted into a transparent channel to obtain the color-changing ink feature map.
3. The method according to claim 1, characterized in that, In S3, the color-changing line region is extracted from the processed frontal image and segmented feature processing is performed to obtain multiple color-changing line sub-region images, including: Based on the proportions of the front of the banknote, the region of interest (ROI) containing the color-changing line is cropped from the processed front image to obtain the color-changing line ROI. The color-changing line ROI is converted to the HSV color space, and multiple sets of HSV thresholds are applied for threshold segmentation to extract candidate regions of the color-changing line. Morphological processing is performed on the candidate regions of the color-changing line, and small connected regions are filtered to obtain a color-changing line mask. The target region of the color-changing line is extracted based on the color-changing line mask, and the background region is converted into a transparent channel to obtain a color-changing line feature map in RGBA format; The color-changing line feature map is divided into multiple sub-regions along the extension direction or height direction of the color-changing line to obtain multiple color-changing line sub-region images.
4. The method according to claim 1, characterized in that, In step S4, the national emblem region is dynamically located in the processed front image, and the micro-text region is extracted based on the location result, resulting in multiple sampled block images of the micro-text region, including: The preset national emblem template image is scaled to a size that matches the processed front image; The national emblem template image is located in the processed front image using a template matching algorithm to determine the national emblem region. Using the rightmost boundary of the national emblem area as a reference point, and according to a preset relative positional relationship, a micro-text area is cropped out from the processed front image; The cropped micro-text region is subjected to grayscale conversion and noise reduction, and then edge detection is performed to obtain the micro-text edge map; The micro-text edge map is divided into multiple local sampling blocks, thereby obtaining multiple sampling block images of the micro-text region.
5. The method according to claim 1, characterized in that, In S5, extracting the white rectangular block region from the processed back image includes: Based on the layout of the back of the banknote, the region of interest containing the white rectangular block is cropped from the upper left corner of the processed back image to obtain the white rectangular block ROI. The white rectangular ROI is converted to the HSV color space, and at least one set of white threshold ranges is applied to segment it according to the color distribution of the white area to obtain white candidate areas; The white candidate region is subjected to region restriction and contour filtering to obtain the target rectangular region; Edge denoising processing is performed on the target rectangular region to obtain a white rectangular block region.
6. The method according to claim 5, characterized in that, Edge denoising processing is performed on the target rectangular region, including implementation using a pixel difference network.
7. The method according to claim 5, characterized in that, In S5, the aspect ratio of the white rectangular area is calculated, including: The white rectangular block area is converted into a grayscale image and noise reduction is performed to obtain the processed area. Edge detection is performed on the processed area to obtain the edge map of the white rectangular block; Based on the edge map of the white rectangular block, determine the first boundary position of the white rectangular block in the width direction and the second boundary position in the height direction; The aspect ratio of the white rectangular block is calculated based on the first boundary position and the second boundary position.
8. The method according to claim 7, characterized in that, Based on the edge map of the white rectangular block, determining the first boundary position of the white rectangular block in the width direction and the second boundary position in the height direction includes: In the edge map of the white rectangular block, edge pixels that meet the threshold condition are searched row by row starting from the preset starting row, and the average value of the boundary positions in the width direction is calculated as the first boundary position in the width direction; edge pixels that meet the threshold condition are searched column by column starting from the preset starting column, and the average value of the boundary positions in the height direction is calculated as the second boundary position in the height direction.
9. The method according to claim 1, characterized in that, In S6, the single-point discrimination results corresponding to the four anti-counterfeiting points—color-changing ink, color-changing line, micro-text, and white rectangular block—are calculated, including: For the anti-counterfeiting point of the color-changing ink, based on the feature map of the color-changing ink, a multi-dimensional image feature similarity comparison and fusion calculation is performed with the corresponding features of the standard genuine currency sample to output the comprehensive discrimination value of the single point of the color-changing ink. For the anti-counterfeiting point of the color-changing line, based on the multiple color-changing line sub-region images, segmented feature comparison and overall continuity analysis are performed with the corresponding sub-regions of the standard genuine coin sample, and the comprehensive discrimination value of the single point of the color-changing line is output. For micro-text anti-counterfeiting points, based on multiple sampled block images of the micro-text region, local texture similarity statistics and joint threshold judgment are performed with the corresponding blocks of standard genuine currency samples to output micro-text single-point discrimination results; For the anti-counterfeiting point of the white rectangular block, the aspect ratio of the white rectangular block area is compared with the preset geometric threshold of the standard genuine coin sample to determine the single point discrimination result of the white rectangular block.
10. The method according to claim 1, characterized in that, In S7, based on all the obtained single-point discrimination results, the final banknote authenticity authentication result is obtained, including: A comprehensive judgment is made based on the individual point discrimination results corresponding to the four anti-counterfeiting points: color-changing ink, color-changing line, micro-text, and white rectangular block. If the single-point judgment result of any anti-counterfeiting point is determined to be abnormal, the banknote is output as a suspected counterfeit; if the single-point judgment results of all anti-counterfeiting points are determined to be normal, the banknote is output as a genuine banknote; if the single-point judgment results of some anti-counterfeiting points are in a critical or uncertain state, a comprehensive judgment is made by combining the single-point judgment results of the remaining anti-counterfeiting points.