CN113763225A - Image perception hashing method, system and equipment and information data processing terminal - Google Patents

Image perception hashing method, system and equipment and information data processing terminal Download PDF

Info

Publication number
CN113763225A
CN113763225A CN202110534856.7A CN202110534856A CN113763225A CN 113763225 A CN113763225 A CN 113763225A CN 202110534856 A CN202110534856 A CN 202110534856A CN 113763225 A CN113763225 A CN 113763225A
Authority
CN
China
Prior art keywords
image
block
chf
sub
quantizer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110534856.7A
Other languages
Chinese (zh)
Inventor
安玲玲
杨哲荣
于兆兴
王政辉
裴庆祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Xidian University
Original Assignee
Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology, Xidian University filed Critical Qingdao Institute Of Computing Technology Xi'an University Of Electronic Science And Technology
Priority to CN202110534856.7A priority Critical patent/CN113763225A/en
Publication of CN113763225A publication Critical patent/CN113763225A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention belongs to the technical field of image processing, and discloses an image perception hash method, a system, equipment and an information data processing terminal, wherein the image perception hash method comprises the following steps: reducing an image having a size of M × N to a small image of 256 × 256; carrying out graying treatment on the obtained small image; compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a DCT coefficient matrix and then reducing the DCT; dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 small blocks, and further generating a maximum quantizer, 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; and combining CHF and BPF characteristics, and binarizing to obtain the picture fingerprint. The invention effectively prevents malicious users from stealing pictures of other people for right confirmation by comparing the image fingerprints, and has important use value in image copyright protection application.

Description

