Barcode image copying detection method

By introducing cross-channel correlation chromaticity maps and local extreme mode texture features in the YCbCr color space, combined with multi-scale strategies, the robustness and applicability of LCD screen remake image detection is solved, and efficient remake image recognition is achieved.

CN120495214APending Publication Date: 2025-08-15CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510568217.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, when detecting remake images of LCD screens, there are problems such as insufficient generalization capability for multi-distortion scene detection and difficulty in detecting high-quality remake images, and lacks robustness and wide applicability.

Method used

The YCbCr color space is used for feature extraction, combined with cross-channel correlation chromaticity map and local extreme value mode (LEP) texture features, and combined color texture features through a multi-scale strategy, and used a support vector machine training classifier for remake image detection.

Benefits of technology

Effectively distinguishing between original images and remake images, improving the robustness and applicability of remake image detection, and being able to accurately identify remake images in multiple distortion scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495214A_ABST
    Figure CN120495214A_ABST
Patent Text Reader

Abstract

The invention provides a bar code image copying detection method. The bar code image copying detection method comprises the following steps: converting an image to be detected into a YCbCr color space; calculating a corresponding cross-channel correlation chromaticity diagram of the image in the YCbCr color space to capture correlation between channels; calculating local extremum mode color texture features of the image in a YCbCr color space and each channel of the introduced cross-channel related chromaticity diagram to capture detail information in a local region of the image; calculating pooling versions of the image in a YCbCr color space and a chromaticity diagram of the image to obtain semi-global color texture features; combining the normalized histograms of the local and semi-global LEP color texture features of the YCbCr color space and the cross-channel correlation chromaticity diagram as final discrimination features; extracting features of the original image and the copied image, inputting the features into a support vector machine, and training a classifier; and for any to-be-detected image, after extracting the features, inputting the features into the classifier obtained by training, and determining whether the to-be-detected image is a copied image according to a feedback result of the classifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of duplicate image detection, and in particular to a barcode image duplicate detection method. Background Art

[0002] In the digital age, digital images, as a mainstream information carrier, have been widely used in advertising, social media, and legal institutions due to their ease of reproduction and dissemination. Simultaneously, the rapid development of image acquisition, display, and processing technologies has enabled the recording of images on various display media, resulting in high-quality reproductions. An image captured by an image acquisition device of a real scene without any post-processing is called an original image. A reproduction is an image obtained by mapping the original image through an intermediate medium and then re-photographing it using an image acquisition device (such as a mobile phone, camera, or scanner). Common display media include printed paper, mobile phone screens, liquid crystal displays (LCDs), and projection screens. With the rapid development of digital cameras and smartphones, ordinary users can easily capture digital images displayed on media, thereby obtaining high-quality reproductions. Because these images are visually indistinguishable from the originals, they are difficult to distinguish visually. Consequently, reproductions captured by malicious users not only lead to copyright infringement but also pose a threat to identity authentication and public safety, damaging the credibility of digital images.

[0003] With the widespread application of new-generation digital technologies in government administration and services, digital images are widely used in e-government and e-commerce systems to verify user identities and qualifications. Various identification systems play a vital role in identity authentication, security monitoring, and enterprise management. However, the use of re-photographed images (such as photos or barcodes) to forge identities and bypass system authentication has become a serious security risk. This not only leads to privacy breaches but also increases the risk of fraud. For example, some companies reward employees based on sales volume by having employees take photos of the barcodes of sold items and upload them to the backend for sales statistics. However, some employees re-photograph barcode images uploaded by others to inflate their own performance and fraudulently claim sales bonuses, causing significant financial losses to the company. Furthermore, when shopping on social media platforms, criminals exploit loopholes in third-party payment software that often display a payment code. They negotiate with merchants to conduct transactions using video to bypass the payment system, then take screenshots of the payment code to conduct fraudulent transactions, causing significant losses to merchants. Therefore, re-photographed image detection can help prevent cybercrime, safeguard individual and collective safety, and is crucial for improving the security and reliability of various identification systems and protecting user data.

