Image-aware hashing method, system, device and information data processing terminal

Through the image-aware hashing method based on point diffusion block truncation encoding, the image fingerprint is constructed, which solves the problem that the prior art cannot effectively prevent image tampering, and realizes efficient detection of malicious users' images tampering with them, and has important image copyright protection value.

CN113763225BActive Publication Date: 2024-11-08XIDIAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110534856.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-17
Publication Date
2024-11-08
Estimated Expiration
2041-05-17

AI Technical Summary

Technical Problem

The existing password hashing method can only avoid copying by malicious users to a certain extent, and cannot effectively prevent malicious tampering with images by malicious users, such as corner cropping and format conversion, resulting in the original image being changed and the right is confirmed again.

Method used

Using image-aware hashing method based on point diffusion block truncation encoding, color histogram features and bit pattern features are constructed through size scaling, grayscale processing, DCT transformation, image decomposition, feature extraction and fingerprint generation, and merged and binarized to obtain Image fingerprint, used to detect infringement and tampering of images.

Benefits of technology

It significantly improves the detection rate of images tampered by malicious users, and can effectively prevent malicious users from routine processing of confirmed images, resulting in the original image being confirmed again after changes, which has important image copyright protection value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113763225B_ABST
    Figure CN113763225B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology, and discloses an image-aware hashing method, system, device and information data processing terminal, wherein the image-aware hashing method comprises: reducing an image of size M×N to a small image of 256×256; graying the obtained small image; compressing the grayed image by discrete cosine transform DCT algorithm, obtaining the coefficient matrix of DCT and then reducing DCT; dividing the 92×92 matrix after the DCT reduction into a number of 4×4 small blocks, thereby generating a maximum quantizer and a minimum quantizer and a bitmap image; constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image; merging the CHF and BPF features, and binarizing to obtain a picture fingerprint. The present invention effectively prevents malicious users from stealing other people's pictures for rights confirmation by comparing image fingerprints, and has important use value in image copyright protection applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to an image-aware hashing method, system, device and information data processing terminal. Background Art

[0002] At present, with the rapid development of mobile Internet, images have become an important source of information for humans due to their large amount of information and fast transmission speed. Images can express much more information than words and are much more intuitive.

[0003] Therefore, people cannot do without images in almost every aspect of study, work, life, etc. However, images are easy to obtain, have high redundancy, low confidentiality, are insensitive to distortion, and are easy to edit.

[0004] Although the emergence of password hashing has avoided this situation to a certain extent, it still has many disadvantages. In password hashing, a function (algorithm) is used to complete a mapping of keywords to memory addresses. According to the keywords given by the user, the function calculates the target address and then retrieves the target. Password hashing requires that the original file is not allowed to be changed in any way. Even any slight change will change the generated hash value. Therefore, password hashing can only prevent malicious users from copying to a certain extent, but cannot prevent malicious users from maliciously tampering with the original image.

[0005] In view of the above problems, and considering that it is difficult for people to confirm and protect the copyright of images, there is an urgent need for a method that can effectively prevent malicious users from stealing other people's pictures for copyright confirmation, or perform conventional processing on the original pictures, resulting in the original pictures being changed and then being confirmed again. The present invention is generated based on this practical demand.

[0006] Through the above analysis, the problems and defects of the existing technology are as follows: the existing password hash can only prevent malicious users from copying to a certain extent, but cannot prevent malicious users from maliciously tampering with the original image.

[0007] The difficulty in solving the above problems and defects is: how to ensure that the infringement can be detected after the malicious user performs a series of routine processing (corner cropping, format conversion) on the original image, which causes the original image to be changed.

[0008] The significance of solving the above problems and defects is to prevent malicious users from arbitrarily copying and modifying copyrighted images without the authorization of the original image owner to a certain extent, which has great practical value in image copyright protection. Summary of the invention

[0009] In view of the problems existing in the prior art, the present invention provides an image-aware hashing method, system, device and information data processing terminal, and more particularly, relates to an image-aware hashing method, system, device and information data processing terminal based on point diffusion block truncation coding.

[0010] The present invention is implemented as follows: an image-aware hashing method, the image-aware hashing method comprising the following steps:

[0011] Step 1: Resizing: Reduce the input image of size M×N to a small image of 256×256; reduce the amount of calculation.