Image perception hashing method, system and equipment and information data processing terminal
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image perceptual hashing method, system and device and an information data processing terminal.
Background
At present, with the rapid development of the mobile internet, the image has the advantages of large information amount, high transmission speed and the like, so that the image becomes an important source for people to acquire information. The amount of information that an image can represent is both much more numerous and more intuitive than text.
Therefore, people can hardly leave images in various aspects of learning, work, life and the like. However, the image has the characteristics of easy acquisition, high redundancy, low confidentiality, insensitivity to distortion, easy editing and the like.
The occurrence of the cryptographic hash, although avoiding the situation to some extent, has many disadvantages. In the cryptographic hash, a function (algorithm) is used to complete mapping of a keyword to a memory address, a target address is obtained by function calculation according to the keyword given by a user, and then the target is retrieved. The cryptographic hash requires that the original file not be allowed to change, even if any slight change, the generated hash value will change. Therefore, the password hashing only avoids copying of malicious users to a certain extent, and cannot avoid malicious tampering of the original image by the malicious users.
In view of the above problems, and considering that it is difficult for people to determine and maintain the rights of the copyright of the image, a method for effectively preventing malicious users from stealing pictures of others to determine the rights or performing conventional processing on the original image to determine the rights again after the original image is changed is urgently needed. The present invention has been developed in response to such real needs.
Through the above analysis, the problems and defects of the prior art are as follows: the existing password hash can only avoid the copying of malicious users to a certain extent, and cannot avoid the malicious tampering of the original image by the malicious users.
The difficulty in solving the above problems and defects is: how to guarantee that a malicious user can detect the infringement of the original image after the original image is changed due to a series of conventional processing (corner clipping and format conversion) on the original image.
The significance of solving the problems and the defects is as follows: the method can prevent malicious users from randomly copying and modifying copyrighted images under the condition of not being authorized by the original image owner to a certain extent, and has great practical value in image copyright protection.
Disclosure of Invention
The invention provides an image perceptual hashing method, a system, equipment and an information data processing terminal, and particularly relates to an image perceptual hashing method, a system, equipment and an information data processing terminal based on a point spread block truncation coding.
The invention is realized in such a way, and an image perception hashing method comprises the following steps:
step one, size scaling: reducing an input image of size M × N to a small image of 256 × 256; and reducing the calculation amount.
Step two, gray level processing: carrying out graying treatment on the obtained small image; the dimension of the image matrix is reduced after graying, the operation speed is greatly improved, and the gradient information is still kept.
Step three, DCT transformation: compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture; and acquiring the low-frequency part of the picture, namely the main characteristic information of the image.
Step four, image decomposition: dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 image sub-blocks, and further generating a maximum quantizer, a minimum quantizer and a bitmap image; the purpose of the blocking 4 × 4 is to facilitate the calculation of BPF.
Step five, feature extraction: constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer, the minimum quantizer and the bitmap image;
step six, fingerprint generation: and combining CHF and BPF characteristics, and binarizing to obtain the image fingerprint.
Further, in step four, the dividing the 92 × 92 matrix after the DCT is reduced into a plurality of 4 × 4 image sub-blocks to generate a maximum quantizer, a minimum quantizer and a bitmap image includes:
(1) dividing the 92 x 92 matrix after the DCT reduction into
Figure BDA0003069227540000031
Image sub-blocks not overlapping each other, let IkRepresenting the kth image sub-block of size m x n, Ik(i, j) represents the pixel value of the k-th image sub-block at the (i, j) position; wherein the content of the first and second substances,
Figure BDA0003069227540000032
i=1,2,...,m,j=1,2,...,n,M=N=92, m=n=4;
(2) after blocking, the maximum and minimum quantizers can be obtained according to the following formula:
Figure BDA0003069227540000033
Figure BDA0003069227540000034
wherein the content of the first and second substances,
Figure BDA0003069227540000035
represents the maximum quantizer of the k-th image sub-block,
Figure BDA0003069227540000036
representing the pixel value at an arbitrary (i, j) position within the k-th image sub-block,
Figure BDA0003069227540000037
a minimum quantizer representing a k-th image sub-block;
(3) the bitmap image is also operated on the basis of block division, after the block division, a priority matrix O with the same size as the carrier image sub-blocks is defined, the priority matrix represents the processing sequence of each pixel in each image sub-block, and the smaller the value of an element pair in the priority matrix, the higher the processing priority of the pixel at the position of the image sub-block.
Further, in step (3), for each image sub-block, sequentially according to the processing order of the pixels in each image sub-block defined in the priority matrix, processing each pixel of each image sub-block according to the following steps:
1) for the pixel I at the (I, j) position of the k-th image sub-blockk(i, j) determining a neighborhood of the pixel, the neighborhood being as follows:
Figure BDA0003069227540000041
2) calculating a pixel Ik(i, j) the sum of the diffusion weights sum over all unprocessed pixels in the neighborhood, sum, as follows:
Figure BDA0003069227540000042
wherein O (I, j) represents the pixel Ik(I, j) processing order in priority matrix, O (I + p, j + q) denotes pixel Ik(i, j) the order of processing of pixels on a neighborhood in the priority matrix, W (p, q) representing the weight values in the diffusion matrix;
3) calculating the pixel I of the k image sub-block at the (I, j) positionk(i, j) pixel value V after dot diffusion block truncation codingk(i, j), the formula is as follows:
Vk(i,j)=Ik(i,j)+s(i,j);
Figure BDA0003069227540000043
Figure BDA0003069227540000044
wherein the content of the first and second substances,
Figure BDA0003069227540000045
and
Figure BDA0003069227540000046
respectively representing the maximum pixel value and the minimum pixel value in the k-th image sub-block,
Figure BDA0003069227540000047
represents the average value of the k sub-block, sum is the pixel I in the k image sub-block obtained in step 2)k(i, j) sum of diffusion weights, V, over all unprocessed pixels in the neighborhoodkIs the original pixel value of the kth image sub-block; in addition, if Ik(I, j) is at the boundary of the image sub-block, pixel Ik(i, j) does not include pixels that exceed the boundaries of image sub-blocks;
4) obtaining the pixel value V after the truncation coding of the point diffusion blockkAfter (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula:
Figure BDA0003069227540000048
wherein, Bmk(i, j) denotes the bitmap image value, V, of the k-th image sub-block at the (i, j) positionk(i, j) represents the pixel value of the k-th image sub-block after being encoded at the (i, j) position,
Figure BDA0003069227540000051
represents VkAverage value of (a).
Further, in step five, 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:
(1) CHF is an effective feature to describe the brightness and contrast of a color image, while the distribution of quantizers can effectively describe the image content and its corresponding contrast; the CHF includesCHFmaxAnd CHFminTwo features, CHFmaxCHF, representing features consisting of minimum quantizer and codebook index and histogram statisticsminRepresenting features consisting of a maximum quantizer and codebook indices and performing histogram statistics;
(2) BPF is used to represent the edges and visual texture patterns of an image.
Further, in the step (1), the calculating step is as follows:
1) generating codebook C ═ C using LBG-VQ1,...,Ct,...,Cθ}; wherein C istThe method includes the steps of representing the t-th code word in a codebook C, wherein t is 1, 2.
Figure BDA0003069227540000052
Figure BDA0003069227540000053
Wherein the content of the first and second substances,
Figure BDA0003069227540000054
maximum quantizer representing the k-th image sub-block
Figure BDA0003069227540000055
And a certain code word C in the codebook CtThe index of the closest distance, arg denotes the index-finding operation,
Figure BDA0003069227540000056
expression of the formula of finding the distance, CtRepresents the t-th codeword in codebook C,
Figure BDA0003069227540000057
minimum quantizer representing k-th image sub-block
Figure BDA0003069227540000058
And a certain code word C in the codebook CtAn index of the closest distance;
2) CHF after indexing through max-quantizer and min-quantizer with codebooksmaxAnd CHFminThis can be found according to the following equation:
Figure BDA0003069227540000059
Figure BDA0003069227540000061
wherein, t is 1,2, the term, θ, θ represents the number of codewords in the codebook C, and Pr represents performing histogram statistics, so as to obtain CHFmaxAnd CHFminTwo features.
Further, in the step (2), the BPF calculation step is as follows:
1) generating a bit pattern codebook composed of Binary code words by using Binary-LBG-VQ training, and recording as B ═ B1,B2,...Bβ};
2) Dividing a bitmap image and a bit pattern codebook generated after coding into blocks with the same size, and using the bitmap image to carry out bit pattern indexing on the bit pattern codebook by taking a sub-block as an index unit, wherein the bit pattern indexing rule is shown as the following formula:
Figure BDA0003069227540000062
wherein the content of the first and second substances,
Figure BDA0003069227540000063
arg denotes an index-seeking operation, BmkRepresenting the kth image sub-block, B, in a bitmap imagetDenotes the t-th sub-block after partitioning the bit-mode codebook, t ═ 1, 2.., σ; sigma denotes the number of blocks of the bit-pattern codebook block,
Figure BDA0003069227540000064
representing the index of the kth bitmap image sub-block on the bit-pattern codebook, the symbol δ {, } representing the hamming distance between two binary sub-blocks;
3) after bit pattern indexing is performed on the bitmap image and the bit pattern codebook, the obtained result is subjected to histogram statistics to obtain the BPF, and the formula is as follows:
Figure BDA0003069227540000065
wherein t represents an index of the t-th sub-block in the bit pattern codebook, t is 1,2, σ, σ represents the block number of the bit pattern codebook block, and Pr represents the operation of solving the histogram, so as to obtain the BPF.
Further, in the sixth step, the merging CHF and BPF features and binarizing to obtain an image fingerprint includes:
(1) reducing CHFmax、CHFminAnd BPF are merged to obtain a merged vector V:
V={CHFmax,CHFmin,BPF};
suppose CHFmaxRepresenting a vector of size 1 × η, CHFminIs also 1 × η, BPF represents a vector of size 1 × μ, and V represents a merged vector of size 1 × (η + η + μ);
(2) and carrying out binarization on the merged vector V to obtain an image fingerprint K, wherein the formula is as follows:
Figure BDA0003069227540000071
where k (i) denotes the value of the ith element in the image fingerprint, V (i) denotes the ith element in the vector V, m ═ mean (V) denotes the average of the vector V, and mean denotes the averaging operation.
Another object of the present invention is to provide an image-aware hashing system applying the image-aware hashing method, the image-aware hashing system comprising:
a size scaling module for reducing an input image of size M × N into a small image of 256 × 256;
the gray processing module is used for carrying out gray processing on the obtained small images;
the DCT conversion module is used for compressing the grayed picture through a DCT algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 x 92 of the DCT so as to obtain a low-frequency part in the picture;
the image decomposition module is used for dividing the 92 x 92 matrix subjected to DCT reduction into a plurality of 4 x 4 image sub-blocks so as to generate a maximum quantizer, a minimum quantizer and a bitmap image;
the feature extraction module is used for constructing color histogram features CHF and bit pattern features BPF according to the generated maximum quantizer, minimum quantizer and bitmap images;
and the fingerprint generation module is used for combining CHF and BPF characteristics and carrying out binarization to obtain an image fingerprint.
It is a further object of the invention to provide a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
reducing an input image of size M × N to a small image of 256 × 256; carrying out graying treatment on the obtained small image; compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture; dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 image sub-blocks, and further generating a maximum quantizer, 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, the minimum quantizer and the bitmap image; and combining CHF and BPF characteristics, and binarizing to obtain the image fingerprint.
Another object of the present invention is to provide an information data processing terminal, which is used for implementing the image-aware hashing system.
By combining all the technical schemes, the invention has the advantages and positive effects that: the image perception hashing method provided by the invention can effectively prevent malicious users from stealing other pictures to confirm the right by comparing the image fingerprints, or confirm the right again after the original picture is changed due to conventional processing (border cutting, format conversion and the like) of the original picture, and has important use value in image copyright protection application.
The experimental result shows that the detection rate of the image perception hash method is obviously higher than that of the traditional pHash method, the malicious user can be effectively prevented from carrying out conventional processing on the picture which is authorized by others, the original picture is authorized again after being changed, and the image perception hash method has high use value in an image authorization system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an image-aware hashing method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of an image-aware hashing method according to an embodiment of the present invention.
FIG. 3 is a block diagram of an image-aware hashing system according to an embodiment of the present invention;
in the figure: 1. a size scaling module; 2. a gray scale processing module; 3. a DCT transform module; 4. an image decomposition module; 5. a feature extraction module; 6. and a fingerprint generation module.
Fig. 4 is a flowchart of calculating a color histogram feature CHF according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating the calculation of the bit pattern feature BPF according to an embodiment of the present invention.
Fig. 6 is a flowchart of the final picture fingerprint calculation provided by the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides an image-aware hashing method, system, device and information data processing terminal, which are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, an image-aware hashing method provided in an embodiment of the present invention includes the following steps:
s101, size scaling: reducing an input image of size M × N to a small image of 256 × 256;
s102, gray level processing: carrying out graying treatment on the obtained small image;
s103, DCT transformation: compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only reserving a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture;
s104, image decomposition: dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 image sub-blocks, and further generating a maximum quantizer, a minimum quantizer and a bitmap image;
s105, feature extraction: constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer, the minimum quantizer and the bitmap image;
s106, fingerprint generation: and combining CHF and BPF characteristics, and binarizing to obtain the image fingerprint.
A schematic diagram of an image perceptual hashing method provided by the embodiment of the present invention is shown in fig. 2.
As shown in fig. 3, an image-aware hashing system provided by an embodiment of the present invention includes:
a size scaling module 1 for reducing an input image of size M × N into a small image of size 256 × 256;
the gray processing module 2 is used for carrying out gray processing on the obtained small images;
the DCT conversion module 3 is used for compressing the grayed picture through a DCT algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of the DCT92 multiplied by 92 so as to obtain a low-frequency part in the picture;
the image decomposition module 4 is used for dividing the 92 × 92 matrix subjected to DCT reduction into a plurality of 4 × 4 image sub-blocks so as to generate a maximum quantizer, a minimum quantizer and a bitmap image;
a feature extraction module 5, configured 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;
and the fingerprint generating module 6 is used for combining CHF and BPF characteristics and carrying out binarization to obtain an image fingerprint.
The technical solution of the present invention will be further described with reference to the following examples.
As shown in fig. 1-2, the image perceptual hashing method based on the dot diffusion block truncation coding provided by the present invention includes the following steps:
step 1: the size is reduced. Reducing an image of size M × N to a small image of 256 height and 256 width, if necessary;
step 2: and (5) graying the image. Graying the small image obtained in the step 1;
and step 3: and (5) DCT transformation. Compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture;
and 4, step 4: and (5) decomposing the image. Dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 small blocks, and further generating a maximum quantizer, a minimum quantizer and a bitmap image;
and 5: extracting characteristics; 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;
step 6: generating an image fingerprint; and combining CHF and BPF characteristics, and binarizing to obtain the picture fingerprint.
When the image reduction step is implemented specifically, the image with the width of M and the height of N can be uniformly divided into 256 × 256 blocks, the width direction and the height direction are both divided into 256 parts, and the average value of each color component in each block is taken, so that a small image with the width of 256 and the height of 256 can be obtained.
In the case of performing the image graying process, when the red, green, and blue components of one pixel in the color image are represented as R, G, B, the grayscale value Y of the pixel is R × 0.299+ G × 0.587+ B × 0.114.
In specific implementation, the image decomposition steps are as follows:
(1) dividing the 92 x 92 matrix after the DCT reduction into
Figure BDA0003069227540000101
Image sub-blocks not overlapping each other, let IkRepresenting the kth image sub-block of size m x n, Ik(i, j) represents the pixel value of the k-th image sub-block at the (i, j) position, wherein,
Figure BDA0003069227540000111
i=1,2,...,m,j=1,2,...,n,M=N=92, m=n=4;
(2) after blocking, the maximum and minimum quantizers can be obtained according to the following formula:
Figure BDA0003069227540000112
Figure BDA0003069227540000113
wherein the content of the first and second substances,
Figure BDA0003069227540000114
represents the maximum quantizer of the k-th image sub-block,
Figure BDA0003069227540000115
representing the pixel value at an arbitrary (i, j) position within the k-th image sub-block,
Figure BDA0003069227540000116
a minimum quantizer representing a k-th image sub-block;
(3) the bitmap image is also operated on the basis of block division, after the block division, a priority matrix O with the same size as the carrier image sub-blocks is defined, the priority matrix represents the processing sequence of each pixel in each image sub-block, and the smaller the value of an element pair in the priority matrix, the higher the processing priority of the pixel of the image sub-block at the position;
for each image sub-block, sequentially processing each pixel of each image sub-block according to the processing sequence of the pixels in each image sub-block defined in the priority matrix according to the following steps:
1) for the pixel I at the (I, j) position of the k-th image sub-blockk(i, j) determining a neighborhood of the pixel, the neighborhood being as follows:
Figure BDA0003069227540000117
2) calculating a pixel Ik(i, j) the sum of the diffusion weights sum over all unprocessed pixels in the neighborhood, sum, as follows:
Figure BDA0003069227540000118
wherein O (I, j) represents the pixel Ik(I, j) processing order in priority matrix, O (I + p, j + q) denotes pixel Ik(i, j) the order of processing of pixels on a neighborhood in the priority matrix, W (p, q) representing the weight values in the diffusion matrix;
3) calculating the pixel I of the k image sub-block at the (I, j) positionk(i, j) pixel value V after dot diffusion block truncation codingk(i, j), the formula is as follows:
Vk(i,j)=Ik(i,j)+s(i,j)
Figure BDA0003069227540000121
Figure BDA0003069227540000122
wherein the content of the first and second substances,
Figure BDA0003069227540000123
and
Figure BDA0003069227540000124
respectively representing the maximum pixel value and the minimum pixel value in the k-th image sub-block,
Figure BDA0003069227540000125
represents the average value of the k sub-block, sum is the pixel I in the k image sub-block obtained in step 2)k(i, j) sum of diffusion weights, V, over all unprocessed pixels in the neighborhoodkIs the original pixel value of the kth image sub-block. In addition, if Ik(I, j) is at the boundary of the image sub-block, pixel IkThe field of (i, j) does not include pixels beyond the boundaries of the image sub-blocks.
4) Obtaining the pixel value V after the truncation coding of the point diffusion blockkAfter (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula:
Figure BDA0003069227540000126
wherein, Bmk(i, j) denotes the bitmap image value, V, of the k-th image sub-block at the (i, j) positionk(i, j) represents the pixel value of the k-th image sub-block after being encoded at the (i, j) position,
Figure BDA0003069227540000127
represents VkAverage value of (a).
As shown in fig. 4, the steps of constructing the color histogram feature CHF in the feature extraction of the present invention are as follows:
(1) generating codebook C ═ C using LBG-VQ1,...,Ct,...,CθIn which C istThe method includes the steps of representing the t-th code word in a codebook C, wherein t is 1, 2.
Figure BDA0003069227540000128
Figure BDA0003069227540000129
Wherein the content of the first and second substances,
Figure BDA0003069227540000131
maximum quantizer representing the k-th image sub-block
Figure BDA0003069227540000132
And a certain code word C in the codebook CtThe index of the closest distance, arg denotes the index-finding operation,
Figure BDA0003069227540000133
expression of the formula of finding the distance, CtRepresents the t-th codeword in codebook C,
Figure BDA0003069227540000134
minimum quantizer representing k-th image sub-block
Figure BDA0003069227540000135
And a certain code word C in the codebook CtAn index of the closest distance;
(2) CHF after indexing through max-quantizer and min-quantizer with codebooksmaxAnd CHFminThis can be found according to the following equation:
Figure BDA0003069227540000136
Figure BDA0003069227540000137
wherein t is 1,2, the term, θ, θ represents the number of codewords in the codebook C, and Pr represents performing histogram statistics, so as to obtain CHFmaxAnd CHFminTwo features.
As shown in fig. 5, the steps of constructing the bit pattern feature BPF in the feature extraction of the present invention are as follows:
(1) firstly, Binary-LBG-VQ training is used to generate a bit pattern codebook consisting of Binary code words, and the bit pattern codebook is marked as B ═ B1,B2,...Bβ}. During the generation of the bit pattern codebook, all code vectors are marked as a value within the range of 0 and 1 in each training process, the training vectors are initialized at the corners of the hypercube space firstly, then the code vectors are updated and calculated by moving to the inside of the hypercube during the training process, after the training is finished, all the code vectors are subjected to binarization processing to obtain the final result, and the process can adjust the value which is greater than the threshold value of 0.5 to 1 and adjust the value which is less than or equal to 0.5 to 0;
(2) then dividing the bitmap image and the bit pattern codebook generated after coding into blocks with the same size, and using the bitmap image to carry out bit pattern indexing on the bit pattern codebook by taking the sub-block as an index unit, wherein the bit pattern indexing rule is shown as the following formula:
Figure BDA0003069227540000138
wherein the content of the first and second substances,
Figure BDA0003069227540000139
arg denotes an index-seeking operation, BmkRepresenting the kth image sub-block, B, in a bitmap imagetDenotes the t-th sub-block after the bit-mode codebook block, t 1,2, σ, σ denotes the number of blocks of the bit-mode codebook block,
Figure BDA0003069227540000141
representing the index of the kth bitmap image sub-block on the bit-pattern codebook, the symbol δ {, } representing the hamming distance between two binary sub-blocks;
(3) after bit pattern indexing is performed on the bitmap image and the bit pattern codebook, the obtained result is subjected to histogram statistics to obtain the BPF, and the formula is as follows:
Figure BDA0003069227540000142
wherein t represents the index of the t-th sub-block in the bit pattern codebook, t is 1,2, σ, σ represents the block number of the bit pattern codebook block, and Pr represents the operation of solving the histogram, so as to obtain the BPF.
As shown in fig. 6, the image fingerprint calculation process in the present invention is as follows:
(1) reducing CHFmax、CHFminAnd BPF are merged to obtain a merged vector V:
V={CHFmax,CHFmin,BPF}
suppose CHFmaxRepresenting a vector of size 1 × η, CHFminIs also 1 × η, BPF represents a vector of size 1 × μ, and V represents a merged vector of size 1 × (η + η + μ);
(2) and carrying out binarization on the merged vector V to obtain an image fingerprint K, wherein the formula is as follows:
Figure BDA0003069227540000143
where k (i) denotes the value of the ith element in the image fingerprint, V (i) denotes the ith element in the vector V, m ═ mean (V) denotes the average of the vector V, and mean denotes the averaging operation.
The following design is a set of experiments, and the detection capability of the existing perceptual hash method pHash and the perceptual hash method based on the point spread block truncation coding of the invention for re-right determination after malicious tampering of a malicious user on a right-determined picture in a right determination system is compared. The method firstly authorizes 100 pictures in a picture authorization system, then performs malicious tampering (corner cutting, format conversion and the like) on the 100 pictures, obtains 100 test pictures with malicious tampering, and authorizes the test pictures again for experiment. The results of the experiment are shown in table 1.
Table 1 comparison of detection capabilities of two perceptual hash methods
Figure BDA0003069227540000144
Figure BDA0003069227540000151
According to the image perception Hash method based on the point diffusion block truncation coding, the detection rate is obviously higher than that of the traditional pHash method, the malicious user can be effectively prevented from performing conventional processing on pictures with the right confirmed by others to ensure that the original picture is confirmed again after being changed, and the image perception Hash method based on the point diffusion block truncation coding has a high use value in an image right confirming system.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, can be implemented in a computer program product that includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, 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, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An image-aware hashing method, characterized in that the image-aware hashing method comprises the steps of:
step one, size scaling: reducing an input image of size M × N to a small image of 256 × 256;
step two, gray level processing: carrying out graying treatment on the obtained small image;
step three, DCT transformation: compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture;
step four, image decomposition: dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 image sub-blocks, and further generating a maximum quantizer, a minimum quantizer and a bitmap image;
step five, feature extraction: constructing a color histogram feature CHF and a bit pattern feature BPF according to the generated maximum quantizer, the minimum quantizer and the bitmap image;
step six, fingerprint generation: and combining CHF and BPF characteristics, and binarizing to obtain the image fingerprint.
2. The image perceptual hashing method of claim 1, wherein in step four, said dividing the reduced DCT92 x 92 matrix into a number of 4 x 4 image sub-blocks to generate a maximum quantizer and a minimum quantizer and a bitmap image comprises:
(1) dividing the 92 x 92 matrix after the DCT reduction into
Figure FDA0003069227530000011
Image sub-blocks not overlapping each other, let IkRepresenting the kth image sub-block of size m x n, Ik(i, j) represents the pixel value of the k-th image sub-block at the (i, j) position; wherein the content of the first and second substances,
Figure FDA0003069227530000012
Figure FDA0003069227530000013
(2) after blocking, the maximum and minimum quantizers can be obtained according to the following formula:
Figure FDA0003069227530000014
Figure FDA0003069227530000017
wherein the content of the first and second substances,
Figure FDA0003069227530000015
represents the maximum quantizer of the k-th image sub-block,
Figure FDA0003069227530000016
representing the pixel value at an arbitrary (i, j) position within the k-th image sub-block,
Figure FDA0003069227530000021
a minimum quantizer representing a k-th image sub-block;
(3) the bitmap image is also operated on the basis of block division, after the block division, a priority matrix O with the same size as the carrier image sub-blocks is defined, the priority matrix represents the processing sequence of each pixel in each image sub-block, and the smaller the value of an element pair in the priority matrix, the higher the processing priority of the pixel at the position of the image sub-block.
3. The image-aware hashing method according to claim 2, wherein in the step (3), for each image sub-block, sequentially according to the processing order of the pixels in each image sub-block defined in the priority matrix, each pixel of each image sub-block is processed according to the following steps:
1) for the pixel I at the (I, j) position of the k-th image sub-blockk(i, j) determining a neighborhood of the pixel, the neighborhood being as follows:
Figure RE-FDA0003293754260000022
2) calculating a pixel Ik(i, j) the sum of the diffusion weights sum over all unprocessed pixels in the neighborhood, sum, as follows:
Figure RE-FDA0003293754260000023
wherein O (I, j) represents the pixel Ik(I, j) processing order in priority matrix, O (I + p, j + q) denotes pixel Ik(i, j) the order of processing of pixels on a neighborhood in the priority matrix, W (p, q) representing the weight values in the diffusion matrix;
3) calculating the pixel I of the k image sub-block at the (I, j) positionk(i, j) pixel value V after dot diffusion block truncation codingk(i, j), the formula is as follows:
Vk(i,j)=Ik(i,j)+s(i,j);
Figure RE-FDA0003293754260000024
Figure RE-FDA0003293754260000031
wherein the content of the first and second substances,
Figure RE-FDA0003293754260000032
and
Figure RE-FDA0003293754260000033
respectively representing the maximum pixel value and the minimum pixel value in the k-th image sub-block,
Figure RE-FDA0003293754260000034
represents the average value of the k sub-block, sum is the pixel I in the k image sub-block obtained in step 2)k(i, j) sum of diffusion weights, V, over all unprocessed pixels in the neighborhoodkIs the original pixel value of the kth image sub-block; in addition, if Ik(I, j) is at the boundary of the image sub-block, pixel Ik(i, j) does not include pixels that exceed the boundaries of image sub-blocks;
4) obtaining the pixel value V after the truncation coding of the point diffusion blockkAfter (i, j), the bitmap image Bm of the k-th image sub-block can be obtained by the following formula:
Figure RE-FDA0003293754260000035
wherein, Bmk(i, j) denotes the bitmap image value, V, of the k-th image sub-block at the (i, j) positionk(i, j) represents the pixel value of the k-th image sub-block after being encoded at the (i, j) position,
Figure RE-FDA0003293754260000036
represents VkAverage value of (a).
4. The image perceptual hashing method according to claim 1, wherein in step five, said constructing color histogram features CHF and bit pattern features BPF from the generated maximum quantizer and minimum quantizer and bitmap images comprises:
(1) CHF is an effective feature to describe the brightness and contrast of a color image, while the distribution of quantizers can effectively describe the image content and its corresponding contrast; the CHF includes CHFmaxAnd CHFminTwo features, CHFmaxCHF, representing features consisting of minimum quantizer and codebook index and histogram statisticsminRepresenting features consisting of a maximum quantizer and codebook indices and performing histogram statistics;
(2) BPF is used to represent the edges and visual texture patterns of an image.
5. The image-aware hashing method according to claim 4, wherein in the step (1), said calculating step is as follows:
1) generating codebook C ═ C using LBG-VQ1,...,Ct,...,Cθ}; wherein C istThe method includes the steps of representing the t-th code word in a codebook C, wherein t is 1, 2.
Figure FDA0003069227530000041
Figure FDA0003069227530000042
Wherein the content of the first and second substances,
Figure FDA0003069227530000043
maximum quantizer representing the k-th image sub-block
Figure FDA0003069227530000044
And a certain code word C in the codebook CtThe index of the closest distance, arg denotes the index-finding operation,
Figure FDA0003069227530000045
expression of the formula of finding the distance, CtRepresents the t-th codeword in codebook C,
Figure FDA0003069227530000046
minimum quantizer representing k-th image sub-block
Figure FDA0003069227530000047
And a certain code word C in the codebook CtAn index of the closest distance;
2) CHF after indexing through max-quantizer and min-quantizer with codebooksmaxAnd CHFminThis can be found according to the following equation:
Figure FDA0003069227530000048
Figure FDA0003069227530000049
wherein, t is 1,2, the term, θ, θ represents the number of codewords in the codebook C, and Pr represents performing histogram statistics, so as to obtain CHFmaxAnd CHFminTwo features.
6. The image-aware hashing method according to claim 4, wherein in the step (2), said BPF calculating step is as follows:
1) generating a bit pattern codebook composed of Binary code words by using Binary-LBG-VQ training, and recording as B ═ B1,B2,...Bβ};
2) Dividing a bitmap image and a bit pattern codebook generated after coding into blocks with the same size, and using the bitmap image to carry out bit pattern indexing on the bit pattern codebook by taking a sub-block as an index unit, wherein the bit pattern indexing rule is shown as the following formula:
Figure FDA00030692275300000410
wherein the content of the first and second substances,
Figure FDA0003069227530000051
arg denotes an index-seeking operation, BmkRepresenting the kth image sub-block, B, in a bitmap imagetDenotes the t-th sub-block after partitioning the bit-mode codebook, t ═ 1, 2.., σ; sigma denotes the number of blocks of the bit-pattern codebook block,
Figure FDA0003069227530000052
representing the index of the kth bitmap image sub-block on the bit-pattern codebook, the symbol δ {, } representing the hamming distance between two binary sub-blocks;
3) after bit pattern indexing is performed on the bitmap image and the bit pattern codebook, the obtained result is subjected to histogram statistics to obtain the BPF, and the formula is as follows:
Figure FDA0003069227530000053
wherein t represents an index of the t-th sub-block in the bit pattern codebook, t is 1,2, σ, σ represents the block number of the bit pattern codebook block, and Pr represents the operation of solving the histogram, so as to obtain the BPF.
7. The image-aware hashing method according to claim 1, wherein in step six, said combining CHF and BPF features and binarizing to obtain an image fingerprint comprises:
(1) reducing CHFmax、CHFminAnd BPF are merged to obtain a merged vector V:
V={CHFmax,CHFmin,BPF};
suppose CHFmaxRepresenting a vector of size 1 × η, CHFminIs also 1 × η, BPF represents a vector of size 1 × μ, and V represents a merged vector of size 1 × (η + η + μ);
(2) and carrying out binarization on the merged vector V to obtain an image fingerprint K, wherein the formula is as follows:
Figure FDA0003069227530000054
where k (i) denotes the value of the ith element in the image fingerprint, V (i) denotes the ith element in the vector V, m ═ mean (V) denotes the average of the vector V, and mean denotes the averaging operation.
8. An image-aware hashing system applying the image-aware hashing method according to any one of claims 1 to 7, wherein the image-aware hashing system comprises:
a size scaling module for reducing an input image of size M × N into a small image of 256 × 256;
the gray processing module is used for carrying out gray processing on the obtained small images;
the DCT conversion module is used for compressing the grayed picture through a DCT algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 x 92 of the DCT so as to obtain a low-frequency part in the picture;
the image decomposition module is used for dividing the 92 x 92 matrix subjected to DCT reduction into a plurality of 4 x 4 image sub-blocks so as to generate a maximum quantizer, a minimum quantizer and a bitmap image;
the feature extraction module is used for constructing color histogram features CHF and bit pattern features BPF according to the generated maximum quantizer, minimum quantizer and bitmap images;
and the fingerprint generation module is used for combining CHF and BPF characteristics and carrying out binarization to obtain an image fingerprint.
9. A computer device, characterized in that the computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of:
reducing an input image of size M × N to a small image of 256 × 256; carrying out graying treatment on the obtained small image; compressing the grayed picture by a Discrete Cosine Transform (DCT) algorithm to obtain a coefficient matrix of the DCT, then reducing the DCT, and only keeping a matrix of 92 multiplied by 92 of the DCT, thereby obtaining a low-frequency part in the picture; dividing the 92 x 92 matrix after DCT reduction into a plurality of 4 x 4 image sub-blocks, and further generating a maximum quantizer, 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, the minimum quantizer and the bitmap image; and combining CHF and BPF characteristics, and binarizing to obtain the image fingerprint.
10. An information data processing terminal, characterized in that the information data processing terminal is configured to implement the image-aware hashing system according to claim 8.
CN202110534856.7A 2021-05-17 2021-05-17 Image perception hashing method, system and equipment and information data processing terminal Pending CN113763225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110534856.7A CN113763225A (en) 2021-05-17 2021-05-17 Image perception hashing method, system and equipment and information data processing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110534856.7A CN113763225A (en) 2021-05-17 2021-05-17 Image perception hashing method, system and equipment and information data processing terminal

