Tamper localization reversible watermarking method based on SIFT (scale invariant feature transform) and quadrant partitioning
By using SIFT and quadrant blocking technology to generate certified watermarks in images, and combining Chinese residual theorem with ICMIC mapping for embedding and detection, the problem of insufficient positioning accuracy and visual quality of image feature watermarks in the existing technology is solved, achieving more efficient tamper detection effect.
Patent Information
- Application Number
- CN202411431647.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, when using image features to generate authentication watermarks for tamper detection, positioning accuracy and visual quality need to be improved.
Using a method based on SIFT and quadrant blocking, combining Chinese residual theorem with ICMIC mapping, an authentication watermark is generated, and embedded into the image block through the tilt histogram algorithm, and secondary detection is performed to improve the tamper detection effect.
Improve the positioning accuracy and visual quality of tamper detection, ensuring the integrity and authenticity of image content.
Smart Images

Figure CN119444541A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of information hiding and digital watermark technology, and in particular to a tampering positioning reversible watermark method based on SIFT and quadrant blocking. Background Art
[0002] The integrity of image content is critical for certain types of images (military images, medical images, legal images, etc.) because their important texture details may contain more important information, such as the strike target and attack range in military images. With the rapid development of information technology, the use of digital images is becoming more and more widespread, and the functions of image processing tools are constantly enhanced, making the authenticity and integrity protection of image content particularly important.
[0003] Gong X, Chen L, Yu F, Zhao X, Wang SA secure image authentication scheme based on dual fragile watermark. Multimedia Tools and Applications. 2020, 79(25): 18071-88 proposed an image authentication algorithm based on dual watermarks, namely diffusion watermark and authentication watermark. Both watermarks have high sensitivity, and the authentication watermark locates the tampered area in a pixel-level manner. As expected, this scheme achieves good performance in tampering location, reaching 99%, but the quality of the watermarked image needs to be improved. Trivedy and Pal et al. proposed a fragile watermark scheme based on pixel level using logical mapping. A chaotic sequence is first generated by logical mapping for key matrix formation, and then the key matrix is implemented in the watermark embedding process. Since their scheme is based on the key matrix, it has high security, but the computational overhead is large. Rawat and Raman et al. developed another fragile watermark scheme based on chaos by using two chaotic maps, and the initial value is sensitive to the chaotic map. The parameters of the chaotic map are used as the key, and this process improves the security level of the watermark. Lin CC, Huang Y, Tai WL (2017) A novel hybrid image authentication scheme based on absolute moment block truncation coding [J]. Multimed Tools Appl 76 (1): 463–488 A hybrid image authentication algorithm is proposed to protect the integrity of compressed images. In this algorithm, all blocks are divided into smooth and complex texture regions. The authentication watermark is embedded in the quantization level of each block. The algorithm can only verify the integrity of the image and detect the tampered area. Sahu et al. proposed a reversible watermark tampering detection and localization scheme based on dual images. The scheme uses a pixel adjustment strategy to embed two secret bits in each host image pixel to obtain a dual watermark image. The pixel adjustment strategy modifies the non-boundary pixels of the image by a maximum of ±1 according to the watermark information.
[0004] Although there have been many studies on image content authentication with strong tamper detection capabilities, high positioning accuracy and certain visual quality, there are relatively few studies on using image features to generate authentication watermarks for tamper detection. Image feature points or regions are an indispensable and important factor in the image, with a relatively stable state and a certain ability to resist attacks. Therefore, how to use image features to generate authentication watermarks for tamper detection is an urgent problem to be solved. Summary of the invention
[0005] Objective of the Invention: Aiming at the problems existing in the prior art, the present invention provides a reversible watermarking method for tampering location based on SIFT and quadrant partitioning. This solution not only generates a more reliable and secure mapping method by combining the Chinese Remainder Theorem with ICMIC, but also uses both SIFT and LBP methods to jointly generate an authentication watermark, and performs secondary detection on black and white regions to improve the tampering detection effect.
[0006] Technical Solution: The present invention provides a reversible watermarking method for tampering location based on SIFT and quadrant partitioning, including a watermark embedding method, and the specific steps are as follows:
[0007] Step 1: Given an 8-bit grayscale image I(i, j) with M×N, where 0 < I(i, j) < 255, it is divided into eight quadrants. The pixel values at the intersections of the quadrants are used for the lower quadrants. SIFT transformation is performed in each quadrant. In the inscribed circle of each quadrant, a feature point is selected according to different thresholds, the distance from the feature point to the centroid of the image is calculated and converted into a binary number, and the first 6 bits of the binary number are taken as the first part of the authentication watermark for the quadrant. According to the coincidence situation of the feature point and the centroid, the sender sends the variable t to the receiver;
[0008] Step 2: The image divided into eight quadrants is further divided into a checkerboard pattern, and with the center of the image as the base point, squares with a side length of 10 are divided. Then, on the basis of the existing squares, the side length is expanded to 14, and then the side length of each divided square is 4 larger than the previous one until the entire image is divided, forming 8 triangular image blocks and several trapezoidal image blocks, simply referred to as image blocks;
[0009] Step 3: Calculate the LBP value for the white area of each image block in Step 2 and generate a 2-bit authentication watermark. Together with the 6-bit authentication watermark generated by the quadrant where this image block is located, a total of 8-bit authentication watermark is generated as the authentication watermark generated by the white area of this image block, and a 4-bit authentication watermark for the white area of this image block is obtained through compression;
[0010] Step 4: Embed the 4-bit authentication watermark of the white area of each image block into the white area of each image block itself through the inclined histogram algorithm, and then perform a mapping operation on each image block by combining the Chinese Remainder Theorem and ICMIC mapping. The mapping relationship is t1, and the 4-bit authentication watermark of the white area of each image block is embedded into the white area of the corresponding image block through the inclined histogram algorithm;
[0011] Step 5: Calculate the LBP value for the black area of each image block in Step 2 and generate a 2-bit authentication watermark. Together with the 6-bit authentication watermark generated by the quadrant where this image block is located, a total of 8-bit authentication watermark is generated as the authentication watermark generated by the black area of this image block, and a 4-bit authentication watermark for the black area of this image block is obtained through compression;
[0012] Step 6: The 4-bit authentication watermark of the black area of each image block is embedded into the black area of each image block itself through the improved tilted histogram algorithm. The Chinese remainder theorem and ICMIC mapping are combined to perform mapping operations on each image block. The mapping relationship is t2. The 4-bit authentication watermark of the black area of each image block is embedded into the black area of the corresponding image block through the tilted histogram algorithm.
[0013] Step 7: Combine the image blocks embedded in step 4 and step 6 to obtain the final watermarked image I'.
[0014] Furthermore, in the step 1, different thresholds represent the distance from the image centroid. When selecting a feature point, if there are multiple features in the inscribed circle, they are selected in order from top to bottom and from left to right. If there is no feature point in the quadrant area, the feature watermark generated in the quadrant area is 000000. If the feature point in the quadrant area is the image centroid, that is, the distance is 0, then the watermark is also 000000. The variable t is sent for distinction. If t is an even number, it means that the centroid and the feature point do not coincide with each other. If t is an odd number, it means that the centroid coincides with one of the feature points.
[0015] Furthermore, in step 3 and step 5, the LBP value is calculated for the white area and the black area of the image block and a 2-bit authentication watermark is generated, specifically:
[0016] For the white area of each image block, the LBP value is calculated. The pixel values in the black area are first averaged and rounded down. The pixels in each white area are compared with the average value. If they are greater than the average value, they are recorded as 1, otherwise they are recorded as 0. According to the different sizes of each image block, the length of the generated binary number is also different. The middle two bits of this string of binary numbers are selected as the LBP value of the image block. If the length X is an even number, the (X / 2-1)th and (X / 2)th bits are selected; if the length X is an odd number, the {(X-1) / 2}th and {(X+1) / 2}th bits are selected. The method for calculating the LBP value of the black area is the same as that of the white area.
[0017] Furthermore, in step 4 and step 6, if the amount of watermark that can be embedded in the image block is relatively large, after embedding the 4-bit authentication watermark in step 4 and step 6, the 4-bit authentication watermark is repeatedly embedded until the image block is fully embedded.
[0018] Furthermore, when the authentication watermark is compressed in step 3 and step 5, the SP box is used for compression, and the specific process is as follows:
[0019] Assume that the input authentication watermark A=a1a2a3a4a5a6a7a8, let a3a4a5a6=k, a1a2a7a8=h, the numbers in each row and column of the SP box are randomly generated in the range of 0 to 15, and a number B is found in the h row and k column of the SP box. In binary, B=b1b2b3b4, then b1b2b3b4 is the output of the SP box.
[0020] Furthermore, an improvement is made on the basis of the original inclined histogram algorithm. The inclined histogram algorithm calculates the local complexity of the image block according to the predicted pixel value, and determines the embedding order according to the size of the local complexity. For the trapezoidal image block, when calculating the local complexity of the predicted pixel, the local complexity is calculated using three adjacent pixels. The local complexity calculation formula is:
[0021]
[0022] For triangular image blocks, when calculating the local complexity of predicted pixels, the upper, lower, left and right pixels are used to calculate the local complexity. The local complexity calculation formula is:
[0023] C(P)=|NW|+|WS|+|SE|+|WE|+|NS|+|NE|
[0024] Among them, P is the predicted pixel, and the four adjacent pixels are {N, W, S, E}, that is, the four pixels above, below, left and right of the predicted pixel P. The predicted pixel P in the trapezoidal image block has only 3 adjacent pixels, which are set as {W, S, E} here.
[0025] Furthermore, in step 4 and step 6, the Chinese remainder theorem and ICMIC mapping are combined to perform mapping operations on each image block, and the specific operations are as follows:
[0026] According to the Chinese remainder theorem formula, a k is a positive integer, m k are mutually prime positive integers, set as follows:
[0027]
[0028] Among them, a1=a2=a3 is the gray value of the image block, and a variable t is sent from the sender to the receiver. Then, six prime numbers are selected from small to large in the interval (t, t+8]. If there are no six prime numbers in this interval, the interval range is continuously expanded, and six prime numbers from small to large are searched in (t, t+16] until six prime numbers are found; every three prime numbers are grouped, that is, m1, m2, and m3 are grouped and substituted into the above formula to obtain a unique value x1; m4, m5, and m6 are grouped and substituted into the above formula to obtain a unique value x2; x1 and x2 are substituted into the ICMIC mapping as variables in turn, and two final different mapping relationships t1 and t2 are formed; the mapping relationship t1 is used as the image block mapping operation in step 4, and the mapping relationship t2 is used as the image block mapping operation in step 46;
[0029] The mathematical expression of ICMIC mapping is as follows:
[0030] x i+1 = sin(a / x i )
[0031] Among them, a is the control parameter, which takes the value of (0, ∞), and its chaotic orbit state value range is (-1, 1).
[0032] Furthermore, a watermark extraction and authentication method is also included, which specifically includes the following steps:
[0033] Step 1: Divide the watermarked image I' into eight quadrants. The pixel values at the intersection of the quadrants are used for the lower quadrant. Perform SIFT transformation in each quadrant. In the inscribed circle of each quadrant, calculate the distance from the feature point to the image centroid and convert it into a binary number. Take the first 6 bits of the binary number as the first part of the authentication watermark ac of the quadrant. t ', receive the parameter t sent by the sender;
[0034] Step 2: The image divided into eight quadrants is further divided into a chessboard shape, and the center of the image is used as the base point to divide the square with a side length of 10. Then, the side length of the existing square is expanded to 14. After that, the side length of each divided square is 4 larger than the previous one until the entire image is divided, forming 8 triangular watermarked image blocks and several trapezoidal watermarked image blocks, referred to as watermarked image blocks;
[0035] Step 3: Calculate the LBP value for the black area of each watermarked image block in step 2 and generate a 2-bit authentication watermark ac l ', and the first part of the authentication watermark ac t 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate authentication watermark AC hs ;
[0036] Step 4: Use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t2. Calculate the local complexity of the black area of each watermarked image block. Extract the authentication watermark AC in the black area of the corresponding watermarked image block after the current watermarked image block is mapped through the inverse process of the tilted histogram algorithm. ht ;
[0037] Step 5: Generate the authentication watermark AC in step 3 hs The authentication watermark AC extracted in step 4 ht Compare them. If the two are the same, it means that the black area of the watermarked image block is correct in the first comparison.
[0038] Step 6: If the black area of the watermarked image block is correct after the first comparison, continue to extract the watermark AC embedded in the black area of the watermarked image block through the inverse process of the tilted histogram algorithm ht '; If AC ht 'With AC hs If they are the same, it means that the black area of the watermarked image block has not been tampered with, otherwise, this area has been tampered with;
[0039] Step 7: After the authentication of the black area of each watermarked image block is completed, the above operation is performed again on the white area of each watermarked image block to calculate the LBP value of the white area of each watermarked image block and generate a 2-bit authentication watermark, which is combined with the first part of the authentication watermark ac t 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate white block authentication watermark AC bs ; Calculate the local complexity of the white area of each watermarked image block, and use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t1. The authentication watermark AC in the white area of the corresponding watermarked image block after the current watermarked image block is mapped is extracted through the inverse process of the tilted histogram algorithm. bt , A.C. bs and AC bt If the comparison is the same, it means that the first comparison of the white area of the watermarked image block is correct; then the watermark AC is extracted from the white area of the watermarked image block that is correct in the first comparison. bt ', with AC bt Make a comparison, if they are the same, they have not been tampered with; if they are different, they have been tampered with.
[0040] Furthermore, if the black area of the current watermarked image block is tampered with in step 5, the white area of the watermarked image block is directly mapped to the corresponding white area of the watermarked image block to extract the watermark AC. Bt, the mapping relationship of the white area mapping is t1; then extract the watermark AC of the white area of the watermarked image block Bt ', compare the two, if they are different, the white area of the watermarked image block has been tampered with, if they are the same, it has not been tampered with.
[0041] Furthermore, when calculating the local complexity of the black area and the white area of each watermarked image block, the local complexity of the image block is calculated according to the predicted pixel value, and the extraction order is determined according to the size of the local complexity. For the trapezoidal watermarked image block, when calculating the local complexity of the predicted pixel, the local complexity is calculated using three adjacent pixels. The local complexity calculation formula is:
[0042]
[0043] For the triangular watermarked image block, when calculating the local complexity of the predicted pixel, the upper, lower, left and right pixels are used to calculate the local complexity. The local complexity calculation formula is:
[0044] C(P)=|NW|+|WS|+|SE|+|WE|+|NS|+|NE|
[0045] Among them, P is the predicted pixel, and the four adjacent pixels are {N, W, S, E}, that is, the four pixels above, below, left and right of the predicted pixel P. The predicted pixel P in the trapezoidal image block has only 3 adjacent pixels, which are set as {W, S, E} here.
[0046] Beneficial effects:
[0047] 1. The present invention divides the original image into quadrants, calculates the characteristic information of each quadrant, divides the entire image into a checkerboard shape, calculates the characteristic information of each black area, and uses the two together as the authentication watermark of this black area. Then, the regional authentication watermark is first embedded into the black area itself through the tilted histogram, and the Chinese remainder theorem is combined with the ICMIC mapping to generate a new mapping method. Through this mapping, the black area watermark is embedded into the black area of the corresponding block. The white area is operated in the same way as the black area, and both the black and white areas have completed secondary embedding. Therefore, the black and white areas of a block can be authenticated twice at the receiving end.
[0048] 2. The present invention improves the traditional S-box and can compress an 8-bit authentication watermark into a 4-bit authentication watermark. In this way, the embedding capacity will be larger than the S-box, and the effect of tampering location will be relatively better.
[0049] 3. When the present invention embeds the inclined histogram, because the image is not divided into regular squares, it is divided into squares with a side length of 10 based on the center of the image, and then the side length is expanded to 14. After that, the side length of each divided square is 4 larger than the previous one until the entire image is divided. Therefore, very few blocks are triangles, and most of them are trapezoids. This results in the local complexity algorithm of the inclined histogram not being very applicable to the present invention. The accuracy of calculating the complexity value of each pixel is low, resulting in a small embedding capacity or serious distortion, affecting the final tampering detection effect and visual quality. The present invention performs different complexity calculations on blocks of two shapes. For triangles, the shape is relatively regular, and each pixel has relatively complete upper, lower, left and right pixels. The traditional four adjacent pixel values are used to calculate the local complexity. However, for trapezoidal image blocks, most of the target pixels have only three adjacent pixels. The new complexity calculation formula can greatly improve the accuracy of pixel complexity value calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The flow chart of generating and embedding the authentication watermark of the present invention;
[0051] Figure 2 Authentication watermark extraction and tampering location process for the present invention;
[0052] Figure 3 It is the feature point screening process of scale-invariant feature conversion of the present invention;
[0053] Figure 4 It is the local complexity calculation process of the present invention;
[0054] Figure 5 The process of dividing the image into blocks (trapezoidal and triangular) according to the present invention;
[0055] Figure 6 It is an experimental image of an embodiment of the present invention;
[0056] Figure 7 This is a comparison of the CR experiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0058] The present invention discloses a tampering localization reversible watermarking method based on SIFT and quadrant block, including a watermark embedding method, see Figure 1 , the specific steps are as follows:
[0059] Step 1: Given an 8-bit grayscale image \(I(i, j)\) of size \(M\times N\), where \(0 < I(i, j)<255\), divide it into eight quadrants. The pixel values at the intersections of the quadrants are used for the lower quadrants. Perform SIFT transformation on each quadrant. In the inscribed circle of each quadrant, select a feature point according to different thresholds, calculate the distance from the feature point to the centroid of the image, and convert it into a binary number. Take the first 6 bits of the binary number as the first part of the authentication watermark for the quadrant. According to the coincidence situation between the feature point and the centroid, the sender sends a variable \(t\) to the receiver.
[0060] SIFT feature points are local description points of an image. They have invariance to scale, rotation, and translation, and are also highly robust to transformations such as illumination, affine, and three-dimensional projection. Therefore, using SIFT feature points to generate authentication watermarks can better improve the tampering detection effect. The SIFT steps are as follows:
[0061] (1) Detect the extreme points in the scale space
[0062] Suppose \(I(x, y)\) represents the input image, and its scale space function \(L(x, y, \sigma)\) is obtained by convolving the original image \(I(x, y)\) with a variable-scale Gaussian kernel function \(L(x, y, \sigma)\). The specific formula is:
[0063] \(L(x,y,\sigma)=G(x,y,\sigma)*I(x,y)\ (1)\)
[0064] To find the extreme points of the image, by subtracting adjacent image matrices in the same scale space, the Difference of Gaussian scale space (DOG) can be obtained as follows:
[0065] \(D(x,y,\sigma)=(G(x,y,k\sigma)-G(x,y,\sigma))*I(x,y)=L(x,y,k\sigma)-L(x,y,\sigma)\ (2)\)
[0066] Two adjacent scales are expanded by a constant.
[0067] (2) Extract stable feature points
[0068] To find the extreme points of the DoG function, each pixel point needs to be compared with all its adjacent points to see if it is larger or smaller than all its adjacent points. The Gaussian scale space to the Difference of Gaussian scale space is as Figure 3 shown. The adjacent points consist of 8 adjacent points in the same scale and \(9\times2\) points in the upper and lower adjacent scales, a total of 26 points.
[0069] (3) Feature point screening
[0070] The number of feature points generated by the above method is relatively large, and not all feature points will participate in the generation of the authentication watermark. Therefore, the present invention screens the feature points. First, divide the image into 8 quadrants, as follows Figure 3As shown in (b). Perform SIFT transformation on each quadrant, select a feature point in the inscribed circle of each quadrant according to different thresholds (the threshold is the distance from the center of the image) (if there are multiple feature points in this inscribed circle, select them in order from top to bottom and from left to right), calculate the distance from this feature point to the centroid of the image, round the distance down and convert it into a binary number, and take the first 6 bits of this binary number as the first part of the authentication watermark for all blocks in the quadrant. If there is no feature point in this quadrant area, the feature watermark generated in this quadrant area is 000000. If the feature point in this area happens to be the centroid of this image (the distance is 0, the watermark is also 000000). In order to distinguish these two situations, the variable t is sent. If t is an even number, it means that the centroid does not coincide with the feature point; if t is an odd number, it means that the centroid coincides with one of the feature points.
[0071] The formula for the image centroid coordinates (x, y) is as follows:
[0072]
[0073] The centroid (x, y) and the feature point (x t ,y t )The distance formula is as follows:
[0074]
[0075] Step 2: Divide the image into eight quadrants into a chessboard shape, and divide it into squares with a side length of 10 based on the center of the image. Then expand the side length of the existing square to 14. After that, the side length of each divided square is 4 longer than the previous side length until the entire image is divided, forming 8 triangular image blocks and several trapezoidal image blocks, referred to as image blocks, see Figure 5 ,in Figure 5 (a) is divided into 8 quadrants and then into squares with a side length of 10. See the chessboard for details. Figure 5 (b) Figure 5 (b) Figure 5 (a) is used as an example to illustrate the 7th and 8th quadrants. Figure 5 (c) means Figure 5 In (b), a triangular image patch is shown, where the pixel value at the intersection of quadrants is used for the lower quadrant.
[0076] Step 3: Calculate the LBP value for the white area of each image block in step 2 and generate a 2-bit authentication watermark. Together with the 6-bit authentication watermark generated in the quadrant where the image block is located, a total of 8-bit authentication watermark is generated as the authentication watermark generated for the white area of the image block, and a 4-bit authentication watermark for the white area of the image block is obtained by compression.
[0077] LBP (Local Binary Pattern) is an operator used to describe the local texture features of an image, with significant advantages such as rotation invariance and grayscale invariance. It is generally used for texture feature extraction, and the extracted features are local texture features of the image.
[0078] The LBP operator is defined as taking the central pixel of the window as the threshold within a 3×3 window and comparing the grayscale values of the 8 adjacent pixels with it. If the surrounding pixel values are greater than the central pixel value, the position of the pixel is marked as 1, otherwise it is marked as 0. In this way, the 8 points in the 3×3 neighborhood can generate an 8-bit binary number (usually converted to a decimal number, namely the LBP code, which has 256 types in total) after comparison, that is, the LBP value of the central pixel of the window is obtained, and this value is used to reflect the texture information of the area.
[0079] The present invention divides the image into a checkerboard shape. For the LBP value of the white area of each block, the pixel value of the black area is first averaged and rounded down, and each pixel in the white area is compared with the mean. If it is greater than the mean, it is recorded as 1, otherwise it is 0. The length of the generated binary number is different according to the size of each block, so we select the middle two bits of this string of binary numbers as the LBP value of this image block. If the length X is an even number, the (X / 2-1)th and (X / 2)th bits are selected; if the length X is an odd number, the {(X-1) / 2}th and {(X+1) / 2}th bits are selected. The same is true for the black area.
[0080] When compressing the authentication watermark, the SP box is used for compression. The specific process is as follows:
[0081] Assume that the input authentication watermark A=a1a2a3a4a5a6a7a8, let a3a4a5a6=k, a1a2a7a8=h, the numbers in each row and column of the SP box are randomly generated in the range of 0 to 15, and a number B is found in the h row and k column of the SP box. In binary, B=b1b2b3b4, then b1b2b3b4 is the output of the SP box.
[0082] Step 4: Embed the 4-bit authentication watermark of the white area of each image block into the white area of each image block itself through the tilted histogram algorithm, and then use the Chinese remainder theorem and ICMIC mapping to map each image block. The mapping relationship is t1, and embed the 4-bit authentication watermark of the white area of each image block into the white area of the corresponding image block through the tilted histogram algorithm. If the image block can embed a large amount of watermark, repeat embedding the 4-bit authentication watermark until the image block is full.
[0083] After the 4-bit authentication watermark in the white area of the image block is embedded into the white area of each image block itself through the tilted histogram algorithm, the present invention also uses a combination of the Chinese remainder theorem and ICMIC mapping to perform a mapping operation on each image block, and the mapping relationship is t1. The 4-bit authentication watermark in the white area of each image block is embedded into the white area of the corresponding image block through the tilted histogram algorithm. For example, if there is a mapping relationship between image block 1 and image block 7, then the 4-bit authentication watermark in the white area of image block 1 is embedded in the white area of image block 7.
[0084] The Chinese remainder theorem can be described in mathematical language as follows:
[0085] Let m1, m2, m3, ..., m k are k mutually prime positive integers, then for any positive integers a1, a2, ..., a k , congruence group:
[0086]
[0087] There must be a solution, and the solution is unique. If m=m1m2…m k , then the solution can be expressed as
[0088]
[0089] in It is M i For m i Find the modular multiplication inverse of the remainder, satisfying Where i=1,2…,k.
[0090] ICMIC mapping is a chaotic model with infinite mapping folding times. Compared with Logistic mapping and Tent mapping, this mapping has the advantages of uniform traversal and fast convergence. The mathematical expression of ICMIC mapping is as follows:
[0091] x i+1 = sin(a / x i ) (7)
[0092] Among them, a is the control parameter, and its value is (0, ∞). Its chaotic orbit state value range is (-1, 1).
[0093] Although the Logistic chaotic mapping also has strong randomness and ergodicity, its parameter s takes values in (0, 4]. The larger s is, the better the chaos is. When s=4, it is in a completely chaotic state, and the chaotic orbit state range is (0, 1), that is, when s=4, the chaotic effect is the best. Therefore, from the security aspect, the parameter value is easily cracked, resulting in a greater probability of image tampering. Therefore, the present invention adopts a combination of the Chinese remainder theorem and ICMIC mapping to perform image mapping operations to improve the authentication effect.
[0094] According to the Chinese remainder theorem formula, a k is a positive integer, m k are mutually prime positive integers, set as follows:
[0095]
[0096] Among them, a1=a2=a3 is the gray value of the image block, and a variable t is sent from the sender to the receiver. Then, six prime numbers are selected from small to large in the interval (t, t+8]. If there are no six prime numbers in this interval, the interval range is continuously expanded to find six prime numbers from small to large in (t, t+16] until six prime numbers are found; every three prime numbers are a group, that is, m1, m2, m3 are a group, and are substituted into the above formula to obtain a unique value x1; m4, m5, m6 are a group, and are substituted into the above formula to obtain a unique value x2; x1 and x2 are substituted into the ICMIC mapping as variables in turn, and two final different mapping relationships t1 and t2 are formed; the mapping relationship t1 is used as the image block mapping operation in step 4, and the mapping relationship t2 is used as the image block mapping operation in step 46.
[0097] Kim et al., 2018, proposed a new distortion-reducing embedding framework called skewed histograms using a pair of extreme predictions. Unlike the traditional prediction error histogram scheme that uses only one prediction, the proposed scheme uses a pair of extreme predictions to generate two skewed histograms. By exploiting the structure of the skewed histogram, only pixels from the peak and short tail are used for embedding, which reduces the distortion due to the smaller number of pixels being moved. The skewed histogram uses neighboring pixel values to embed the predictor as a pair of Conduct an assessment ( is the predicted value of the positive histogram, is the negative histogram prediction value). First, the four adjacent pixel values {N, W, S, E} (i.e., the four pixels above, below, left and right of the predicted pixel P) are sorted in ascending order: x1≤x2≤x3≤x4, and it is stipulated that See also Figure 4 , In addition, to avoid double embedding near 0, the following equation is used to ensure that the predicted value pairs are never equal, and using the following formula has no effect on reversibility because it is done after prediction and before embedding:
[0098]
[0099] After that, positive histogram shift (PHS) embedding is used, followed by negative histogram shift (NHS) embedding. In addition, pixels with less distortion are selected for embedding based on local complexity. Generally speaking, the smaller the value, the smoother the pixel, that is, the more embeddable it is. Therefore, pixels with smaller local complexity values are embedded first. The local complexity formula is as follows:
[0100] C(p)=|NW|+|WS|+|SE|+|WE|+|NS|+|NE| (10)
[0101]
[0102] However, since the blocks of the image in the present invention are not regular squares, very few blocks are triangles, and most of them are trapezoids, different local complexity calculations are performed on the blocks of the two shapes:
[0103] For a triangle, the shape is relatively regular, and each pixel has relatively complete pixels above, below, left, and right. Therefore, the C(P) method can be used for complexity calculation. If the predicted values are less than 4, the existing predicted values are used for calculation and divided by the corresponding number of predicted values.
[0104] For a trapezoid, the shape is similar to the figure below. Most of the target pixels have only three adjacent pixels. Therefore, if the above C(P) is used, the complexity calculation will be inaccurate and will not meet the requirements. The number of adjacent pixels in the image is calculated by the new complexity calculation formula:
[0105]
[0106] After calculating different local complexities for blocks of different shapes, they are embedded in the order of local complexity from small to large (the pixel value at the intersection of quadrants is used for the lower quadrant). First, the first tilt prediction error histogram is Using PHS
[0107] Embed a bit into p:
[0108]
[0109] Where b1 is the first embedded authentication watermark and p' is the watermarked pixel. A bit is embedded only when the prediction error is 0 and other pixels are shifted by 1 bit when the prediction error is positive. Second skewed prediction error histogram Use NHS to embed one bit into p':
[0110]
[0111] Where b2 is the watermark embedded for the second time, and p' is the pixel watermarked for the second time. Only when the prediction error is 0, 1 bit is embedded, and if the prediction error is negative, the other pixels are shifted. Since PHS modifies the pixel value to 0 or +1, and NHS modifies the pixel value to 0 or -1, the pixel value is modified by at most ±1.
[0112] For extraction and recovery, the steps starting from embedding are performed in reverse order, and the following formulas can be used to extract watermarks b1 and b2:
[0113]
[0114] Then, the pixel p is recovered using the following formula:
[0115]
[0116] Step 5: Calculate the LBP value for the black area of each image block in step 2 and generate a 2-bit authentication watermark. Together with the 6-bit authentication watermark generated in the quadrant where the image block is located, a total of 8-bit authentication watermark is generated as the authentication watermark generated for the black area of the image block, and a 4-bit authentication watermark for the black area of the image block is obtained by compression.
[0117] Step 6: The 4-bit authentication watermark of the black area of each image block is embedded into the black area of each image block itself through the improved tilted histogram algorithm. The Chinese remainder theorem and ICMIC mapping are combined to perform mapping operations on each image block. The mapping relationship is t2. The 4-bit authentication watermark of the black area of each image block is embedded into the black area of the corresponding image block through the tilted histogram algorithm. If the image block can embed a large amount of watermark, the 4-bit authentication watermark is embedded repeatedly until the image block is full. The operation of the black area is the same as that of the white area, and no further description is given here.
[0118] Step 7: Combine the image blocks embedded in step 4 and step 6 to obtain the final watermarked image I'.
[0119] The present invention also includes a watermark extraction and authentication method, which is an inverse process of embedding, and participates in Figure 2 , specifically including the following steps:
[0120] Step 1: Divide the watermarked image I' into eight quadrants. The pixel values at the intersection of the quadrants are used for the lower quadrant. Perform SIFT transformation in each quadrant. In the inscribed circle of each quadrant, calculate the distance from the feature point to the image centroid and convert it into a binary number. Take the first 6 bits of the binary number as the first part of the authentication watermark ac of the quadrant. t ', receive the parameter t sent by the sender.
[0121] Step 2: Divide the image divided into eight quadrants into a chessboard shape, and use the image centroid as the base point to divide it into squares with a side length of 10. Then, expand the side length of the existing square to 14. After that, the side length of each divided square is 4 larger than the previous one until the entire image is divided, forming 8 triangular watermarked image blocks and several trapezoidal watermarked image blocks, referred to as watermarked image blocks.
[0122] Step 3: Calculate the LBP value for the black area of each watermarked image block in step 2 and generate a 2-bit authentication watermark ac l ', and the first part of the authentication watermark ac t 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate authentication watermark AC hs .
[0123] Step 4: Use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t2. Calculate the local complexity of the black area of each watermarked image block. Extract the authentication watermark AC in the black area of the corresponding watermarked image block after the current watermarked image block is mapped through the inverse process of the tilted histogram algorithm. ht .
[0124] Step 5: Generate the authentication watermark AC in step 3 hs The authentication watermark AC extracted in step 4 ht If the two are the same, it means that the black area of the watermarked image block is correct for the first comparison. If the black area of the current watermarked image block is tampered with, the white area of the watermarked image block is directly mapped to the corresponding white area of the watermarked image block for watermark extraction AC Bt , the mapping relationship of the white area mapping is t1; then extract the watermark AC of the white area of the watermarked image block Bt ', compare the two, if they are different, the white area of the watermarked image block has been tampered with, if they are the same, it has not been tampered with.
[0125] Step 6: If the black area of the watermarked image block is correct after the first comparison, continue to extract the watermark AC embedded in the black area of the watermarked image block through the inverse process of the tilted histogram algorithm ht '; If AC ht 'With AC hs If they are the same, it means that the black area of the watermarked image block has not been tampered with, otherwise, this area has been tampered with.
[0126] Step 7: After the authentication of the black area of each watermarked image block is completed, the above operation is performed again on the white area of each watermarked image block to calculate the LBP value of the white area of each watermarked image block and generate a 2-bit authentication watermark, which is combined with the first part of the authentication watermark act 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate white block authentication watermark AC bs ; Calculate the local complexity of the white area of each watermarked image block, and use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t1. The authentication watermark AC in the white area of the corresponding watermarked image block after the current watermarked image block is mapped is extracted through the inverse process of the tilted histogram algorithm. bt , A.C. bs and AC bt If the comparison is the same, it means that the first comparison of the white area of the watermarked image block is correct; then the watermark AC is extracted from the white area of the watermarked image block that is correct in the first comparison. bt ', with AC bt Make a comparison, if they are the same, they have not been tampered with; if they are different, they have been tampered with.
[0127] Step 8: Use the SP box inverse operation to restore the untampered extracted watermark to obtain 8-bit watermark information.
[0128] In the inverse process of the inclined histogram algorithm, when calculating the local complexity of the black area and the white area of each watermarked image block, the local complexity of the image block is calculated according to the predicted pixel value, and the extraction order is determined according to the size of the local complexity. For the trapezoidal watermarked image block, when calculating the local complexity of the predicted pixel, the three adjacent pixels are used to calculate the local complexity. For the triangular watermarked image block, when calculating the local complexity of the predicted pixel, the upper, lower, left and right pixels are used to calculate the local complexity. For details, please refer to the above content.
[0129] Since feature points and mass points are used to generate authentication watermarks during embedding, the following rare cases may occur during tampering detection (taking the black area of the watermarked image block as an example):
[0130] Signs of tampering include:
[0131] Case 1: If the feature points selected in the watermark image after the tampering attack are exactly the same as the feature points selected in the original watermark image, it means that the black area pixels in the watermarked image block are attacked, resulting in different authentication watermark comparisons.
[0132] (1) Extract the authentication watermark AC ht Restore the authentication watermark through the inverse operation of the SP box: the watermark ac generated by the original quadrant area t The black area of the original image block generates a watermark ac l .
[0133] (2) By comparing ac t and ac t ', acl and ac l ', found ac t With ac t 'same, and ac l and ac l ' is different because the black area pixels in the image block are attacked, making ac l and ac l ' is different, which ultimately leads to different authentication watermark comparisons.
[0134] Case 2: The feature points selected in the watermark image after the tampering attack are slightly different from the feature points selected in the original watermark image. If the feature points are tampered with, the original feature point information may be lost, and new feature points may be generated in the inscribed circle of the quadrant. It is also possible that the image is attacked and the feature points in the inscribed circle of the quadrant are lost (according to the previous description, if no feature points are detected, the default feature area watermark is 000000), so that no feature points are generated in the inscribed circle.
[0135] (1) According to the variable t, if t is an even number, it means that the feature point and the centroid do not coincide (normal judgment). ht Restore the authentication watermark through the inverse operation of the SP box: the watermark ac generated by the original quadrant t Generate watermark ac with the original black block l By comparing ac t and ac t ', ac l and ac l ', found ac t With ac t ' is different, it means that the feature point has been tampered with, resulting in a different authentication watermark comparison.
[0136] A. If the newly generated watermark ac t ' is 000000, and ac t If it is not 000000, it means that after the feature points in this area are attacked, no new feature points will be generated in this area.
[0137] B. If the newly generated watermark ac t ' is not 000000, but ac t If it is not 000000, it means that after the feature point in this area is attacked, a new feature point is generated. Then find the feature point that meets the threshold in the inscribed circle, calculate its distance to the centroid in turn, and extract the first six digits and ac t 'Compare, if they are the same, it means that the original feature point is replaced by this feature point.
[0138] C. If the newly generated watermark ac t ' is not 000000, but ac t000000. This means that no feature points were generated in this area of the original image, but new feature points were generated in this area after the attack.
[0139] (2) According to the variable t, if t is an odd number, it means that one of the feature points coincides with the centroid (the probability is very small, which is an abnormal judgment). ht The authentication watermark is restored by the inverse operation of the SP box, and the watermark ac generated by the original quadrant t Generate watermark ac with the original black block l By comparing ac t and ac t ', ac l and ac l ', found ac t With ac t ' is different, it means that the feature point has been tampered with, resulting in a different authentication watermark comparison.
[0140] A. Since the centroid is equal to one of the feature points, when the centroid has not been tampered with, the situation is the same as Class A above.
[0141] B. If the centroid is attacked, the distance from any feature point in the image to the centroid will be changed, and the centroid will be directly determined to be changed. Because the feature points are scattered in each quadrant, if an attack tampers with all feature points at the same time, then such an attack is visible to the naked eye, and there is no meaning in tampering with the positioning.
[0142] The simulation experiment is carried out below. This simulation experiment is based on Windows 10 system and uses Matlab simulation. The PSNR (peak signal-to-noise ratio) value and SSIM (structural similarity) are used to measure the visual quality of the image after embedding information, and the tampering detection accuracy and correct detection rate (CR) are used to evaluate the authentication performance of the method of the present invention. block represents the number of tampered blocks detected correctly, T block Indicates the actual number of tampered blocks.
[0143]
[0144] The present invention Figure 6The seven original images shown are used as carriers, and the PSNR and SSIM values of the seven watermark images obtained by embedding the authentication watermark into the image are compared with the Kim algorithm (Kim S, Qu X, Sachnev V, et al. Skewed histogram shifting for reversible data hiding using a pair of extreme predictions [J]. IEEE Transactions on Circuits and Systems for Video Technology, 2018, 29 (11): 3236-3246). It can be seen from Table 1 that the PSNR values of some images are slightly higher than those of the Kim algorithm. This is because the division of image blocks in the present invention is relatively special, and the shape of most blocks is trapezoidal. If the four-domain or eight-domain prediction method is still used for local complexity calculation, it will affect the order when embedding the watermark, thereby reducing the embedding capacity. The local complexity set for the trapezoidal block in the present invention is more suitable for the trapezoidal block, so the impact on the embedding capacity is lower. Compared with the Kim algorithm, their SSIM values are also higher. It shows that the structural similarity between the watermark image and the original image is high, and there is no great difference. It is generally believed that the PSNR value of the visual quality of the watermark image should not be less than 30dB, and its visual quality is acceptable. Therefore, the experimental results show that the algorithm of the present invention can achieve a higher tampering detection effect while ensuring the visual quality of the watermark image within an acceptable range in the following images.
[0145] Table 1 Comparison of PSNR and SSIM values
[0146]
[0147] In order to test the authentication effect of this algorithm, the present invention respectively performs Gaussian filtering, salt and pepper noise, Gaussian noise, median filtering, and shearing attack on the image embedded with the authentication watermark. The reliability of the extracted watermark bits is calculated using the watermark similarity (NC), and the correct tampering detection rate (CR) is used to evaluate the tampering effect.
[0148] Table 2 Watermark similarity (NC) comparison
[0149]
[0150]
[0151] In Table 2, Ansari algorithm refers to the public algorithm of Prasad S, Pal A KA tamper detection suitable fragile watermarking scheme based on novel payload embedding strategy[J].Multimedia Tools and Applications, 2020, 79(3):1673-1705, and Liu Chunyang algorithm refers to the public algorithm of Liu Chunyang, Wang Yiyan, Yuan Huilong. Design and implementation of image fragile watermarking system based on spatial domain[J].Fujian Computer, 2016, 32(06):25-26.
[0152] The tampering detection effect of the image can be explained by the correct detection rate CR. After the present invention attacks the above-mentioned image, the average correct tampering detection rate is 96.53%. In Zhang Chunyan's algorithm (Research on Tampering Image Recognition Technology Based on SIFT Algorithm [D]. Shenyang Ligong University, 2020), SIFT-SVD checks the local image descriptor through SIFT and uses singular value decomposition. First, the key points are collected through SIFT transformation, and represented by 128-dimensional descriptor vectors and their positions (rows, columns, scales, directions). The similarity matrix and the singular value decomposition neighbor matrix are calculated, and the results of the two matrices are fused and matched to identify the repeated area. SIFT-LAB combines the SIFT algorithm with the CIE Lab color space of the image to improve the accuracy and operation efficiency of feature point matching. Since SIFT transformation has a certain robustness to slight changes in illumination, noise and viewpoint, and SVD has a good feature extraction capability, the LAB color space is more stable than the RGB color space feature. Therefore, the overall effect of SIFT-LAB and SIFT-SVD is about 92%. However, since the present invention not only uses SIFT transformation to collect feature information as the authentication watermark, but also divides the image into black and white blocks to calculate the LBP value as the second part of the authentication watermark, the two watermarks are combined as the authentication watermark, which is more in line with the image characteristics, and a block is divided into black and white parts, and both black and white are subjected to secondary detection to improve the tampering accuracy, so the tampering detection effect will be better than Zhang Chunyan's algorithm. In the literature (Hsu, CS, Tu, SFProbability-based tampering detection scheme for digital images. Opt. Commun, 2010, 1737-1743), in the image tampering detection process, the image is divided into overlapping blocks, and then the feature value of the image, that is, the most significant bit (MSB), is extracted block by block. Then, the feature value, block coordinates, user ID and user secret key SK are used to generate a hash value through the MD5 hash function. Then, a folding operation is used to generate an authentication message, and although the present invention also uses multiple methods to generate an authentication watermark and conducts secondary detection on the image. However, compared with the Hsu algorithm, the method adopts probability theory and information compression method to improve the previously obtained detection results, avoid misjudgment, and better improve the authentication accuracy, so the tampering detection accuracy is better than the present invention.Chang algorithm (Chang CC, Hu Y, Lu T. A watermarking-based image ownership and tampering authentication scheme. Pattern Recog-nit. 2006, 27, 439–446) embeds the identity authentication data of the image into the adaptive least significant bit of the pixel, and the number of the least significant bits will be determined according to the type of the corresponding block. The quality of the embedded image is very high, and the position of the tampered part is correctly located. Lin algorithm (Lin P, Hsieh H. A hierarchical digital water-marking method for image tamper detection and recovery. Pattern Recognit. 2005, 38, 2519–2529) is based on a three-layer structure, so the accuracy of tampering positioning can be ensured. If the tampered block is not detected in the level 1 inspection, it will be detected with a probability close to 1 in the level 2 or level 3 inspection. The present invention only uses two layers of detection and is not based on the third layer of detection, so the detection result is slightly lower than the Lin algorithm. The Chang algorithm only embeds the identity authentication data into the least significant bit and does not have secondary authentication, so the detection effect is slightly higher than the Chang algorithm. The document
[18] (Benrhouma, Oussama, Houcemeddine Hermassi, Safya Belghith. Tamper detection and self-recovery scheme by DWT watermarking. Nonlinear Dynamics 2015: 1817-1833.) is a tamper detection algorithm based on cat face mapping and discrete wavelet decomposition. This algorithm is vulnerable to any tampering and does not use the authentication watermark generated based on the characteristics of the image itself. In addition, cat face mapping has a certain degree of security. The present invention uses the Chinese remainder theorem combined with ICMIC mapping to correspond blocks to blocks, so it is better than the Hsu algorithm in tamper detection.
[0153] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A tampering localization reversible watermarking method based on SIFT and quadrant segmentation, characterized in that: It includes a watermark embedding method, and the specific steps are as follows: Step 1: Given an 8-bit grayscale image I(i, j) of M×N, where 0 < I(i, j) < 255, divide it into eight quadrants. The pixel values at the intersections of the quadrants are used for the lower quadrants. Perform SIFT transformation on each quadrant. In the inscribed circle of each quadrant, select a feature point according to different thresholds. Calculate the distance from the feature point to the centroid of the image and convert it into a binary number. Take the first 6 bits of the binary number as the first part of the authentication watermark for the quadrant. According to the coincidence situation between the feature point and the centroid, the sender sends the variable t to the receiver; Step 2: Divide the image divided into eight quadrants into a checkerboard pattern, and with the center of the image as the base point, divide squares with a side length of 10. Then, on the basis of the existing squares, expand the side length to 14. After that, the side length of each divided square is 4 larger than the previous one until the entire image is divided, forming 8 triangular image blocks and several trapezoidal image blocks, simply referred to as image blocks; Step 3: Calculate the LBP value for the white area of each image block in Step 2 and generate a 2-bit authentication watermark. Combine it with the 6-bit authentication watermark generated by the quadrant where this image block is located to generate a total of 8-bit authentication watermark as the authentication watermark generated by the white area of this image block, and obtain a 4-bit authentication watermark for the white area of this image block through compression; Step 4: Embed the 4-bit authentication watermark of the white area of each image block into the white area of each image block itself through the inclined histogram algorithm. Then, perform a mapping operation on each image block by combining the Chinese Remainder Theorem and ICMIC mapping. The mapping relationship is t1. Embed the 4-bit authentication watermark of the white area of each image block into the white area of the corresponding mapped image block through the inclined histogram algorithm; Step 5: Calculate the LBP value for the black area of each image block in Step 2 and generate a 2-bit authentication watermark. Combine it with the 6-bit authentication watermark generated by the quadrant where this image block is located to generate a total of 8-bit authentication watermark as the authentication watermark generated by the black area of this image block, and obtain a 4-bit authentication watermark for the black area of this image block through compression; Step 6: Embed the 4-bit authentication watermark of the black area of each image block into the black area of each image block itself through the improved inclined histogram algorithm. Perform a mapping operation on each image block by combining the Chinese Remainder Theorem and ICMIC mapping. The mapping relationship is t2. Embed the 4-bit authentication watermark of the black area of each image block into the black area of the corresponding mapped image block through the inclined histogram algorithm; Step 7: Combine the image blocks after embedding in Step 4 and Step 6 to obtain the final watermarked image I'.
2. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 1 is characterized in that: The different thresholds in Step 1 represent the distance from the centroid of the image. When selecting a feature point, if there are multiple in the inscribed circle, select them in the order from top to bottom and from left to right; if there is no feature point in the quadrant area, the feature watermark generated by the quadrant area is 000000. If the feature point in the quadrant area is the centroid of the image, that is, the distance is 0, the watermark is also 000000. It is distinguished by sending the variable t. If t is even, it means that the centroid does not coincide with the feature point; if t is odd, it means that the centroid coincides with one of the feature points.
3. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 1 is characterized in that: In step 3 and step 5, the LBP value is calculated for the white area and the black area of the image block and a 2-bit authentication watermark is generated, specifically: For the white area of each image block, the LBP value is calculated. The pixel values in the black area are first averaged and rounded down. The pixels in each white area are compared with the average value. If they are greater than the average value, they are recorded as 1, otherwise they are recorded as 0. According to the different sizes of each image block, the length of the generated binary number is also different. The middle two bits of this string of binary numbers are selected as the LBP value of the image block. If the length X is an even number, the (X / 2-1)th and (X / 2)th bits are selected; if the length X is an odd number, the {(X-1) / 2}th and {(X+1) / 2}th bits are selected. The method for calculating the LBP value of the black area is the same as that of the white area.
4. The tampering localization reversible watermarking method based on SIFT and quadrant blocking according to claim 1 is characterized in that: In step 4 and step 6, if the amount of watermark that can be embedded in the image block is large, after executing steps 4 and 6 to embed the 4-bit authentication watermark, the 4-bit authentication watermark is repeatedly embedded until the image block is fully embedded.
5. The tampering localization reversible watermarking method based on SIFT and quadrant blocking according to claim 1 is characterized in that: When the authentication watermark is compressed in step 3 and step 5, the SP box is used for compression. The specific process is as follows: Assume that the input authentication watermark A=a1a2a3a4a5a6a7a8, let a3a4a5a6=k, a1a2a7a8=h, the numbers in each row and column of the SP box are randomly generated in the range of 0 to 15, and a number B is found in the h row and k column of the SP box. In binary, B=b1b2b3b4, then b1b2b3b4 is the output of the SP box.
6. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 1 is characterized in that: The original inclined histogram algorithm is improved. The inclined histogram algorithm calculates the local complexity of the image block according to the predicted pixel value, and determines the embedding order according to the size of the local complexity. For the trapezoidal image block, when calculating the local complexity of the predicted pixel, the local complexity is calculated using three adjacent pixels. The local complexity calculation formula is: For triangular image blocks, when calculating the local complexity of predicted pixels, the upper, lower, left and right pixels are used to calculate the local complexity. The local complexity calculation formula is: C(P)=|NW|+|WS|+|SE|+|WE|+|NS|+|NE| Among them, P is the predicted pixel, and the four adjacent pixels are {N, W, S, E}, that is, the four pixels above, below, left and right of the predicted pixel P. The predicted pixel P in the trapezoidal image block has only 3 adjacent pixels, which are set as {W, S, E} here.
7. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 2 is characterized in that: In step 4 and step 6, the Chinese remainder theorem and ICMIC mapping are combined to perform mapping operations on each image block. The specific operations are as follows: According to the Chinese remainder theorem formula, a k is a positive integer, m k are mutually prime positive integers, set as follows: Among them, a1=a2=a3 is the gray value of the image block, and a variable t is sent from the sender to the receiver. Then, six prime numbers are selected from small to large in the interval (t, t+8]. If there are no six prime numbers in this interval, the interval range is continuously expanded, and six prime numbers from small to large are searched in (t, t+16] until six prime numbers are found; every three prime numbers are grouped, that is, m1, m2, and m3 are grouped and substituted into the above formula to obtain a unique value x1; m4, m5, and m6 are grouped and substituted into the above formula to obtain a unique value x2; x1 and x2 are substituted into the ICMIC mapping as variables in turn, and two final different mapping relationships t1 and t2 are formed; the mapping relationship t1 is used as the image block mapping operation in step 4, and the mapping relationship t2 is used as the image block mapping operation in step 46; The mathematical expression of ICMIC mapping is as follows: x i+1 =sin(ax i ) Among them, a is the control parameter, which takes the value of (0, ∞), and its chaotic orbit state value range is (-1, 1).
8. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 7 is characterized in that: It also includes a watermark extraction and authentication method, which specifically includes the following steps: Step 1: Divide the watermarked image I' into eight quadrants. The pixel values at the intersection of the quadrants are used for the lower quadrant. Perform SIFT transformation in each quadrant. In the inscribed circle of each quadrant, calculate the distance from the feature point to the image centroid and convert it into a binary number. Take the first 6 bits of the binary number as the first part of the authentication watermark ac of the quadrant. t ', receive the variable t sent by the sender; Step 2: The image divided into eight quadrants is further divided into a chessboard shape, and the center of the image is used as the base point to divide the square with a side length of 10. Then, the side length of the existing square is expanded to 14. After that, the side length of each divided square is 4 larger than the previous one until the entire image is divided, forming 8 triangular watermarked image blocks and several trapezoidal watermarked image blocks, referred to as watermarked image blocks; Step 3: Calculate the LBP value for the black area of each watermarked image block in step 2 and generate a 2-bit authentication watermark ac l ', and the first part of the authentication watermark ac t 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate authentication watermark AC hs ; Step 4: Use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t2. Calculate the local complexity of the black area of each watermarked image block. Extract the authentication watermark AC in the black area of the corresponding watermarked image block after the current watermarked image block is mapped through the inverse process of the tilted histogram algorithm. ht ; Step 5: Generate the authentication watermark AC in step 3 hs The authentication watermark AC extracted in step 4 ht Compare them. If the two are the same, it means that the black area of the watermarked image block is correct in the first comparison. Step 6: If the black area of the watermarked image block is correct after the first comparison, continue to extract the watermark AC embedded in the black area of the watermarked image block through the inverse process of the tilted histogram algorithm ht '; If AC ht 'With AC hs If they are the same, it means that the black area of the watermarked image block has not been tampered with, otherwise, this area has been tampered with; Step 7: After the authentication of the black area of each watermarked image block is completed, the above operation is performed again on the white area of each watermarked image block to calculate the LBP value of the white area of each watermarked image block and generate a 2-bit authentication watermark, which is combined with the first part of the authentication watermark ac t 'Combined to form a total of 8-bit authentication watermark, compressed by SP box, generate white block authentication watermark AC bs ; Calculate the local complexity of the white area of each watermarked image block, and use the Chinese remainder theorem and ICMIC mapping to map each watermarked image block. The mapping relationship is t1. The authentication watermark AC in the white area of the corresponding watermarked image block after the current watermarked image block is mapped is extracted through the inverse process of the tilted histogram algorithm. bt , A.C. bs and AC bt If the comparison is the same, it means that the first comparison of the white area of the watermarked image block is correct; then the watermark AC is extracted from the white area of the watermarked image block that is correct in the first comparison. bt ', with AC bt Make a comparison, if they are the same, they have not been tampered with; if they are different, they have been tampered with.
9. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 8 is characterized in that: If the black area of the current watermarked image block is tampered with in step 5, the white area of the watermarked image block is directly mapped to the corresponding white area of the watermarked image block to extract the watermark AC. Bt , the mapping relationship of the white area mapping is t1; then extract the watermark AC of the white area of the watermarked image block Bt ', compare the two, if they are different, the white area of the watermarked image block has been tampered with, if they are the same, it has not been tampered with.
10. The tampering localization reversible watermarking method based on SIFT and quadrant segmentation according to claim 9 is characterized in that: When calculating the local complexity of the black area and the white area of each watermarked image block, the local complexity of the image block is calculated according to the predicted pixel value, and the extraction order is determined according to the size of the local complexity. For the trapezoidal watermarked image block, when calculating the local complexity of the predicted pixel, the local complexity is calculated using three adjacent pixels. The local complexity calculation formula is: For the triangular watermarked image block, when calculating the local complexity of the predicted pixel, the upper, lower, left and right pixels are used to calculate the local complexity. The local complexity calculation formula is: C(P)=|NW|+|WS|+|SE|+|WE|+|NS|+|NE| Among them, P is the predicted pixel, and the four adjacent pixels are {N, W, S, E}, that is, the four pixels above, below, left and right of the predicted pixel P. The predicted pixel P in the trapezoidal image block has only 3 adjacent pixels, which are set as {W, S, E} here.