[0012] Step 2: Grayscale processing: grayscale the obtained small image; after grayscale processing, the dimension of the image matrix decreases, the calculation speed is greatly improved, and the gradient information is still retained.

[0013] Step 3, DCT transformation: compress the grayscale image through the discrete cosine transform (DCT) algorithm, obtain the DCT coefficient matrix and then reduce the DCT, leaving only the DCT 92×92 matrix, so as to obtain the low-frequency part of the image; obtain the low-frequency part of the image, that is, the main feature information of the image.

[0014] Step 4, image decomposition: Divide the 92×92 matrix after the reduced DCT into several 4×4 image sub-blocks, and then generate the maximum quantizer, the minimum quantizer and the bitmap image; the purpose of dividing the block into 4×4 is to facilitate the calculation of BPF.

[0015] Step 5, feature extraction: construct the color histogram feature CHF and the bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image;

[0016] Step 6: Fingerprint generation: Combine the CHF and BPF features and binarize them to obtain the image fingerprint.

[0017] Further, in step 4, the 92×92 matrix after the DCT is reduced is divided into a plurality of 4×4 image sub-blocks, and a maximum quantizer, a minimum quantizer and a bitmap image are generated, including:

[0018] (1) Divide the 92×92 matrix after the reduced DCT into non-overlapping image sub-blocks, assuming I k represents the kth image sub-block of size m×n, I k (i,j) represents the pixel value of the k-th image sub-block at position (i,j); where, i=1,2,...,m, j=1,2,...,n, M=N=92, m=n=4;

[0019] (2) After block division, the maximum and minimum quantizers can be obtained according to the following formula:

[0020]

[0021]

[0022] in, represents the maximum quantizer of the k-th image sub-block, represents the pixel value at any (i, j) position in the kth image sub-block, represents the minimum quantizer of the k-th image sub-block;

[0023] (3) Bitmap images are also operated on the basis of block division. After block division, a priority matrix O with the same size as the carrier image sub-block is defined. The priority matrix represents the processing order of each pixel in each image sub-block. The smaller the value of the element pair in the priority matrix, the higher the processing priority of the pixel at that position in the image sub-block.

[0024] Further, in step (3), for each image sub-block, each pixel of each image sub-block is processed according to the following steps in the processing order of the pixels in each image sub-block defined in the priority matrix:

[0025] 1) For the pixel I at position (i, j) of the k-th image sub-block k (i,j), determine the neighborhood of the pixel, the neighborhood is as follows:

[0026]

[0027] 2) Calculate pixel I k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood is as follows:

[0028]

[0029] Among them, O(i,j) represents pixel I k The processing order of (i,j) in the priority matrix, O(i+p,j+q) represents pixel I k The processing order of pixels in the (i, j) neighborhood in the priority matrix, W(p, q) represents the weighted value in the diffusion matrix;

[0030] 3) Calculate the pixel I of the kth image sub-block at position (i, j) k (i, j) pixel value V after point diffusion block truncation coding k (i,j), the formula is as follows:

[0031] V k (i,j)=Ik (i,j)+s(i,j);

[0032]

[0033]

[0034] in, and Respectively represent the maximum pixel value and the minimum pixel value in the k-th image sub-block, represents the average value of the k-th sub-block, and sum is the pixel I in the k-th image sub-block obtained in step 2). k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood, V k The initial value of is the original pixel value of the k-th image sub-block; in addition, if I k (i, j) is at the boundary of the image sub-block, then pixel I k The region of (i, j) does not include pixels beyond the image subblock boundary;

[0035] 4) Get the pixel value V after point diffusion block truncation encoding k After (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula:

[0036]

[0037] Among them, Bm k (i, j) represents the bitmap image value of the k-th image sub-block at position (i, j), V k (i, j) represents the pixel value of the k-th image sub-block after being encoded at the position (i, j), Indicates V k The average value of .

[0038] Further, in step 5, the step of constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image includes:

[0039] (1) CHF is an effective feature for describing the brightness and contrast of color images, and the distribution of quantizers can effectively describe the image content and its corresponding contrast; the CHF includes CHF max and CHF min Two features, CHF max Represents the feature composed of the minimum quantizer and codebook index and histogram statistics, CHF min Represents the features composed of the maximum quantizer and codebook index and histogram statistics;

[0040] (2) BPF is used to represent the edges and visual texture patterns of images.

[0041] Further, in step (1), the calculation steps are as follows:

[0042] 1) Use LBG-VQ to generate codebook C = {C 1 ,...,C t ,...,C θ}; where C t represents the t-th codeword in codebook C, t=1,2,...,θ, θ represents the number of codewords in codebook C, and the index of the minimum distance between the codeword and the two quantizers is calculated according to the following formula:

[0043]

[0044]

[0045] in, represents the maximum quantizer of the kth image sub-block and a codeword C in codebook C t The index of the closest distance, arg represents the indexing operation, Indicates the distance formula, C t represents the tth codeword in the codebook C, represents the minimum quantizer of the kth image subblock and a codeword C in codebook C t The index of the closest distance;

[0046] 2) After being indexed by the maximum quantizer and the minimum quantizer and the codebook, CHF max and CHF min It can be calculated according to the following formula:

[0047]

[0048]

[0049] Where t = 1, 2, ..., θ, θ represents the number of code words in the codebook C, and Pr{.} represents the histogram statistics operation. Thus, CHF is obtained. max and CHF min Two characteristics.

[0050] Further, in step (2), the BPF calculation steps are as follows:

[0051] 1) Use Binary-LBG-VQ training to generate a bit pattern codebook consisting of binary codewords, denoted as B = {B 1 ,B 2 ,...Bβ};

[0052] 2) The bitmap image and the bit pattern codebook generated by encoding are divided into blocks of the same size, and the sub-blocks are used as index units. The bitmap image is used to perform bit pattern indexing on the bit pattern codebook. The bit pattern indexing rule is shown in the following formula:

[0053]

[0054] in, arg represents the indexing operation, Bm k represents the kth image sub-block in the bitmap image, B t represents the t-th sub-block after the bit pattern codebook is divided into blocks, t = 1, 2, ..., σ; σ represents the number of blocks of the bit pattern codebook, represents the index of the k-th bitmap image subblock in the bit pattern codebook, and the symbol δ{.,.} represents the Hamming distance between two binary subblocks;

[0055] 3) After performing bit pattern indexing on the bitmap image and the bit pattern codebook, the obtained results are histogrammed to obtain the BPF, as shown in the following formula:

[0056]

[0057] Wherein, t represents the index of the t-th sub-block in the bit pattern codebook, t=1, 2, ..., σ, σ represents the number of blocks in the bit pattern codebook, and Pr{.} represents the operation of obtaining the histogram, thereby obtaining the BPF.

[0058] Further, in step 6, the CHF and BPF features are combined and binarized to obtain an image fingerprint, including:

[0059] (1) CHF max , CHF min Merge with BPF to get the merged vector V:

[0060] V = {CHF max ,CHF min ,BPF};

[0061] Assume CHF max represents a vector of size 1×η, then CHF min The size of is also 1×η, BPF represents a vector of size 1×μ, then V represents a merged vector of size 1×(η+η+μ);

[0062] (2) Binarize the merged vector V to obtain the image fingerprint K, as shown in the following formula:

[0063]

[0064] Wherein, K(i) represents the value of the i-th element in the image fingerprint, V(i) represents the i-th element in the vector V, m=mean(V), represents the average value of the vector V, and mean represents the averaging operation.

[0065] Another object of the present invention is to provide an image-aware hashing system using the image-aware hashing method, the image-aware hashing system comprising:

[0066] The size scaling module is used to reduce the input image of size M×N to a small image of 256×256;

[0067] A grayscale processing module is used to grayscale the obtained small image;

[0068] The DCT transformation module is used to compress the grayscale image through the discrete cosine transform (DCT) algorithm, obtain the DCT coefficient matrix, and then reduce the DCT to retain only the DCT 92×92 matrix, thereby obtaining the low-frequency part of the image;

[0069] An image decomposition module is used to divide the 92×92 matrix after the DCT reduction into a number of 4×4 image sub-blocks, and then generate a maximum quantizer, a minimum quantizer and a bitmap image;

[0070] A feature extraction module, used for constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image;

[0071] The fingerprint generation module is used to merge the CHF and BPF features and binarize them to obtain the image fingerprint.