Publications (1)

Publication Number Publication Date
CN113763225A true CN113763225A (en) 2021-12-07

Family

ID=78787061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110534856.7A Pending CN113763225A (en) 2021-05-17 2021-05-17 Image perception hashing method, system and equipment and information data processing terminal

Country Status (1)

Country Link
CN (1) CN113763225A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401092A (en) * 2021-12-17 2022-04-26 浙江工商大学 Image file sharing platform infringement protection method based on block chain and IPFS

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166955A (en) * 2014-05-29 2014-11-26 西安理工大学 Conformal transformation-based image Hash generation method and image tampering detection and positioning method
CN111353552A (en) * 2020-03-13 2020-06-30 杭州趣维科技有限公司 Image similarity contrast method based on perceptual hash algorithm

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166955A (en) * 2014-05-29 2014-11-26 西安理工大学 Conformal transformation-based image Hash generation method and image tampering detection and positioning method
CN111353552A (en) * 2020-03-13 2020-06-30 杭州趣维科技有限公司 Image similarity contrast method based on perceptual hash algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘帆: "基 于差分的图像感知哈希算法", 《计算机工程与设计》, vol. 42, no. 3, 31 March 2021 (2021-03-31) *
张维克: "安全鲁棒的图像感知哈希技术", 《东南大学学报(自然科学版)》, vol. 37, 30 September 2007 (2007-09-30) *
王阿川: "基于离散余弦变换的 鲁棒感知图像哈希技术", 《中国安全科学学报》, vol. 19, no. 4, 30 April 2009 (2009-04-30), pages 2 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401092A (en) * 2021-12-17 2022-04-26 浙江工商大学 Image file sharing platform infringement protection method based on block chain and IPFS