[0004] Current research on forensic image acquisition primarily focuses on detecting LCD image acquisition, which is more challenging and has a wider range of applications. Due to the increasing resolution of modern LCD screens, images captured via LCDs contain richer details than those captured from printed paper, increasing the difficulty of image acquisition. Furthermore, the diversity of LCD screen models and display modes further complicates the detection of LCD image acquisition.

[0005] Existing approaches for detecting re-photographed images of LCDs fall into three main categories: those based on traces of the re-photographing process, those based on image statistics, and those based on deep learning. Current research on forensic re-photographed images faces challenges such as insufficient generalization capabilities for re-photographed image detection in multiple distorted scenarios and the difficulty of detecting high-quality re-photographed images.

[0006] In summary, although copy-paste image detection has achieved certain results, a unified theoretical framework has not yet been formed. Therefore, there is an urgent need to design copy-paste image detection features that are more robust and have a wider range of applications. Summary of the Invention

[0007] The purpose of the present invention is to solve the technical problems in the above background and to propose a barcode image copy detection method, which includes the following steps:

[0008] S1, converting the image to be tested into the YCbCr color space to characterize the color difference between the original image and the re-photographed image;

[0009] S2. Calculate the cross-channel correlation chromaticity map corresponding to the image to be tested in the YCbCr color space to capture the correlation between channels;

[0010] S3, calculating the local extreme mode color texture features of the image in each channel of the YCbCr color space and the introduced cross-channel correlation chromaticity map to capture the detail information in the local area of the image;

[0011] S4, calculating the pooled version of the image in the YCbCr color space and its chromaticity map to obtain semi-global color texture features;

[0012] S5, combining the normalized histogram of the local and semi-global LEP color texture features of the YCbCr color space and the cross-channel correlation chromaticity map as the final discriminant feature;

[0013] S6, extracting features from the original image and the re-photographed image respectively, inputting the features into a support vector machine to train a classifier;

[0014] S7. For any image to be tested, after extracting the above features, the features are input into the trained classifier, and whether the image to be tested is a re-photographed image is determined based on the feedback result of the classifier.

[0015] In a preferred solution, step S1 further includes the following steps: in the YCbCr color space, Y represents the brightness component, Cb and Cr represent the blue and red chrominance components respectively, and feature extraction is performed using each channel of the YCbCr color space to obtain edge texture information related to brightness in the Y channel and color texture information related to chrominance in the Cb and Cr channels; by performing feature extraction on each channel of the YCbCr color space, the brightness and chrominance information in the image are independently analyzed to avoid the mixing effect between channels in the RGB color space.

[0016] In a preferred embodiment, step S2 further comprises the following steps:

[0017] Based on the YCbCr color space, a cross-channel correlation chromaticity map C is introduced. c (p) is used for feature extraction, and the chromaticity diagram is calculated as follows:

[0018]

[0019] Where p is a pixel in color channel c of image I, Indicates Z-score normalization;

[0020] By introducing the cross-channel correlated chromaticity map, the channel information of the YCbCr color space and its chromaticity map can be simultaneously utilized in the feature extraction stage, thereby obtaining the image information contained in a single channel and the relative changes between different channels.

[0021] In a preferred solution, in step S3, in order to fully capture the symmetry changes of local textures, LEP is used as a texture feature descriptor to process texture information in different directions and capture the symmetry and periodicity of the texture.

[0022] In a preferred solution, step S3 specifically includes:

[0023] For each 3×3 window of the image, LEP analyzes the relative relationship between pixels in different directions by comparing the pixel values in the 0°, 45°, 90°, and 135° directions with the central pixel value:

[0024] When the product of the difference between two pixels in the same direction and the center pixel is greater than or equal to 0, the LEP value is 1;

[0025] When the product of the differences is less than 0, the value is assigned to 0;

[0026] Finally, a 4-bit binary pattern will be generated, that is, the LEP value of the center pixel of the window will be obtained. For the center pixel I of a 3×3 window, c and its corresponding adjacent pixel I kFor example, the calculation process of LEP is shown as follows:

[0027] I′ k =I k -I c ,k=1,2,...,8;

[0028]