[0072] Another object of the present invention is to provide a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0073] Reduce the input image of size M×N to a small image of 256×256; grayscale the obtained small image; compress the grayscale image through the discrete cosine transform DCT algorithm, obtain the DCT coefficient matrix and then reduce the DCT, retaining only the DCT 92×92 matrix, so as to obtain the low-frequency part of the image; divide the 92×92 matrix after the DCT reduction into several 4×4 image sub-blocks, and then generate the maximum quantizer, minimum quantizer and bitmap image; construct the color histogram feature CHF and the bit pattern feature BPF according to the generated maximum quantizer, minimum quantizer and bitmap image; merge the CHF and BPF features, and binarize them to obtain the image fingerprint.

[0074] Another object of the present invention is to provide an information data processing terminal, which is used to implement the image-aware hashing system.

[0075] Combining all the above-mentioned technical solutions, the advantages and positive effects of the present invention are as follows: the image-aware hashing method provided by the present invention can effectively prevent malicious users from stealing other people's pictures for ownership confirmation by comparing image fingerprints, or performing conventional processing on the original image (border cropping, format conversion, etc.), resulting in the original image being changed and then re-confirmed, which has important use value in image copyright protection applications.

[0076] Experimental results show that the detection rate of the image-aware hashing method of the present invention is significantly higher than that of the traditional pHash method. It can effectively prevent malicious users from performing routine processing on other people's confirmed pictures, resulting in the re-confirmation of the original picture after the original picture has changed. It has high use value in the image confirmation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 It is a flow chart of the image-aware hashing method provided by an embodiment of the present invention.

[0079] Figure 2 It is a schematic diagram of the image-aware hashing method provided by an embodiment of the present invention.

[0080] Figure 3 is a structural block diagram of an image-aware hashing system provided by an embodiment of the present invention;

[0081] In the figure: 1. Size scaling module; 2. Grayscale processing module; 3. DCT transformation module; 4. Image decomposition module; 5. Feature extraction module; 6. Fingerprint generation module.

[0082] Figure 4 It is a calculation flow chart of the color histogram feature CHF provided by an embodiment of the present invention.

[0083] Figure 5 It is a calculation flow chart of the bit pattern feature BPF provided by an embodiment of the present invention.

[0084] Figure 6 This is a final image fingerprint calculation flow chart provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0085] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0086] In view of the problems existing in the prior art, the present invention provides an image-aware hashing method, system, device and information data processing terminal. The present invention is described in detail below in conjunction with the accompanying drawings.

[0087] like Figure 1 As shown, the image-aware hashing method provided by the embodiment of the present invention includes the following steps:

[0088] S101, resizing: reducing the input image of size M×N to a small image of size 256×256;

[0089] S102, grayscale processing: grayscale processing of the obtained small image;

[0090] S103, DCT transformation: the grayscale image is compressed by using a discrete cosine transform (DCT) algorithm to obtain a DCT coefficient matrix and then reduce the DCT to retain only a DCT 92×92 matrix, thereby obtaining a low-frequency portion of the image;

[0091] S104, image decomposition: dividing the 92×92 matrix after the DCT reduction into a number of 4×4 image sub-blocks, and then generating a maximum quantizer, a minimum quantizer and a bitmap image;

[0092] S105, feature extraction: constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image;

[0093] S106, fingerprint generation: CHF and BPF features are combined and binarized to obtain image fingerprint.

[0094] The principle diagram of the image-aware hashing method provided by the embodiment of the present invention is as follows: Figure 2 shown.

[0095] like Figure 3 As shown, the image-aware hashing system provided by the embodiment of the present invention includes:

[0096] A size scaling module 1 is used to reduce the input image of size M×N to a small image of size 256×256;

[0097] Grayscale processing module 2, used for grayscale processing of the obtained small image;

[0098] DCT transformation module 3 is used to compress the grayscale image through discrete cosine transform DCT algorithm, and then reduce the DCT coefficient matrix after obtaining it, and only retain the DCT 92×92 matrix, so as to obtain the low-frequency part of the image;

[0099] An image decomposition module 4 is used to divide the 92×92 matrix after the DCT reduction into a number of 4×4 image sub-blocks, and then generate a maximum quantizer and a minimum quantizer and a bitmap image;

[0100] A feature extraction module 5 is used to construct a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image;

[0101] The fingerprint generation module 6 is used to merge the CHF and BPF features and perform binarization to obtain the image fingerprint.

[0102] The technical solution of the present invention is further described below in conjunction with embodiments.

[0103] like Figure 1-Figure 2 As shown, the present invention provides an image perceptual hashing method based on point diffusion block truncation coding, which includes the following steps:

[0104] Step 1: Size reduction. As needed, reduce the image of size M×N to a small image with a width of 256 and a height of 256;

[0105] Step 2: Grayscale the image. Grayscale the small image obtained in step 1;

[0106] Step 3: DCT transformation. The grayscale image is compressed using the discrete cosine transform (DCT) algorithm. After obtaining the DCT coefficient matrix, the DCT is reduced to retain only the DCT 92×92 matrix, thereby obtaining the low-frequency part of the image.

[0107] Step 4: Image decomposition. Divide the 92×92 matrix after the reduced DCT into several 4×4 small blocks, and then generate the maximum quantizer, minimum quantizer and bitmap image;

[0108] Step 5: Feature extraction: construct the color histogram feature CHF and the bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image;

[0109] Step 6: Generate image fingerprint; merge CHF and BPF features and binarize them to obtain image fingerprint.

[0110] Among them, when the image reduction step is implemented, the image with a width of M and a height of N can be evenly divided into 256×256 blocks, and the width and height directions are divided into 256 parts. The average value of each color component in each block is taken to obtain a small image with a width of 256 and a height of 256.

[0111] When the image grayscale processing is implemented, the red, green and blue components of a pixel in the color image can be recorded as R, G and B respectively, and the grayscale value of the pixel is Y=R×0.299+G×0.587+B×0.114.

[0112] In specific implementation, the image decomposition steps are as follows:

[0113] (1) Divide the 92×92 matrix after the reduced DCT into non-overlapping image sub-blocks, assuming I k represents the kth image sub-block of size m×n, I k (i, j) represents the pixel value of the k-th image sub-block at position (i, j), where i=1,2,...,m, j=1,2,...,n, M=N=92, m=n=4;

[0114] (2) After block division, the maximum and minimum quantizers can be obtained according to the following formula:

[0115]

[0116]

[0117] in, represents the maximum quantizer of the k-th image sub-block, represents the pixel value at any (i, j) position in the kth image sub-block, represents the minimum quantizer of the k-th image sub-block;

[0118] (3) Bitmap images are also operated on the basis of block division. After block division, a priority matrix O with the same size as the carrier image sub-block is defined. The priority matrix represents the processing order of each pixel in each image sub-block. The smaller the value of the element pair in the priority matrix, the higher the processing priority of the pixel at that position in the image sub-block.

[0119] For each image sub-block, the following steps are followed in turn according to the processing order of the pixels in each image sub-block defined in the priority matrix:

[0120] 1) For the pixel I at position (i, j) of the k-th image sub-block k (i,j), determine the neighborhood of the pixel, the neighborhood is as follows:

[0121]

[0122] 2) Calculate pixel I k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood is as follows:

[0123]

[0124] Among them, O(i,j) represents pixel I k The processing order of (i,j) in the priority matrix, O(i+p,j+q) represents pixel I k The processing order of pixels in the (i, j) neighborhood in the priority matrix, W(p, q) represents the weighted value in the diffusion matrix;

[0125] 3) Calculate the pixel I of the kth image sub-block at position (i, j) k (i, j) pixel value V after point diffusion block truncation coding k (i,j), the formula is as follows:

[0126] V k (i,j)=I k (i,j)+s(i,j)

[0127]

[0128]

[0129] in, and Respectively represent the maximum pixel value and the minimum pixel value in the k-th image sub-block, represents the average value of the k-th sub-block, and sum is the pixel I in the k-th image sub-block obtained in step 2). k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood, V k The initial value of is the original pixel value of the kth image sub-block. In addition, if I k (i, j) is at the boundary of the image sub-block, then pixel I k The neighborhood of (i,j) does not include pixels beyond the image subblock boundary.