Similar Documents

Publication Publication Date Title
Atta et al. A high payload steganography mechanism based on wavelet packet transformation and neutrosophic set
Swaminathan et al. Robust and secure image hashing
Liu et al. A blind color image watermarking scheme with variable steps based on Schur decomposition
Su Novel blind colour image watermarking technique using Hessenberg decomposition
Daraee et al. Watermarking in binary document images using fractal codes
CN112561766B (en) Image steganography and extraction method and device and electronic equipment
Liu et al. Robust blind image watermarking based on chaotic mixtures
CN110430337B (en) Image disguising and image restoring method, apparatus and storage medium
JP3942759B2 (en) Digital watermark embedding method, decoding method and apparatus
Islam et al. Neural network based robust image watermarking technique in LWT domain
Zhang et al. Application research of digital media image processing technology based on wavelet transform
CN104778689B (en) A kind of image hashing method based on average secondary image and locality preserving projections
Hadmi et al. A robust and secure perceptual hashing system based on a quantization step analysis
Rabie et al. Visual fidelity without sacrificing capacity: an adaptive laplacian pyramid approach to information hiding
US20050257099A1 (en) Information embedding method
Sun et al. Deep perceptual hash based on hash center for image copyright protection
US20100228809A1 (en) Randomized Signal Transforms and Their Applications
CN113763225A (en) Image perception hashing method, system and equipment and information data processing terminal
CN116757903A (en) Watermark embedding and extracting method and watermark processing device
RU2331085C2 (en) Two-component integration of messages into image
Fadoua et al. Medical video watermarking scheme for telemedicine applications
Chadha et al. Image steganography using Karhunen-Loève transform and least bit substitution
Li et al. Progressive histogram modification for JPEG reversible data hiding
Lei et al. Diffusetrace: A transparent and flexible watermarking scheme for latent diffusion model
Liu et al. A Larger Capacity Data Hiding Scheme Based on DNN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination