Image-aware hashing method based on discrete wavelet transform
Through the image-aware hashing method based on discrete wavelet transformation, the problem that the prior art is difficult to resist rotational operations and content retention digital attacks is solved, the robustness, discrimination ability and security of the image are achieved, and the operation and storage efficiency are improved.
Patent Information
- Application Number
- CN202110700038.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-23
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-06-23
AI Technical Summary
现有技术在图像认证和搜索中难以有效抵御旋转操作和其他内容保留数字攻击,同时鲁棒性与判别能力之间存在冲突。
An image hashing method based on discrete wavelet transformation is used to generate an image hashing sequence through preprocessing, feature extraction and quantization encryption steps. The method includes image correction, edge detection, Hough transform, discrete wavelet transform, singular value decomposition and chaotic sequence encryption.
It realizes effective resistance to rotation attacks, maintains the robustness and discriminative ability of the image, ensures the security of image hash values, and improves operational efficiency and storage efficiency.
Smart Images

Figure CN113989526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing and image encryption, and in particular to an image-aware hashing method based on discrete wavelet transform. Background Art
[0002] With the development of the Internet of Things and multimedia technology, multimedia information has been rapidly developed and widely disseminated and browsed through digital devices. While multimedia products bring us convenient life, there are security and authentication issues in digital images. For example, a database can store multiple copies of an image. Although different versions of the copies can be processed and presented, they are still the same visual content as the original image. In particular, since multimedia tools make digital operations such as brightness adjustment, JPEG compression, Gaussian noise addition, image rotation and scaling much easier than ever before, people can easily create tampered images. Therefore, image authentication is challenging. Moreover, how to effectively search for all similar versions of an image (including the original image and its copies) from large-scale multimedia data is also a realistic and challenging problem.
[0003] Perceptual image hashing is an emerging multimedia content protection technology that has attracted much attention for its fast speed and high storage efficiency. It is widely used in image retrieval, image authentication, digital watermarking, tampering detection, image indexing and other fields. The definition of perceptual image hashing is that two images are different if and only if the image content is different. It not only allows us to quickly find image copies in large databases, but also ensures the security of digital images. Traditional hashing technology maps input information (documents, texts, videos, graphics, images, etc.) to a fixed-size string. However, cryptographic hash functions are sensitive to bit-level changes and are not suitable for image hashing. Perceptual image hashing is different from hash functions in cryptography. A good perceptual hashing algorithm should have the following characteristics:
[0004] 1) Robustness. The proposed scheme should be robust to digital operations such as image rotation, brightness changes, and noise interference. That is, for visually similar images, their image hash distance should be as small as possible and less than an explicit threshold T.
[0005] 2) Distinguishability. The scheme should be able to distinguish different images greatly, that is, the hash distance between images with different contents should be large.
[0006] 3) Security. The designed scheme should ensure the security of the image hash value. In other words, the image hash generated by the wrong key is very different from the correct image hash.
[0007] In terms of underlying technology, existing hash algorithms can be divided into four categories according to their feature extraction methods. The inventors found that the existing technology has at least the following disadvantages:
[0008] The first method is based on invariant feature transformation, such as discrete wavelet transform, discrete cosine transform (DCT), discrete Fourier transform (DFT). The advantage of these methods is that they are robust to distortion attacks. However, these solutions cannot resist rotation operations, especially large-angle rotations.
[0009] The second approach uses image statistics as features, such as mean, variance, skewness, histogram, and high-order moments. These schemes are robust to content preservation attacks, but their discriminability is poor because the uniqueness and uniqueness of each image is reduced.
[0010] The third method is based on dimensionality reduction to extract features. It has better recognition performance for collective attacks, but the extracted features are lossy.
[0011] The fourth category of perceptual image hashing methods uses local features to represent the content of each image. They are able to locate tampered areas, but are sensitive to classic attacks such as adding noise and image compression. In addition, the computational cost of local feature extraction is also higher than other methods.
[0012] Therefore, existing solutions either have poor robustness and cannot resist content preservation digital attacks, and cannot correctly identify the same image after multiple content preservation operations, or have poor distinguishability and poor distinction between different images. There is a conflict between the robustness and discrimination ability of perceptual hashing algorithms. Summary of the invention
[0013] The object of the present invention is to provide an image-aware hashing method based on discrete wavelet transform, comprising the following steps:
[0014] 1) Obtain the image to be processed.
[0015] 2) Preprocess the image to obtain a preprocessed image.
[0016] The steps for image preprocessing include:
[0017] 2.1) Convert the image to be processed into a grayscale image. The pixel value of the grayscale image is Gray = 0.299 × R + 0.587 × G + 0.114 × B. R, G, and B are the red, green, and blue components of the pixel in the color image, respectively. And the pixel value of each point in the grayscale image needs to be normalized to 0-1.
[0018] The pixel value of each point in the grayscale image is a normalized value.
[0019] 2.2) Use bilinear interpolation to convert the size of the grayscale image to n×n.
[0020] 2.3) Performing image correction on the n×n grayscale image, the steps include:
[0021] 2.3.1) Perform an affine transformation on the grayscale image f(x,y) to obtain the image f1(x,y)=A1[f(x,y)]. The transformation parameters are parameter satisfy And μ′ 30 +μ′ 12 <0, that is, parameter where μ pq is the central moment of the image f(x,y), p,q=0,1,2…, m pq is the geometric moment of the image f(x,y), M and N represent the number of rows and columns of pixels in the image f(x,y) respectively. The superscript ' represents the reciprocal.
[0022] 2.3.2) Use the Canny algorithm to perform edge detection on the image f1(x,y) to obtain a binary image f2(x,y). The steps of edge detection include smoothing, finding gradients, non-maximum suppression, and hysteresis thresholding.
[0023] 2.3.3) Set the binary image f2(x,y) as set A, and thicken the binary image f2(x,y) to obtain the image in, is the hit-or-miss transformation, is an erosion operation, B, B1, and B2 are structural elements used for thickening; A C is the complement of set A.
[0024] 2.3.4) Perform Hough transform on image f3(x,y) to obtain corrected image f4(x,y)=A2[f3(x,y)]. θ is the angle.
[0025] 3) Perform feature extraction on the preprocessed image to obtain image features.
[0026] The steps of feature extraction for the preprocessed image include:
[0027] 3.1) Divide the preprocessed image into L = d × d image blocks. The size of each image block is m × m.
[0028] 3.2) Perform a two-dimensional discrete wavelet transform on each image block to obtain a coefficient matrix. Extract the coefficient matrix with the lowest frequency. elements and establish a low-frequency coefficient matrix i is the serial number of the image block. 1≤i≤L.
[0029] 3.3) For the low frequency coefficient matrix Perform singular value decomposition to obtain the SV sequence of each image block. The SV sequence of the i-th image block is recorded as
[0030] 3.4) Calculate the standard deviation of the SV sequence of each image block and use it as the image feature. The standard deviation of the SV sequence of the i-th image block is Image feature φ=φ1,φ2,...,φ l .
[0031] 4) Quantify and encrypt image features to obtain an image hash sequence.
[0032] The steps to quantize and encrypt image features include:
[0033] 4.1) Quantize the image features into integers and obtain the quantized vector {Q|q i =round(φ i ×100+0.5),1≤i≤L}. Round() is a function that converts a decimal to the nearest integer. i is the element of the quantized vector Q;
[0034] 4.2) Generate the chaotic sequence {K|k i ∈(0,1),i=1,2,...,l}. K is generated by the logical mapping: U t+1 =λU t (1-U t ), where U t ∈[0,1], t=0,1,2,...,∞, 3.5699<λ≤4. k i is the element of chaotic sequence K;
[0035] 4.3) Arrange the elements of the chaotic sequence K in ascending order to obtain a new sequence K'. Record the positions of the elements in the sequence K' in the chaotic sequence K in the array S in sequence. Use the chaotic sequence K to encrypt the quantized vector Q and obtain the image hash sequence {H|h i =Q S[i] ,1≤i≤l}. S[i] is the i-th element in the array S. i Represents the i-th hash value.
[0036] The technical effect of the present invention is unquestionable. The present invention can obtain an image hash value after inputting a picture. The present invention has strong robustness: after being attacked, it can still be identified as the same picture under the premise that the visual content does not change. Strong distinguishability: the hash values generated between different images have a large hash distance. Security: Under the premise of not knowing the initial secret key, the probability of the same picture obtaining the same hash value is almost 0. High operating efficiency, hash values can be generated quickly for a picture. Small storage burden, only two initial secret keys and a very short hash value need to be stored. Resist rotation attacks, which is not possible with many existing solutions.
[0037] The present invention retains the low-frequency coefficients of the wavelet transform and compresses the coefficient matrix by using singular value decomposition (SVD). In this way, the features extracted by the scheme are still the key visual information of the image, so the present invention has excellent robustness and discrimination ability.
[0038] The present invention uses the initial values of the chaotic system to create a chaotic sequence that is considered unbreakable, just as these values are in the real number field. In theory, such a key space has an infinite size and is more secure than previous key generation schemes. The image owner can easily use two initial keys to generate a chaotic sequence for each image, which is more secure and flexible.
[0039] The present invention can effectively resist image rotation attacks through image correction, which is significantly better than most existing solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Here is a complete flow chart of the two solutions;
[0041] Figure 2 is the flow chart of image correction;
[0042] Figure 3 This is a diagram of the image correction process using "baboon" as an example;
[0043] Figure 4 It is a diagram of the method of cutting the original image into pieces;
[0044] Figure 5 It is the picture structure and coefficient distribution diagram after two-dimensional wavelet transformation;
[0045] Figure 6 It is the chaotic sequence distribution diagram of 256 values generated by the logical mapping under U0=0.618 and λ=3.98;
[0046] Figure 7 To maintain the robustness of the content against 8 types of attacks; Figure 7 (a) Maintaining content robustness against Brightness Adjustment attacks; Figure 7(b) Maintaining content robustness against JPEG Compression attacks; Figure 7 (c) is for 3*3Gaussian Low-pass filtering
[0047] Attack-preserving content robustness; Figure 7 (d) Maintaining content robustness against median filtering attacks; Figure 7 (e) Maintaining content robustness against scaling attacks; Figure 7 (f) Maintaining content robustness against Gamma Correction attacks; Figure 7 (g) Maintaining content robustness against Salt and Peppere Noise attacks; Figure 7 (h) Maintaining content robustness against Gaussian noise attacks;
[0048] Figure 8 It is a schematic diagram of Euclidean distance;
[0049] Fig. 9 Comparison of ROC curves of different schemes when the image is rotated;
[0050] Fig.10 Comparison of ROC curves of different schemes in resisting all attacks;
[0051] Fig.11 The Euclidean distance between the hash generated for the correct key and the hash generated for the incorrect key. DETAILED DESCRIPTION
[0052] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0053] Embodiment 1:
[0054] See also Figures 1 to 6 , the image perceptual hashing method based on discrete wavelet transform (IC-BDWT) includes the following steps:
[0055] 1) Obtain the image to be processed.
[0056] 2) Preprocess the image to obtain a preprocessed image.
[0057] The steps for image preprocessing include:
[0058] 2.1) Convert the image to be processed into a grayscale image. The pixel value of the grayscale image is Gray = 0.299 × R + 0.587 × G + 0.114 × B. R, G, and B are the red, green, and blue components of the pixel in the color image, respectively. And the pixel value of each point in the grayscale image needs to be normalized to 0-1.
[0059] The pixel value of each point in the grayscale image is a normalized value.
[0060] 2.2) Use bilinear interpolation to convert the size of the grayscale image to n×n.
[0061] 2.3) Performing image correction on the n×n grayscale image, the steps include:
[0062] 2.3.1) Perform an affine transformation on the grayscale image f(x,y) to obtain the image f1(x,y)=A1[f(x,y)]. The transformation parameters are parameter satisfy And μ′ 30 +μ′ 12 <0, that is, parameter where μ pq is the central moment of the image f(x,y), p,q=0,1,2…, m pq is the geometric moment of the image f(x,y), M and N represent the number of rows and columns of the matrix composed of pixels in the image f(x,y). The superscript ' represents the reciprocal.
[0063] 2.3.2) Use the Canny algorithm to perform edge detection on the image f1(x,y) to obtain a binary image f2(x,y). The steps of edge detection include smoothing, finding gradients, non-maximum suppression, and hysteresis thresholding.
[0064] 2.3.3) Set the binary image f2(x,y) as set A, and thicken the binary image f2(x,y) to obtain the image in, is the hit-or-miss transformation, is an erosion operation, B, B1, and B2 are structural elements suitable for thickening; A C is the complement of set A; the structural element B1 is used to erode image A. The structural element B2 is used to erode the complement of image A (A c ).
[0065] 2.3.4) Perform Hough transform on image f3(x,y) to obtain corrected image f4(x,y)=A2[f3(x,y)]. Here, the parameters θ is the angle.
[0066] 3) Perform feature extraction on the preprocessed image to obtain image features.
[0067] The steps of feature extraction for the preprocessed image include:
[0068] 3.1) Divide the preprocessed image into L = d × d image blocks. The size of each image block is m × m.
[0069] 3.2) Perform a two-dimensional discrete wavelet transform on each image block to obtain a coefficient matrix. Extract the coefficient matrix with the lowest frequency. elements and establish a low-frequency coefficient matrix i is the serial number of the image block. 1≤i≤L.
[0070] 3.3) For the low frequency coefficient matrix Perform singular value decomposition to obtain the SV sequence of each image block. The SV sequence of the i-th image block is recorded as
[0071] 3.4) Calculate the standard deviation of the SV sequence of each image block and use it as the image feature. The standard deviation of the SV sequence of the i-th image block is Image feature φ=φ1,φ2,...,φ l .
[0072] 4) Quantify and encrypt image features to obtain an image hash sequence.
[0073] The steps to quantize and encrypt image features include:
[0074] 4.1) Quantize the image features into integers and obtain the quantized vector {Q|q i =round(φ i ×100+0.5),1≤i≤L}. round() is a function that converts a decimal to the nearest integer. i is the element of the quantized vector Q;
[0075] 4.2) Generate the chaotic sequence {K|k i ∈(0,1),i=1,2,...,l}. K is generated by the logical mapping: U t+1 =λU t (1-U t ), where U t ∈[0,1], t=0,1,2,...,∞, 3.5699<λ≤4. k i is the element of chaotic sequence K;
[0076] 4.3) Arrange the elements of the chaotic sequence K in ascending order to obtain a new sequence K'. Record the positions of the elements in the sequence K' in the chaotic sequence K in the array S in sequence. Use the chaotic sequence K to encrypt the quantized vector Q and obtain the image hash sequence {H|h i =Q S[i] ,1≤i≤l}. S[i] is the i-th element in the array S. i Represents the i-th hash value.
[0077] The method disclosed in this embodiment can resist rotation attacks through image correction.
[0078] Embodiment 2:
[0079] The image perceptual hashing method based on discrete wavelet transform (BDWT) includes the following steps:
[0080] 1) Obtain the image to be processed.
[0081] 2) Preprocess the image to obtain a preprocessed image.
[0082] The steps for image preprocessing include:
[0083] 2.1) Convert the image to be processed into a grayscale image. The pixel value of the grayscale image is Gray = 0.299 × R + 0.587 × G + 0.114 × B. R, G, and B are the red, green, and blue components of the pixel in the color image, respectively. And the pixel value of each point in the grayscale image needs to be normalized to 0-1.
[0084] The pixel value of each point in the grayscale image is a normalized value.
[0085] 2.2) Use bilinear interpolation to convert the size of the grayscale image to n×n.
[0086] 3) Perform feature extraction on the preprocessed image to obtain image features.
[0087] The steps of feature extraction for the preprocessed image include:
[0088] 3.1) Divide the preprocessed image into L = d × d image blocks. The size of each image block is m × m.
[0089] 3.2) Perform a two-dimensional discrete wavelet transform on each image block to obtain a coefficient matrix. Extract the coefficient matrix with the lowest frequency. elements and establish a low-frequency coefficient matrix i is the serial number of the image block. 1≤i≤L.
[0090] 3.3) For the low frequency coefficient matrix Perform singular value decomposition to obtain the SV sequence of each image block. The SV sequence of the i-th image block is recorded as
[0091] 3.4) Calculate the standard deviation of the SV sequence of each image block and use it as the image feature. The standard deviation of the SV sequence of the i-th image block is Image feature φ=φ1,φ2,...,φ l .
[0092] 4) Quantify and encrypt image features to obtain an image hash sequence.
[0093] The steps to quantize and encrypt image features include:
[0094] 4.1) Quantize the image features into integers and obtain the quantized vector {Q|q i =round(φ i ×100+0.5),1≤i≤L}. round() is a function that converts a decimal to the nearest integer.
[0095] 4.2) Generate the chaotic sequence {K|k i ∈(0,1),i=1,2,...,l}. K is generated by the logical mapping: U t+1 =λU t (1-U t ), where U t ∈[0,1], t=0,1,2,...,∞, 3.5699...<λ≤4.
[0096] 4.3) Arrange the elements of the chaotic sequence K in ascending order to obtain a new sequence K'. Record the positions of the elements in the sequence K' in the chaotic sequence K in the array S in sequence. Use the chaotic sequence K to encrypt the quantized vector Q and obtain the image hash sequence {H|h i =Q S[i] ,1≤i≤l}. S[i] is the i-th element in the array S. i Represents the i-th hash value.
[0097] The method disclosed in this embodiment can effectively resist most attacks and maintain the content.
[0098] Embodiment 3:
[0099] The image-aware hashing method based on discrete wavelet transform includes the following steps:
[0100] 1) Image preprocessing:
[0101] 1.1) The input color image needs to be converted to a grayscale image. Gray = 0.299 × R + 0.587 × G + 0.114 × B, where Gray is the pixel value of the grayscale image, and R, G, and B are the red, green, and blue components of the pixel in the color image, respectively. And the pixel value of each point in the grayscale image needs to be normalized to 0-1.
[0102] 1.2) In order to resist scaling attacks and obtain a fixed-length hash value, the image is converted to a standard image size of n×n using bilinear interpolation.
[0103] 2) If Figure 2 As shown, image correction
[0104] 2.1) Rotation. Perform an affine transformation on a given image f(x,y) In this way, rotation invariance is achieved, and the changed image is f1(x,y)=A1[f(x,y)]. Calculation parameters but Choose μ′ that satisfies the condition 30 +μ′ 12 <0 Through the rotation transformation, we get an image f1(x,y) with a uniform fixed angle, such as Figure 3 (b) as shown.
[0105] 2.2) Edge detection. Perform the classic Canny algorithm edge detection on f1(x,y) to obtain the binary image f2(x,y). This includes ① smoothing, ② finding the gradient, ③ non-maximum suppression (NMS), and ④ hysteresis threshold. The Canny edge detection result is as follows: Figure 3 (c) as shown.
[0106] 2.3) Binary image thickening. Let the binary image f2(x,y) be set A, then the thickened image f3(x,y) is: in is the hit-or-miss transform (HMT), is the erosion operation, and B is the structural element suitable for thickening. The image thickening result is as follows Figure 3 (d) as shown.
[0107] 2.4) Hough transform. All pixel points of the image layer 0-89° are converted to θ-ρ space through Hough transform. Then the intersection point where these curves intersect the most times is found as the image boundary, and the angle θ of this point is obtained. Then the corrected image f4(x,y)=A2[f3(x,y)]. Figure 3 (e) as shown.
[0108] 3) After the image is preprocessed to obtain a standardized image, the next step is the feature extraction stage, which is to extract the features of the image.
[0109] 3.1) Block division. Figure 4 As shown, a sliding window of fixed size m×m slides m steps to get the next block. Repeat this operation from left to right and from top to bottom to divide the original image into L = d × d blocks.
[0110] 3.2) Discrete wavelet transform. For each image block I i (1≤i≤L) is subjected to two-dimensional discrete wavelet transform, and the obtained Figure 5 The coefficient matrix shown in FIG. 1 takes the low-frequency coefficient matrix LLi2 (1≤i≤L) for subsequent calculations. The size is
[0111] 3.3) Singular value decomposition. Perform SVD to obtain the SV sequence of each block:
[0112] 3.4) Calculate the standard deviation of each block SV as the final feature:
[0113] So far, we have obtained L features of the image φ=φ1,φ2,...,φ l .
[0114] 4) Quantify and encrypt these eigenvalues.
[0115] 4.1) Quantization. In order to avoid decimals consuming a lot of storage space, these image features are quantized into integers. Quantization formula: {Q|q i =round(φ i ×100+0.5),1≤i≤L}, where round() is a function that converts a decimal to the nearest integer.
[0116] 4.2) Generate a chaotic sequence. Use the initial secret key U0 and λ to generate a chaotic sequence {K|k i ∈(0,1),i=1,2,...,l}, K is generated by the logical mapping: U t+1 =λU t (1-U t ), where U t ∈[0,1], t=0,1,2,...,∞, 3.5699...<λ≤4. Figure 6 The chaotic sequence after 256 iterations with U0=0.618 and λ=3.98 is shown.
[0117] 4.3) Encryption. The image owner encrypts the quantization result Q based on the chaotic sequence K. Arrange K in ascending order to obtain a new sequence K', and record the positions of the K' elements in the original sequence in the array S. Therefore, the final hash sequence obtained is {H|h i =Q S[i] ,1≤i≤l}, S[i] is the i-th element in array S.
[0118] Embodiment 4:
[0119] See also Figure 7-Figure 11 ,The verification experiment of the image-aware hashing method based on discrete wavelet transform is as follows:
[0120] 1) Robustness:
[0121] Table 1 details the attacks on these content preservation and their corresponding parameter settings. That is, 8 attacks are used to generate 60 similar versions of each benchmark image. These attacked images are generated using Matlab. Therefore, the number of images used for robustness testing is (60+1)*5=305. After calculating the hash values of the benchmark image and similar images under each attack method, the Euclidean distance of the image pair is calculated.
[0122] The figure shows the robustness of Example 2 in preserving content against these eight attacks. The x-axis represents the different parameters of the attack operation, and the y-axis represents the Euclidean distance between the similar image and the original image. As can be seen from the figure, the Euclidean distance of the image pairs generated by brightness adjustment, median filtering, and gamma correction is larger than that of other attack methods. However, the maximum Euclidean distance of all attacks is no greater than 75, which means that if a value higher than 75 is selected as the threshold, all similar images of the 5 baseline images under these attacks can be successfully identified. Therefore, the algorithm achieves robustness against these attacks. That is, the same picture is robust under common content-preserving attacks, and the original image can still be identified.
[0123]
[0124] 2) Distinguishability:
[0125] This embodiment uses the proposed hash algorithm to generate a hash value for each image, and then calculates the Euclidean distance between these images. There are a total of 400 images. If any two images are selected, there are 79,800 different pairs of images. The above figure shows the distribution of 79,800 Euclidean distances. The x-axis is the value of the Euclidean distance, and the y-axis is the corresponding number of occurrences.
[0126] The distribution of Euclidean distance approximately follows the gamma distribution with α = 22:81 and β = 24:92. Therefore, given the threshold T, the collision probability calculation formula is Where Γ(α) is the gamma function,
[0127] The above formula can be used to calculate that when the threshold T = 75, the probability of hash collision is 3.26×10 -13 , when T = 150, the probability of hash collision is 1.38×10 -7 At the same time, the expected value of the Euclidean difference between any two images is α×β=22.81×24.92≈568. This is much higher than the 75 and 150 mentioned in the previous robustness test. As can be seen from the figure, there is no distance from the previously mentioned threshold of 150, indicating that the proposed scheme has excellent discrimination ability. This means that two completely different images can produce unrelated hash values. The algorithm is highly discriminable.
[0128] 3) Resistance to rotation attacks
[0129] In order to illustrate the advantages of the scheme, this embodiment compares the method of the present invention with the five most advanced schemes (RP-IVDhashing), F-DNShashing, W-DWT hashing, SIFT-SVD hashing, WLBP-CAhashing and traditional P hashing.
[0130] There is a conflict between the robustness and discrimination ability of the perceptual hash algorithm. A good solution should be able to balance the two. The receiver operating characteristic (ROC) is a commonly used indicator to evaluate the performance of hash algorithms. The x-axis of the ROC curve is the false positive rate (FPR), and the y-axis is the true positive rate (TPR), which are defined as: Here TP is a real similar image pair, FN is a fake different image pair, FP is a fake similar image pair, and TN is a real different image pair. The closer the ROC curve is to the upper left corner, the better the algorithm performance. The area under the ROC curve (AUC) is generally used to evaluate the performance of the algorithm. The larger the AUC, the better the performance.
[0131] The first is the rotation attack. In this embodiment, 400 images are selected and each image is rotated by 45, 75…315, 345°. Then, each image has 12 similar versions, that is, a total of 400×13=5200 images. image pairs, Fig. 9 The ROC curves of different schemes under image rotation are compared. It can be seen that the ROC curve of IC-BDWT covers the other curves, proving that the detection ability of IC-BDDW under rotation attack is better than other comparable schemes. The AUC results in Table IV also illustrate this point. The AUC of IC-BDWT is 0.9692, and the maximum AUC of other schemes is 0.7688. This fully demonstrates the superiority of the scheme of the present invention in resisting rotation attacks.
[0132] 4) Overall analysis (all attacks)
[0133] This example selects 98 original images and generates 72 visually similar versions of each image. That is, 98×(72+1)=7154 images. The ROC curve of IC-BDWT is obviously closer to the upper left corner than that of other schemes. In addition, among the eight schemes, the AUC of IC-BDWT is the largest (0.9793), followed by BDWT (0.8490), indicating that the method of the present invention is superior to other schemes.
[0134] 5) Time consumption analysis
[0135] The simulation experiment was completed in Matlab 2020a, Windows 10 system, CPU 3.40GHz Inter(R)Core(TM)i5-7500, memory 16GB. This example records the time consumed by each hash algorithm to hash 399 color images, and then calculates the average time consumption of each hash scheme. As shown in the figure below, the average time consumption of BDWT and IC-BDWT is 0.3184 seconds and 0.5018 seconds, respectively, which is faster than SIFT-SVD and WLBP-CA, and slower than P, RP-IVD, F-DNS and W-DWT. IC-BDWT is significantly slower than BDWT. Therefore, IC-BDWT can resist rotation, but it is slower than the basic scheme BDWT.
[0136]
[0137] 6) Security
[0138] First, the attacker cannot generate a chaotic sequence based on the guessed initial value. This is because the initial value of the chaotic system falls in the real number domain, which has infinite space. Second, the number of permutations of L is L! , and there is no correct chaotic sequence. The probability of getting the correct sequence S is For example, if L = 256, the probability is 1.17 × 10 -507 . Therefore, the image hash is protected.
[0139] Now, this embodiment proves its security through specific experiments. If an attacker uses a pair of wrong initial values U0 and λ to generate a chaotic sequence to scramble the image hash value, a hash value that is very different will be obtained. This embodiment uses a pair of correct initial values and 200 pairs of random initial values to generate 256 different chaotic values to encrypt the same image. Fig.11The Euclidean distances between the hashes generated by the correct key and the hashes generated by the incorrect key are shown. The minimum value of these distances is 443, which is much larger than the threshold T=150 mentioned in the previous experiment, and is close to the expected value of the Euclidean distance between any two images, which is 568. This shows that the method of the present invention is safe and can effectively protect image information.
Claims
1. Image-aware hashing method based on discrete wavelet transform, characterized in that: The following steps are involved: 1) Obtain the image to be processed; 2) Preprocessing the image to obtain a preprocessed image; 3) Extract features from the preprocessed image to obtain image features; 4) Quantify and encrypt image features to obtain an image hash sequence; The steps for image preprocessing include: 2.1) Convert the image to be processed into a grayscale image; the pixel value of the grayscale image is Gray = 0.299×R+0.587×G+0.114×B; where R, G, and B are the red, green, and blue components of the pixel in the color image respectively; and the pixel value of each point in the grayscale image needs to be normalized to 0-1; 2.2) Convert the size of the grayscale image to n×n using bilinear interpolation; The step of preprocessing the image also includes performing image correction on the n×n grayscale image; The steps of image correction include: a1) Perform an affine transformation on the grayscale image f(x,y) to obtain the image f1(x,y)=A1[f(x,y)]; where the transformation parameters are parameter satisfy And μ3′0+μ1′2<0, that is, the parameter where μ pq is the central moment of the image f(x,y), m pq is the geometric moment of the image f(x,y), M and N represent the number of rows and columns of pixels in the image f(x,y) respectively; a2) Use the Canny algorithm to perform edge detection on the image f1(x,y) to obtain a binary image f2(x,y); a3) Set the binary image f2(x,y) as set A, thicken the binary image f2(x,y) and get the image in, is the hit-or-miss transformation, is an erosion operation, B, B1, and B2 are structural elements used for thickening; A C is the complement of set A; a4) Perform Hough transform on image f3(x,y) to obtain corrected image f4(x,y)=A2[f3(x,y)]; where the parameters θ is the angle; The steps of feature extraction for the preprocessed image include: 3.1) Divide the preprocessed image into L = d × d image blocks; the size of each image block is m × m; the size 3.2) Perform a two-dimensional discrete wavelet transform on each image block to obtain a coefficient matrix; extract the coefficient matrix with the lowest frequency. elements and establish a low-frequency coefficient matrix i is the serial number of the image block; 1≤i≤L; 3.3) For the low frequency coefficient matrix Perform singular value decomposition to obtain the SV sequence of each image block; the SV sequence of the i-th image block is recorded as 3.4) Calculate the standard deviation of the SV sequence of each image block and use it as the image feature; where the standard deviation of the SV sequence of the i-th image block is Image feature φ=φ1,φ2,...,φ l ; The steps to quantize and encrypt image features include: 4.1) Quantize the image features into integers and obtain the quantized vector {Q|q i =round(φ i ×100+0.5),1≤i≤L}; round() is a function that converts a decimal to the nearest integer; q i is the element of the quantized vector Q; 4.2) Generate the chaotic sequence {K|k i ∈(0,1),i=1,2,…,l}; K is generated by the logical mapping: U t+1 =λU t (1-U t ), where U t ∈[0,1], t=0,1,2,...,∞, 3.5699<λ≤4;k i is the element of chaotic sequence K; 4.3) Arrange the elements of the chaotic sequence K in ascending order to obtain a new sequence K'; record the positions of the elements in the sequence K' in the chaotic sequence K in the array S in sequence; use the chaotic sequence K to encrypt the quantized vector Q to obtain the image hash sequence {H|h i =Q S[i] ,1≤i≤l}; S[i] is the i-th element in the array S; h i Represents the i-th hash value.
2. The image-perceptual hashing method based on discrete wavelet transform according to claim 1, characterized in that: The pixel value of each point in the grayscale image is a normalized value.
3. The image-perceptual hashing method based on discrete wavelet transform according to claim 1, characterized in that: The steps of edge detection include smoothing, finding gradient, non-maximum suppression, and hysteresis threshold.
Citation Information
Patent Citations
A signal compression and encryption method based on coupled circuit
AU2020103541A4
Robust image hashing method and device based on Radon transformation and invariant features
CN104091303A