[0130] 4) Get the pixel value V after point diffusion block truncation encoding k After (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula:

[0131]

[0132] Among them, Bm k(i, j) represents the bitmap image value of the k-th image sub-block at position (i, j), V k (i, j) represents the pixel value of the k-th image sub-block after being encoded at the position (i, j), Indicates V k The average value of .

[0133] like Figure 4 As shown, the steps of constructing the color histogram feature CHF in the feature extraction of the present invention are as follows:

[0134] (1) Use LBG-VQ to generate codebook C = {C 1 ,...,C t ,...,C θ}, where C t represents the t-th codeword in codebook C, t=1,2,...,θ, θ represents the number of codewords in codebook C, and the index of the minimum distance between the codeword and the two quantizers is calculated according to the following formula:

[0135]

[0136]

[0137] in, represents the maximum quantizer of the kth image sub-block and a codeword C in codebook C t The index of the closest distance, arg represents the indexing operation, Indicates the distance formula, C t represents the tth codeword in the codebook C, represents the minimum quantizer of the kth image subblock and a codeword C in codebook C t The index of the closest distance;

[0138] (2) After being indexed by the maximum quantizer and the minimum quantizer and the codebook, CHF max and CHF min It can be calculated according to the following formula:

[0139]

[0140]

[0141] Where t = 1, 2, ..., θ, θ represents the number of code words in the codebook C, and Pr{.} represents the histogram statistics operation. So far, CHF is obtained. max and CHF min Two characteristics.

[0142] like Figure 5As shown, the steps of constructing the bit pattern feature BPF in the feature extraction of the present invention are as follows:

[0143] (1) First, Binary-LBG-VQ training is used to generate a bit pattern codebook consisting of binary codewords, denoted as B = {B 1 ,B 2 ,...B β During the bit pattern codebook generation, all code vectors are identified as a value between 0 and 1 in each training process. The training vectors are first initialized at the corners of the hypercube space, and then the code vectors are updated and calculated by moving inside the hypercube during training. After the training, all code vectors are binarized to obtain the final result. This process can adjust the value greater than the threshold 0.5 to 1 and the value less than or equal to 0.5 to 0;

[0144] (2) Then the bitmap image and the bit pattern codebook generated by encoding are divided into blocks of the same size, and the sub-blocks are used as index units. The bitmap image is used to perform bit pattern indexing on the bit pattern codebook. The bit pattern indexing rule is shown in the following formula:

[0145]

[0146] in, arg represents the indexing operation, Bm k represents the kth image sub-block in the bitmap image, B t represents the t-th sub-block after the bit pattern codebook is divided into blocks, t=1, 2, ..., σ, σ represents the number of blocks of the bit pattern codebook, represents the index of the k-th bitmap image subblock in the bit pattern codebook, and the symbol δ{.,.} represents the Hamming distance between two binary subblocks;

[0147] (3) After performing bit pattern indexing on the bitmap image and the bit pattern codebook, the obtained results are histogrammed to obtain the BPF, as shown in the following formula:

[0148]

[0149] Wherein t represents the index of the t-th sub-block in the bit pattern codebook, t=1, 2, ..., σ, σ represents the number of blocks in the bit pattern codebook, and Pr{.} represents the histogram operation, thereby obtaining the BPF.

[0150] like Figure 6 As shown, the image fingerprint calculation process in the present invention is as follows:

[0151] (1) CHF max , CHF min Merge with BPF to get the merged vector V:

[0152] V = {CHF max ,CHF min ,BPF}

[0153] Assume CHF max represents a vector of size 1×η, then CHF min The size of is also 1×η, BPF represents a vector of size 1×μ, then V represents a merged vector of size 1×(η+η+μ);

[0154] (2) Binarize the merged vector V to obtain the image fingerprint K, as shown in the following formula:

[0155]

[0156] Wherein, K(i) represents the value of the i-th element in the image fingerprint, V(i) represents the i-th element in the vector V, m=mean(V), represents the average value of the vector V, and mean represents the averaging operation.

[0157] The following is a set of experiments designed to compare the existing perceptual hashing method pHash and the perceptual hashing method based on point diffusion block truncation coding of the present invention in the detection ability of malicious users to re-confirm the ownership of confirmed pictures in the ownership confirmation system. The present invention first confirms the ownership of 100 pictures in the picture ownership confirmation system, and then maliciously tampers with these 100 pictures (corner cropping, format conversion, etc.), obtains 100 maliciously tampered test pictures and re-confirms the ownership for experiments. The experimental results are shown in Table 1.

[0158] Table 1 Comparison of detection capabilities of two perceptual hashing methods

[0159]

[0160]

[0161] Analyzing the experimental results, it is found that the detection rate of the image-aware hashing method based on point diffusion block truncation coding of the present invention is significantly higher than that of the traditional pHash method, and it can effectively prevent malicious users from performing routine processing on others' authenticated pictures, resulting in the re-authentication of the original pictures after the original pictures have changed. It has a high use value in the image authentication system.

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

[0163] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. An image-aware hashing method, characterized in that: The image-aware hashing method comprises the following steps: Step 1: Resizing: Reduce the input image of size M×N to a small image of size 256×256; Step 2: Grayscale processing: grayscale the obtained small image; Step 3, DCT transformation: The grayscale image is compressed using the discrete cosine transform (DCT) algorithm. After obtaining the DCT coefficient matrix, the DCT is reduced, leaving only the DCT 92×92 matrix, thereby obtaining the low-frequency part of the image. Step 4, image decomposition: divide the 92×92 matrix after the reduced DCT into several 4×4 image sub-blocks, and then generate the maximum quantizer, minimum quantizer and bitmap image; Step 5, feature extraction: construct the color histogram feature CHF and the bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image; Step 6, fingerprint generation: merge CHF and BPF features and binarize them to obtain image fingerprint; In step 4, the 92×92 matrix after the DCT is reduced is divided into a plurality of 4×4 image sub-blocks, and a maximum quantizer, a minimum quantizer and a bitmap image are generated, including: (1) Divide the 92×92 matrix after the reduced DCT into non-overlapping image sub-blocks, assuming I k represents the kth image sub-block of size m×n, I k (i, j) represents the pixel value of the k-th image sub-block at the position (i, j); where, i=1,2,...,m, j=1,2,...,n, M=N=92, m=n=4; (2) After block division, the maximum and minimum quantizers can be obtained according to the following formula: in, represents the maximum quantizer of the k-th image sub-block, represents the pixel value at any (i, j) position in the kth image sub-block, represents the minimum quantizer of the k-th image sub-block; (3) Bitmap images are also operated on the basis of block division. After block division, a priority matrix O with the same size as the carrier image sub-block is defined. The priority matrix represents the processing order of each pixel in each image sub-block. The smaller the value of the element pair in the priority matrix, the higher the processing priority of the pixel at that position in the image sub-block. In step (3), for each image sub-block, each pixel of each image sub-block is processed according to the following steps in the processing order of the pixels in each image sub-block defined in the priority matrix: 1) For the pixel I at position (i, j) of the k-th image sub-block k (i,j), determine the neighborhood of the pixel, the neighborhood is as follows: 2) Calculate pixel I k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood is as follows: Among them, O(i,j) represents pixel I k The processing order of (i,j) in the priority matrix, O(i+p,j+q) represents pixel I k The processing order of pixels in the (i, j) neighborhood in the priority matrix, W(p, q) represents the weighted value in the diffusion matrix; 3) Calculate the pixel I of the kth image sub-block at position (i, j) k (i, j) pixel value V after point diffusion block truncation coding k (i,j), the formula is as follows: V k (i,j)=I k (i,j)+s(i,j); in, and Respectively represent the maximum pixel value and the minimum pixel value in the k-th image sub-block, represents the average value of the kth sub-block, and sum is the pixel I in the kth image sub-block obtained in step 2). k The sum of the diffusion weights of all unprocessed pixels in the (i, j) neighborhood, V k The initial value of is the original pixel value of the k-th image sub-block; in addition, if I k (i, j) is at the boundary of the image sub-block, then pixel I k The region of (i, j) does not include pixels beyond the image subblock boundary; 4) Get the pixel value V after point diffusion block truncation encoding k After (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula: Among them, Bm k (i, j) represents the bitmap image value of the k-th image sub-block at position (i, j), V k (i, j) represents the pixel value of the k-th image sub-block after being encoded at the position (i, j), Indicates V k The average value of .

2. The image-aware hashing method according to claim 1, wherein: In step 5, the color histogram feature CHF and the bit pattern feature BPF are constructed according to the generated maximum quantizer and minimum quantizer and the bitmap image, including: (1) CHF is an effective feature for describing the brightness and contrast of color images, and the distribution of quantizers can effectively describe the image content and its corresponding contrast; the CHF includes CHF max and CHF min Two features, CHF max Represents the feature composed of the minimum quantizer and codebook index and histogram statistics, CHF min Represents the features composed of the maximum quantizer and codebook index and histogram statistics; (2) BPF is used to represent the edges and visual texture patterns of images.

3. The image-aware hashing method according to claim 2, wherein: In step (1), the calculation steps are as follows: 1) Use LBG-VQ to generate codebook Among them C t represents the tth codeword in codebook C, Represents the number of codewords in the codebook C. According to the following formula, the index of the minimum distance between the codeword and the two quantizers is calculated respectively: in, represents the maximum quantizer of the k-th image sub-block and a codeword C in codebook C t The index of the closest distance, arg represents the indexing operation, Indicates the distance formula, C t represents the tth codeword in the codebook C, represents the minimum quantizer of the kth image subblock and a codeword C in codebook C t The index of the closest distance; 2) After being indexed by the maximum quantizer and the minimum quantizer and the codebook, CHF max and CHF min It can be calculated according to the following formula: in, represents the number of codewords in the codebook C, Pr{.} represents the histogram statistics operation, and CHF is obtained. max and CHF min Two characteristics.

4. The image-aware hashing method according to claim 2, wherein: In step (2), the BPF calculation steps are as follows: 1) Use Binary-LBG-VQ training to generate a bit pattern codebook consisting of binary codewords, denoted as B = {B1, B2, ... B β }; 2) The bitmap image and the bit pattern codebook generated by encoding are divided into blocks of the same size, and the sub-blocks are used as index units. The bitmap image is used to perform bit pattern indexing on the bit pattern codebook. The bit pattern indexing rule is shown in the following formula: in, arg represents the indexing operation, Bm k represents the kth image sub-block in the bitmap image, B t represents the t-th sub-block after the bit pattern codebook is divided into blocks, t = 1, 2, ..., σ; σ represents the number of blocks of the bit pattern codebook, represents the index of the k-th bitmap image subblock in the bit pattern codebook, and the symbol δ{.,.} represents the Hamming distance between two binary subblocks; 3) After performing bit pattern indexing on the bitmap image and the bit pattern codebook, the obtained results are histogrammed to obtain the BPF, as shown in the following formula: Wherein, t represents the index of the t-th sub-block in the bit pattern codebook, t=1, 2, ..., σ, σ represents the number of blocks in the bit pattern codebook, and Pr{.} represents the operation of obtaining the histogram, thereby obtaining the BPF.

5. The image-aware hashing method according to claim 1, wherein: In step 6, the CHF and BPF features are combined and binarized to obtain the image fingerprint, including: (1) CHF max , CHF min Merge with BPF to get the merged vector V: V={CHF max ,CHF min ,BPF}; Assume CHF max represents a vector of size 1×η, then CHF min The size of is also 1×η, BPF represents a vector of size 1×μ, then V represents a merged vector of size 1×(η+η+μ); (2) Binarize the merged vector V to obtain the image fingerprint K, as shown in the following formula: Among them, K(i) represents the value of the i-th element in the image fingerprint, V(i) represents the i-th element in the vector V, m=mean(V), represents the average value of the vector V, and mean represents the averaging operation.

6. An image-aware hashing system using the image-aware hashing method according to any one of claims 1 to 5, characterized in that: The image-aware hashing system comprises: The size scaling module is used to reduce the input image of size M×N to a small image of 256×256; A grayscale processing module is used to grayscale the obtained small image; The DCT transformation module is used to compress the grayscale image through the discrete cosine transform (DCT) algorithm, obtain the DCT coefficient matrix, and then reduce the DCT to retain only the DCT 92×92 matrix, thereby obtaining the low-frequency part of the image; An image decomposition module is used to divide the 92×92 matrix after the DCT reduction into a number of 4×4 image sub-blocks, and then generate a maximum quantizer, a minimum quantizer and a bitmap image; A feature extraction module, used for constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer and minimum quantizer and the bitmap image; The fingerprint generation module is used to merge the CHF and BPF features and binarize them to obtain the image fingerprint.

7. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the image-aware hashing system as described in claim 6.