[0029] In the preferred solution, in step S4, by introducing a multi-scale strategy, an average pooling operation is used to average the adjacent pixels so as to retain the local information of the image and avoid destroying the symmetry relationship of the image pixels, thereby ensuring that LEP captures the local directional texture features.

[0030] In a preferred solution, step S4 specifically includes the following steps:

[0031] For a given image I of size M×N, pooled images I of different scales * The calculation process is shown as follows:

[0032]

[0033] in: z∈{1,2,3}, Indicates rounding down, *∈{Avg1, Avg2}, s=2, 3 indicates using average pooling kernels of size 2×2 and 3×3 respectively;

[0034] Pooled image I Avg1 and I Avg2 The sizes of are 1 / 4 and 1 / 9 times the size of the original image I, respectively. s starts counting from 2 because when s=1, it means that the image uses the original size, that is, image I is directly used for feature extraction.

[0035] In a preferred embodiment, step S5 includes the following steps:

[0036] S51. For a given image, convert the image to a YCbCr color space and calculate its cross-channel correlated chromaticity map;

[0037] S52. Calculate the normalized LEP histogram of each channel of the image at three scales corresponding to the original version and the two pooled versions in the YCbCr color space. The calculation process of the LEP histogram is shown in the following formula:

[0038]

[0039] Where k∈[0,15], LEP(u,v) represents each pixel of the LEP map;

[0040] For the LEP map of each channel, a 16-dimensional feature is obtained. The final feature vector is formed by combining the image texture features extracted from each channel of the two color spaces at three scales. The final feature dimension is 2×3×3×16=288.

[0041] In the preferred solution, step S6 includes the following steps: in the training phase, two groups of known images, one group of original images and one group of re-photographed images, are used to extract image statistical features; the re-photographed images are used as positive samples, and the labels are set to "+1", and the original images are used as negative samples, and the labels are set to "-1", and the extracted feature vectors and corresponding image labels are input into a support vector machine to obtain the optimal linear classification surface, amplify the differences between the data, so as to distinguish the two types of images, and finally train a forensic classifier.

[0042] In a preferred solution, in step S7, for any image to be tested, the same method as in the training phase is used to perform image statistics, extract feature vectors, input the feature vectors into the classifier obtained by training, and determine whether the image to be tested is a re-photographed image based on the label value fed back by the classifier.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] (1) Feature extraction is performed in the YCbCr color space to effectively avoid the problem of non-independence of RGB color space channels.

[0045] (2) Based on the YCbCr color space, a cross-channel correlation chromaticity map is introduced to obtain the relative changes between different channels.

[0046] (3) LEP texture descriptors are used to extract color texture features, effectively capturing the symmetry and periodicity of image textures to cope with re-shot images with specific directional and periodic texture changes;

[0047] (4) A multi-scale strategy is proposed to capture pixel correlations at different scales and the texture loss caused by the reshoot operation.

[0048] (5) Design a cascaded multi-scale color texture feature that combines the image texture features extracted from each channel of the two color spaces at three scales, which can effectively solve the problem of detecting re-shot images in multiple distorted scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of McAdam's ellipse drawn on the CIE 1931xy chromaticity diagram in the present invention.

[0050] Figure 2 This is an example diagram of LEP calculation in the present invention.

[0051] Figure 3It is a visual comparison diagram of a pair of original images and re-photographed images in different color spaces.

[0052] Figure 4 This is a comparison result of extracting a scale LEP color texture histogram from 500 original images and 500 re-photographed images.

[0053] Figure 5 It is a feature extraction flow chart of the method in the present invention. DETAILED DESCRIPTION

[0054] like Figures 1 to 5 As shown, a barcode image copy detection method based on cascaded multi-scale color texture features is characterized by comprising the following steps:

[0055] S1, converting the image to be tested into the YCbCr color space to characterize the color difference between the two types of images;

[0056] S2. Calculate the cross-channel correlation chromaticity map corresponding to the image in the YCbCr color space to capture the correlation between channels;

[0057] S3. Calculate the local extreme value pattern (LEP) color texture features of the image in each channel of the YCbCr color space and the introduced cross-channel correlation chromaticity map to capture the detail information in the local area of the image;

[0058] S4. Calculate the pooled version of the image in the YCbCr color space and its chromaticity map to obtain semi-global color texture features. This captures the color texture structure of a larger area of the image from a semi-global perspective, further enhancing the feature's ability to represent the image texture structure.

[0059] S5. The normalized histogram of the local and semi-global LEP color texture features of the combined YCbCr color space and cross-channel correlation chromaticity map is used as the final discriminant feature.

[0060] S6. After extracting features from a group of original images and a group of re-photographed images respectively, input them into a support vector machine to train a classifier.

[0061] S7. For any image to be tested, after extracting the above features, the features are input into the trained classifier, and whether the image to be tested is a re-photographed image is determined based on the feedback result of the classifier.

[0062] Step S1 includes: Currently, the most commonly used color space for image processing is the RGB color space, which uses three channels: red (R), green (G), and blue (B) to represent the color information of an image. However, a major disadvantage of using the RGB color space in recaptured image forensics research is that each channel combines both luminance and chrominance information, and the channels are not independent of each other. This makes it difficult for the RGB color space to effectively represent the chrominance changes caused by the recapture operation.

[0063] To address this issue, we used MacAdam ellipses, a model that describes the human eye's sensitivity to color changes. Each ellipse, called the color tolerance or just noticeable difference (JND), represents the maximum range of color variation within which the human eye cannot perceive color changes. The ellipses within the blue and red regions are much smaller than those within the green region, indicating a higher sensitivity to blue and red than green, resulting in lower color tolerance for blue and red. This observation motivates us to consider capturing color texture information in the blue and red components, which are sensitive to color differences, to mitigate chromatic aberrations caused by re-acquisition. In the YCbCr color space, Y represents the luminance component, while Cb and Cr represent the blue and red chromaticity components, respectively. Therefore, we extract features from each channel of the YCbCr color space to obtain edge texture information related to luminance in the Y channel and color texture information related to chromaticity in the Cb and Cr channels. By extracting features from each channel of the YCbCr color space, it is helpful to independently analyze the brightness and chromaticity information in the image, thereby effectively avoiding the mixing effect between channels in the RGB color space.

[0064] Step S2 includes: Given that single-channel features cannot capture the correlation between different channels, for example, brightness changes usually cause chromaticity shifts. Therefore, the relationship between channels can provide clues for color distortion caused by the re-acquisition operation. In order to make full use of the color information in different channels and balance their relationship, thereby enhancing the robustness of the feature to brightness and chromaticity changes, inspired by the inverse-intensity chromaticity (IIC) space, a cross-channel correlation chromaticity map C is introduced based on the YCbCr color space. c (p) is used for feature extraction, and the chromaticity diagram is calculated as follows:

[0065]

[0066] Where: p is a pixel in color channel c of image I, By introducing a cross-channel correlation chromaticity map, the feature extraction stage can simultaneously utilize the channel information of the YCbCr color space and its chromaticity map, thereby obtaining the image information contained in a single channel and the relative changes between different channels.

[0067] Step S3 includes: in order to fully capture the symmetry changes of local textures, LEP is used as a texture feature descriptor to process texture information in different directions, which can effectively capture the symmetry and periodicity of the texture. Specifically, for each 3×3 window of the image, LEP compares the pixel values in the directions of 0°, 45°, 90° and 135° with the center pixel value to analyze the relative relationship between pixels in different directions. If the product of the difference between two pixels in the same direction and the center pixel is greater than or equal to 0, LEP is assigned a value of 1; conversely, if the product of the difference is less than 0, it is assigned a value of 0. Therefore, a 4-bit binary pattern will eventually be generated, that is, the LEP value of the center pixel of the window is obtained, so the value range of LEP is [0,15]. For the center pixel I of a 3×3 window c and its corresponding adjacent pixel I k For example, the calculation process of LEP is as follows:

[0068] I′ k =I k -I c ,k=1,2,...,8

[0069]

[0070] Step S4 includes: Although LEP has certain advantages in capturing the directional texture information of an image, the current scheme can only obtain the correlation between image pixels in a 3×3 local area. However, the pixels in the image are correlated not only in the local area, but also in a larger scale range. In addition, considering that some noise will cause a certain degree of interference to the stability of the LEP feature, it is difficult for the LEP feature to accurately reflect the true texture characteristics of the image in this case. Based on this, in order to obtain the correlation of pixels in a larger scale range and reduce the impact of local noise on the stability of the LEP feature. By introducing a multi-scale strategy, the average pooling operation is used to average the adjacent pixels, so as to retain the local information of the image while effectively avoiding the destruction of the symmetry relationship of the image pixels, thereby ensuring that LEP can effectively capture the local directional texture features.

[0071] Specifically, for a given image I of size M×N, pooled images I of different scales * The calculation process is shown as follows:

[0072]

[0073] in: z∈{1,2,3}, Indicates rounding down, *∈{Avg1, Avg2}, s=2,3 respectively indicate using average pooling kernels of size 2×2 and 3×3. Therefore, the pooled image I Avg1 and I Avg2 The sizes of the pooled image I are 1 / 4 and 1 / 9 times the size of the original image I. In other words, the pooled image I Avg1 and I Avg2 The two adjacent pixels in can reflect the information of 8 and 18 pixels in image I, respectively. It is worth noting that s starts counting from 2 because when s=1, it means that the image uses the original size, that is, image I is directly used for feature extraction.

[0074] Step S5 includes: for a given image, we first convert the image to the YCbCr color space and calculate its cross-channel correlation chromaticity map. Then, we calculate the normalized LEP histogram of each channel of the image at three scales (original version and two pooled versions) in these two color spaces. The calculation process of the LEP histogram is shown in the following formula:

[0075]

[0076] Where: k∈[0,15], LEP(u,v) represents each pixel of the LEP map. Therefore, for each channel of the LEP map, a 16-dimensional feature can be obtained. By combining the image texture features extracted from each channel of the two color spaces at three scales, the final feature vector is formed. The final feature dimension is 2×3×3×16=288.

[0077] Step S6 includes: during a training phase, extracting the aforementioned image statistical features using two known sets of images: one original image and one re-photographed image. The re-photographed images are used as positive samples, labeled "+1," and the original images are used as negative samples, labeled "-1." The extracted feature vectors and corresponding image labels are then fed into a support vector machine (SVM) to find the optimal linear classification surface, maximizing the differences between the data points to distinguish between the two image classes. Ultimately, a forensic classifier is trained.

[0078] Step S7 includes: for any image to be tested, using the same method as in the training phase to perform image statistics, extracting feature vectors, inputting the feature vectors into the classifier obtained through training, and determining whether the image to be tested is a re-photographed image based on the label value fed back by the classifier.

[0079] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A barcode image copy detection method, characterized by: The following steps are involved: S1, converting the image to be tested into the YCbCr color space to characterize the color difference between the original image and the re-photographed image; S2. Calculate the cross-channel correlation chromaticity map corresponding to the image to be tested in the YCbCr color space to capture the correlation between channels; S3, calculating the local extreme mode color texture features of the image in each channel of the YCbCr color space and the introduced cross-channel correlation chromaticity map to capture the detail information in the local area of the image; S4, calculating the pooled version of the image in the YCbCr color space and its chromaticity map to obtain semi-global color texture features; S5, combining the normalized histogram of the local and semi-global LEP color texture features of the YCbCr color space and the cross-channel correlation chromaticity map as the final discriminant feature; S6, extracting features from the original image and the re-photographed image respectively, inputting the features into a support vector machine to train a classifier; S7. For any image to be tested, after extracting the above features, the features are input into the trained classifier, and whether the image to be tested is a re-photographed image is determined based on the feedback result of the classifier.

2. The barcode image copy detection method according to claim 1, wherein: Step S1 also includes the following steps: in the YCbCr color space, Y represents the brightness component, Cb and Cr represent the blue and red chrominance components respectively, and each channel of the YCbCr color space is used to perform feature extraction to obtain edge texture information related to brightness in the Y channel and color texture information related to chrominance in the Cb and Cr channels; by performing feature extraction on each channel of the YCbCr color space, the brightness and chrominance information in the image are independently analyzed to avoid the mixing effect between channels in the RGB color space.

3. The barcode image copy detection method according to claim 1, wherein: Step S2 further includes the following steps: Based on the YCbCr color space, a cross-channel correlation chromaticity map C is introduced. c (p) is used for feature extraction, and the chromaticity diagram is calculated as follows: Where p is a pixel in color channel c of image I, Indicates Z-score normalization; By introducing the cross-channel correlated chromaticity map, the channel information of the YCbCr color space and its chromaticity map can be simultaneously utilized in the feature extraction stage, thereby obtaining the image information contained in a single channel and the relative changes between different channels.

4. The method for detecting a barcode image duplication according to claim 1, wherein: In step S3, in order to fully capture the symmetry changes of local textures, LEP is used as a texture feature descriptor to process texture information in different directions and capture the symmetry and periodicity of the texture.

5. The barcode image copy detection method according to claim 1, wherein: Step S3 specifically includes: For each 3×3 window of the image, LEP analyzes the relative relationship between pixels in different directions by comparing the pixel values in the 0°, 45°, 90°, and 135° directions with the central pixel value: When the product of the difference between two pixels in the same direction and the center pixel is greater than or equal to 0, the LEP value is 1; When the product of the differences is less than 0, the value is assigned to 0; Finally, a 4-bit binary pattern will be generated, that is, the LEP value of the center pixel of the window will be obtained. For the center pixel I of a 3×3 window, c and its corresponding adjacent pixel I k For example, the calculation process of LEP is shown as follows: I′ k =I k -I c ,k=1,2,...,8; 6. The barcode image copy detection method according to claim 1, wherein: In step S4, by introducing a multi-scale strategy, an average pooling operation is used to average the adjacent pixels so as to retain the local information of the image and avoid destroying the symmetry relationship of the image pixels, thereby ensuring that LEP captures the local directional texture features.

7. A barcode image copy detection method according to claim 6, characterized in that: Step S4 The specific steps include: For a given image I of size M×N, pooled images I of different scales * The calculation process is shown as follows: in: z∈{1,2,3}, Indicates rounding down, *∈{Avg1, Avg2}, s=2, 3 indicates using average pooling kernels of size 2×2 and 3×3 respectively; Pooled image I Avg1 and U Avg2 The sizes of are 1 / 4 and 1 / 9 times the size of the original image I, respectively. s starts counting from 2 because when s=1, it means that the image uses the original size, that is, image I is directly used for feature extraction.

8. The barcode image copy detection method according to claim 1, wherein: Step S5 includes the following steps: S51. For a given image, convert the image to a YCbCr color space and calculate its cross-channel correlated chromaticity map; S52. Calculate the normalized LEP histogram of each channel of the image at three scales corresponding to the original version and the two pooled versions in the YCbCr color space. The calculation process of the LEP histogram is shown in the following formula: Where k∈[0,15], LEP(u,v) represents each pixel of the LEP map; For the LEP map of each channel, a 16-dimensional feature is obtained. The final feature vector is formed by combining the image texture features extracted from each channel of the two color spaces at three scales. The final feature dimension is 2×3×3×16=288.

9. The barcode image copy detection method according to claim 1, wherein: Step S6 includes the following steps: in the training phase, two sets of known images, one set of original images and one set of re-photographed images, are used to extract image statistical features; the re-photographed images are used as positive samples and their labels are set to "+1", and the original images are used as negative samples and their labels are set to "-1", and the extracted feature vectors and corresponding image labels are input into a support vector machine to obtain the optimal linear classification surface, amplifying the differences between the data in order to distinguish the two types of images, and finally training a forensic classifier.

10. The barcode image copy detection method according to claim 1, wherein: Step S6 includes the following steps: In step S7, for any image to be tested, the image is statistically analyzed using the same method as in the training phase, feature vectors are extracted, the feature vectors are input into the classifier obtained through training, and whether the image to be tested is a re-photographed image is determined based on the label value fed back by the classifier.