Zero watermarking method based on image contour features

Through the zero watermark method based on image contour features, the canny operator and Arnold mess are used to generate zero watermark images, and the convolutional neural network ExCNN is designed for verification, which solves the problem of inconsistent features of the host image under attack, and achieves high robustness and high fidelity copyright verification.

CN120339029APending Publication Date: 2025-07-18XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510303683.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

When the host image is subject to conventional image processing and geometric attacks, existing zero watermark algorithms are difficult to provide image features consistent with zero watermark generation, affecting the accuracy of copyright verification.

Method used

Using the zero watermark method based on image contour features, the canny operator is used to generate the binary contour feature map of the host image, combined with the timestamp of the logo image and the Arnold confusion, a zero watermark image is generated through XOR exclusive OR operation, and a convolutional neural network ExCNN is designed for feature extraction and verification.

Benefits of technology

Improves the robustness and transparency of the zero watermark method, ensuring that copyright ownership can still be accurately verified under conventional image processing and geometric attacks, and the host image fidelity is higher than that of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339029A_ABST
    Figure CN120339029A_ABST
Patent Text Reader

Abstract

The invention discloses a zero watermark method based on image contour features. The method comprises two processes of zero watermark generation and copyright verification. Wherein the zero watermark generation process comprises the following steps of: obtaining a binary contour feature map of a host image by using a canny operator; adding a timestamp to the watermark logo map and then carrying out binarization processing; generating a zero-watermark image; designing and training a neural network ExCNN for extracting a binary contour feature map; and finally, registering and storing the zero-watermark image and the neural network ExCNN in a copyright protection center on a specified date. The copyright verification process comprises the following steps: firstly, extracting a convolutional neural network ExCNN and a zero-watermark image from a copyright protection center; and finally, carrying out inverse scrambling on the scrambled logo image to obtain a logo image, calculating an NC value, and verifying the copyright attribution according to the NC value. According to the method, the problem that in the copyright verification process of the host image, the host image subjected to conventional image processing and geometric attack is difficult to provide image features consistent with those in zero watermark generation is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of information security, and particularly relates to a zero-watermark method based on image contour features. Background Art

[0002] With the development of Internet technology, the transmission of digital information represented by digital images has become more and more widespread, and its copyright protection has become particularly important. The watermark algorithm can track images by embedding invisible copyright identification information in images, so as to prove the ownership of images, prevent digital image theft and tampering.

[0003] Current digital image watermark algorithms can be divided into two categories: zero-watermark algorithms and non-zero-watermark algorithms. Among them, zero-watermark algorithms have attracted much attention because they do not embed watermark information into the host image, do not reduce the quality of the host image, and can ensure the fidelity of the host image. The traditional zero-watermark algorithm binarizes the robust features of the host image and then performs an exclusive OR operation with the logo image to generate a zero-watermark image, and stores the generated zero-watermark image in the copyright protection center; when the copyright of the host image needs to be verified, the robust features of the host image are extracted and binarized, and an exclusive OR operation is performed with the zero-watermark image in the copyright protection center to restore the logo image, that is, the copyright information. However, when the host image is subjected to conventional image processing and geometric attacks, the robust features of the host image will change, which will inevitably affect the result of the exclusive OR operation between it and the zero-watermark image in the copyright protection center during its copyright verification process, thus weakening or affecting the copyright protection of the zero-watermark algorithm for the host image. Summary of the Invention

[0004] The purpose of the present invention is to provide a zero-watermark method based on image contour features, which solves the problem that it is difficult for a host image subjected to conventional image processing and geometric attacks to provide image features consistent with those during zero-watermark generation during the copyright verification process of the host image.

[0005] The technical solution adopted by the present invention is that the zero-watermark method based on image contour features includes two processes: zero-watermark generation and copyright verification;

[0006] Among them, the zero-watermark generation process: obtaining a binary contour feature map of the host image using the canny operator; adding a timestamp to the watermark logo image and then performing binarization processing; respectively scrambling the binary contour feature map of the host image and the binary map of the logo, and then performing an XOR operation to generate a zero-watermark image; designing and training a neural network ExCNN for extracting the binary contour feature map; finally registering and storing the zero-watermark image and the neural network ExCNN in the copyright protection center on a specified date;

[0007] Copyright verification process: First, the convolutional neural network ExCNN and the zero-watermark image are retrieved from the copyright protection center; the image whose copyright needs to be verified is input into the convolutional neural network ExCNN, and the extracted binary contour feature map is scrambled and then XOR-operated with the zero-watermark image retrieved from the copyright protection center to obtain a scrambled logo image, and finally, it is inverse-scrambled to obtain the logo image, and the NC value is calculated, and the copyright ownership is verified according to its value.

[0008] The features of the present invention also lie in:

[0009] Step 1, use the canny operator to generate a binary host contour feature map of the host image;

[0010] Step 2, load a timestamp for the logo image and perform binarization to obtain a binary logo image;

[0011] Step 3, respectively perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 to obtain a scrambled contour map and a scrambled logo map;

[0012] Step 4, perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it in the copyright protection center at a specified time point;

[0013] Step 5, design and train the convolutional neural network ExCNN;

[0014] Step 6, at a specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together in the copyright protection center;

[0015] Step 7, input the image whose copyright needs to be verified into the ExCNN network obtained in Step 6 to obtain a binary contour feature map of the image and scramble it;

[0016] Step 8, perform an XOR operation on the binary contour scrambled map obtained in Step 7 and the zero-watermark image registered in the copyright protection center to obtain a scrambled image of the logo;

[0017] Step 9, perform an inverse-scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image according to this value.

[0018] Step 1 is specifically as follows:

[0019] Step 1.1, use a Gaussian filter to smooth the host image to remove noise and reduce edge jitter;

[0020] Step 1.2, for the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction;

[0021] Step 1.3: According to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima, suppress the pixel values of non-maxima, and refine the detected edges.

[0022] Step 1.4: Use double-threshold processing on the edge pixel values obtained in Step 1.3 to obtain a binary contour feature map of the host image; the two thresholds are T h , T l .

[0023] Specifically, Step 1.4 is as follows:

[0024] Step 1.4.1: If the edge pixel value obtained in Step 1.3 is greater than the threshold T h , it is considered a strong edge and is represented by '1';

[0025] Step 1.4.2: If the edge pixel value obtained in Step 1.3 is lower than the threshold T l , it is considered a non-edge and is represented by '0';

[0026] Step 1.4.3: For pixels between T h and T l , pixels connected to strong edges are represented by '1'; pixels connected to non-edges are represented by '0', thus obtaining a binary contour feature map.

[0027] Specifically, Step 2 is as follows:

[0028] Step 2.1: Load the expected time of zero-watermark registration at the copyright center into the logo image;

[0029] Step 2.2: If it is a color logo, use formula (1) to convert the color logo image into a grayscale image;

[0030] I(x,y) = 0.299×R(x,y) + 0.587×G(x,y) + 0.114×B(x,y) (1)

[0031] where I(x,y) represents the pixel value at (x,y) in the grayscale image, R(x,y) represents the pixel value at (x,y) in the red channel of the color logo image, G(x,y) represents the pixel value at (x,y) in the green channel of the color logo image, and B(x,y) represents the pixel value at (x,y) in the blue channel of the color logo image;

[0032] Step 2.3: Obtain the optimal threshold T by calculating the between-class variance, and then compare the pixel value I(x,y) of each pixel in the logo image according to formula (2) to binarize the logo image:

[0033]

[0034] Among them, B(x, y) represents the pixel value at the (x, y) position of the binarized logo image, and I(x, y) represents the pixel value at the (x, y) position of the grayscale logo image

[0035] Step 5 is specifically as follows:

[0036] Step 5.1, construct the convolutional neural network ExCNN structure;

[0037] Step 5.2, construct the training set T1 of the ExCNN network:

[0038] Step 5.3, design the loss function of the ExCNN network:

[0039] Step 5.4, continuously optimize the parameters of the ExCNN network through iterative loops until the loss function tends to be stable, that is, the change in the loss value is not greater than 0.001, and end the training of the ExCNN network.

[0040] In Step 5.1:

[0041] The constructed convolutional neural network ExCNN consists of 10 convolutional layers and 2 residual block layers. The specific structure of each layer of the network is as follows: The first layer includes the following structure: a convolutional layer (conv) composed of 64 convolutional kernels, a normalization layer (BM), an activation function, and a max pooling layer (maxpooling); The second and third layers have the same structure, including the following structure: a convolutional layer composed of 64 convolutional kernels, a normalization layer, and an activation function; The fourth and fifth layers have the same structure, including the following structure: a convolutional layer composed of 128 convolutional kernels, a normalization layer, and an activation function; The sixth and seventh layers are both convolutional residual block layers, and each residual block contains two convolutional layers composed of 128 convolutional kernels, a normalization layer, and an activation function; The eighth and ninth layers have the same structure, including the following structure: a convolutional layer composed of 256 convolutional kernels, a normalization layer, and an activation function; The tenth and eleventh layers have the same structure, including the following structure: a convolutional layer composed of 512 convolutional kernels, a normalization layer, and an activation function; The twelfth layer uses a 3×3 convolutional kernel and a sigmod activation function to generate the final contour feature map;

[0042] In the constructed convolutional neural network ExCNN, the size of the convolutional kernels of all convolutional layers is 3×3, the stride of the convolutional kernels is 1, and except for the last layer which uses the sigmod activation function, the relu activation function is used for all other activation functions;

[0043] Step 5.2 is specifically as follows:

[0044] Step 5.2.1, select X images from the waterloo dataset as the training set T1 of the ExCNN network, and normalize these images to the size of M × N;

[0045] Step 5.2.2: Process the images selected in Step 5.2.1 as follows: Use one or several of salt-and-pepper noise attack, rotation attack, cropping attack, compression attack, translation attack, and Gaussian noise attack to expand and enhance the number of images in training set T1.

[0046] Specifically, Step 5.3 is as follows:

[0047] Step 5.3.1: Set the learning target image.

[0048] The learning target image is the binary contour feature map of the host image, that is, the image obtained by extracting the host image with the canny operator without any attack.

[0049] Step 5.3.2: Calculate the loss function of the ExCNN network; the loss function is represented by the mean square error, and the specific calculation method is shown in formula (3)

[0050]

[0051] Among them, w represents the width of the host image, h represents the height of the host image, x(i, j) represents the pixel value at the (x, y) position of the output image of the ExCNN network, and y(i, j) represents the binary contour feature value at the (x, y) position of the host image.

[0052] Specifically, Step 9 is as follows:

[0053] Step 9.1: Perform an inverse Arnold transform on the image obtained in Step 8 to restore the logo image.

[0054] Step 9.2: Calculate the similarity between the logo image obtained in Step 9.1 and the logo image when generating the zero-watermark image, and obtain a similarity value NC according to formula (4). The expression is as follows:

[0055]

[0056] Among them, W (i,j) represents the pixel value at the (x, y) position of the original logo image, and W' (i,j) represents the pixel value at the (x, y) position of the logo image restored from the steps in the copyright verification process;

[0057] Step 9.3: Verify the copyright ownership according to the similarity value obtained in Step 9.2. When the NC value > 0.5, the host image belongs to the owner of the logo image used when generating the zero-watermark image.

[0058] The beneficial effects of the present invention are:

[0059] The zero-watermark method based on image contour features of the present invention not only has significantly higher robustness than traditional zero-watermark methods, but also higher than traditional non-zero watermark methods; in addition, since the host image of the present invention does not need to carry copyright logo information, the watermark is completely invisible, that is, the fidelity of the host image of the present invention is significantly better than that of the host image of the non-zero watermark method; compared with the existing watermark methods based on convolutional neural networks, in the watermark generation stage of the present invention, the canny operator is used to extract the binary contour features of the host image, and in the copyright verification stage, the powerful learning function of the convolutional neural network ExCNN is used to ensure that the extracted binary contour features are consistent with the binary features used in the watermark generation stage, thereby significantly improving the watermark robustness and transparency of the present invention. This method solves the problem that it is difficult for the host image affected by conventional image processing and geometric attacks to provide image features consistent with those at the time of zero-watermark generation during the copyright verification process of the host image. Brief Description of the Drawings

[0060] Figure 1 is the flowchart of the method of the present invention;

[0061] Figure 2 is the flowchart of zero-watermark generation in the method of the present invention;

[0062] Figure 3 is the structural diagram of the ExCNN network in the method of the present invention;

[0063] Figure 4 is the flowchart of copyright verification in the method of the present invention;

[0064] Figure 5 is the host image not under attack;

[0065] Figure 6 is extracted from Figure 5 by the ExCNN network;

[0066] Figure 7 is Figure 6 the scrambled binary contour feature map after Arnold scrambling;

[0067] Figure 8 is the Figure 9 required zero-watermark image saved in the copyright center;

[0068] Figure 9 is Figure 5 the finally restored logo image;

[0069] Figure 10 is the host image under compression attack;

[0070] Figure 11 is extracted from Figure 10The contour feature map extracted from

[0071] Figure 12 is Figure 11 The binary contour feature scrambled map after Arnold scrambling;

[0072] Figure 13 is the generated Figure 14 The zero-watermark image saved by the copyright center required;

[0073] Figure 14 is the finally Figure 10 Restored logo image;

[0074] Figure 15 is the host image under noise attack;

[0075] Figure 16 is the Figure 15 Contour feature map extracted from

[0076] Figure 17 is Figure 16 The binary contour feature scrambled map after Arnold scrambling;

[0077] Figure 18 is the generated Figure 19 The zero-watermark image saved by the copyright center required;

[0078] Figure 19 is the finally Figure 15 Restored logo image;

[0079] Figure 20 is the host image under rotation attack;

[0080] Figure 21 is the Figure 20 Contour feature map extracted from

[0081] Figure 22 is Figure 21 The binary contour feature scrambled map after Arnold scrambling;

[0082] Figure 23 is the generated Figure 24 The zero-watermark image saved by the copyright center required;

[0083] Figure 24 is the finally Figure 20 Restored logo image;

[0084] Figure 25 is the host image under scaling attack;

[0085] Figure 26 is theFigure 25 The contour feature map extracted from

[0086] Figure 27 is Figure 26 The scrambled binary contour feature map after Arnold scrambling;

[0087] Figure 28 is the generation Figure 29 The zero-watermark image saved by the copyright center required;

[0088] Figure 29 is the final Figure 25 Restored logo image;

[0089] Figure 30 The host image under translation attack;

[0090] Figure 31 is the contour feature map extracted from Figure 30 by using the ExCNN network;

[0091] Figure 32 is Figure 31 The scrambled binary contour feature map after Arnold scrambling;

[0092] Figure 33 is the generation Figure 34 The zero-watermark image saved by the copyright center required;

[0093] Figure 34 is the final Figure 30 Restored logo image. Specific implementation manner

[0094] The present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0095] The present invention provides a zero-watermark method based on image contour features, and the algorithm flow is as Figure 1As shown in the figure, it includes two processes: zero-watermark generation and copyright verification. Among them, in the zero-watermark generation process, the canny operator is used to obtain the binary contour feature map of the host image; the watermark logo image is added with a timestamp and then binary processed; the binary contour feature map of the host image and the binary map of the logo are scrambled respectively, and then through the XOR operation, a zero-watermark image is generated; a neural network ExCNN for extracting the binary contour feature map is designed and trained; finally, the zero-watermark image and the neural network ExCNN are registered and saved in the copyright protection center on the specified date; in the copyright verification process, first, the convolutional neural network ExCNN and the zero-watermark image are taken out from the copyright protection center; the image to be verified for copyright is input into the convolutional neural network ExCNN, and the extracted binary contour feature map is scrambled and then XOR-operated with the zero-watermark image taken out from the copyright protection center to obtain a scrambled logo image, and finally, its inverse scrambling is performed to obtain the logo image, and the NC value is calculated, and the copyright ownership is verified according to its value.

[0096] The zero-watermark generation process is as Figure 2 shown, and specifically includes the following steps:

[0097] Step 1, use the canny operator to generate the binary host contour feature map of the host image;

[0098] Step 1.1, use a Gaussian filter to smooth the host image to remove noise and reduce edge jitter;

[0099] Step 1.2, for the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction;

[0100] Step 1.3, according to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima and suppress the pixel values of non-maxima to refine the detected edges;

[0101] Step 1.4, use a double threshold (thresholds are T h , T l ) to process the edge pixel values obtained in Step 1.3 to obtain the binary contour feature map of the host image. The specific processing steps are as follows:

[0102] Step 1.4.1, if the edge pixel value obtained in Step 1.3 is greater than the threshold T h (T h = 117), it is considered a strong edge and is represented by '1';

[0103] Step 1.4.2, if the edge pixel value obtained in Step 1.3 is lower than the threshold T l (T l = 58), it is considered a non-edge and is represented by '0';

[0104] Step 1.4.3, between Th and T l For the pixels between them and the pixels connected to the strong edges, they are represented by '1'; for the pixels connected to non-edges, they are represented by '0', thus obtaining a binary contour feature map;

[0105] Step 2: Load the timestamp of the logo image and binarize it to obtain a binary logo image;

[0106] Step 2.1: Load the expected time registered by the zero watermark in the copyright center into the logo image;

[0107] Step 2.2: If it is a color logo, use formula (1) to convert the color logo image into a grayscale image;

[0108] I(x,y) = 0.299×R(x,y) + 0.587×G(x,y) + 0.114×B(x,y) (1)

[0109] where I(x,y) represents the pixel value at (x,y) of the grayscale image, R(x,y) represents the pixel value at (x,y) of the red channel of the color logo image, G(x,y) represents the pixel value at (x,y) of the green channel of the color logo image, and B(x,y) represents the pixel value at (x,y) of the blue channel of the color logo image;

[0110] Step 2.3: Obtain the optimal threshold T (T = 127) by calculating the between-class variance, and then compare the pixel value I(x,y) of each pixel of the logo image according to formula (2) to binarize the logo image:

[0111]

[0112] where B(x,y) represents the pixel value at (x,y) of the binarized logo image, and I(x,y) represents the pixel value at (x,y) of the grayscale logo image;

[0113] Step 3: Perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 respectively to obtain a scrambled contour map and a scrambled logo map;

[0114] Step 4: Perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero watermark image, and register and save it in the copyright protection center at a specified time point.

[0115] Step 5: Design and train the convolutional neural network ExCNN;

[0116] Step 5.1: Build the structure of the convolutional neural network ExCNN;

[0117] In step 5.1, the constructed convolutional neural network ExCNN consists of 10 convolutional layers and 2 residual block layers. The structure of each layer of the network is as Figure 3 shown: The first layer includes the following structure: a convolutional layer (conv) composed of 64 convolutional kernels, a normalization layer (BM), an activation function, and a max-pooling layer (maxpooling); The second and third layers have the same structure, including the following structure: a convolutional layer composed of 64 convolutional kernels, a normalization layer, and an activation function; The fourth and fifth layers have the same structure, including the following structure: a convolutional layer composed of 128 convolutional kernels, a normalization layer, and an activation function; The sixth and seventh layers are both convolutional residual block layers. Each residual block contains two convolutional layers composed of 128 convolutional kernels, a normalization layer, and an activation function; The eighth and ninth layers have the same structure, including the following structure: a convolutional layer composed of 256 convolutional kernels, a normalization layer, and an activation function; The tenth and eleventh layers have the same structure, including the following structure: a convolutional layer composed of 512 convolutional kernels, a normalization layer, and an activation function; The twelfth layer uses a 3×3 convolutional kernel and a sigmod activation function to generate the final contour feature map;

[0118] In the constructed convolutional neural network ExCNN, the size of the convolutional kernels of all convolutional layers is 3×3, and the stride of the convolutional kernels is 1. Except for the last layer which uses the sigmod activation function, the activation function used in other layers is the relu activation function;

[0119] Step 5.2, construct the training set T1 of the ExCNN network:

[0120] Step 5.2.1, select 5000 images from the waterloo dataset as the training set T1 of the ExCNN network, and normalize these images to a size of 256×256;

[0121] Step 5.2.2, perform the following processing on the images selected in step 5.2.1: use one or several of the following attacks: salt-and-pepper noise attack, rotation attack, cropping attack, compression attack, translation attack, Gaussian noise attack, etc., to expand and enhance the number of images in the training set T1;

[0122] Step 5.3, design the loss function of the ExCNN network:

[0123] Step 5.3.1, set the learning target image;

[0124] The learning target image is the binary contour feature map of the host image, that is, the image obtained by extracting the host image with the canny operator without any attack.

[0125] Step 5.3.2, calculate the loss function of the ExCNN network; The loss function is expressed by the mean square error, and the specific calculation method is shown in formula (3)

[0126]

[0127] Among them, w represents the width of the host image, and h represents the height of the host image. x ( i,j ) represents the pixel value at the position (x, y) of the output image of the ExCNN network. y (i, j) represents the binary contour feature value at the position (x, y) of the host image.

[0128] Step 5.4, continuously optimize the parameters of the ExCNN network through iterative loops until the loss function tends to be stable (i.e., the change in the loss value is not greater than 0.001), and end the training of the ExCNN network.

[0129] Step 6, at a specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together in the copyright protection center.

[0130] The copyright verification process is as Figure 4 shown, and the specific steps are as follows:

[0131] Step 7, input the image whose copyright is to be verified into the ExCNN network obtained in Step 6, obtain the binary contour feature map of the image and scramble it.

[0132] Step 8, perform an XOR operation on the scrambled binary contour map obtained in Step 7 and the zero-watermark image registered in the copyright protection center to obtain the scrambled image of the logo.

[0133] Step 9, perform an inverse scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image based on this value.

[0134] Step 9.1, perform an inverse Arnold transformation on the image obtained in Step 8 to restore the logo image.

[0135] Step 9.2, calculate the similarity between the logo image obtained in Step 9.1 and the logo image when generating the zero-watermark image, and obtain a similarity value NC (Normalized Correlation, NC) according to formula (4). The expression is as follows:

[0136]

[0137] Among them, W (i,j) represents the pixel value at the position (x, y) of the original logo image, and W' (i,j) represents the pixel value at the position (x, y) of the logo image restored from the steps in the copyright verification process.

[0138] Step 9.3: Verify the copyright ownership based on the similarity value obtained in Step 9.2. When the NC value > 0.5, the host image belongs to the owner of the logo image used to generate the zero-watermark image.

[0139] Example 1

[0140] Next, the anti-attack ability of this watermarking method will be judged through specific experiments. The NC value (Normalized Correlation Value) is used to measure the similarity between the original logo and the extracted logo image. The ExCNN network is trained using a 3090 graphics card. Software environment configuration: Python 3.9.13, Pytorch 1.8.1; Experimental parameter settings: Use the SGD optimizer, the initial learning rate is 0.01, the minimum learning rate is set to 2e-4, and the weight decay is 5e-4. The batch size is 128, the momentum is 0.9, and 300 epochs are trained.

[0141] To verify the robustness of this method, the following attacks are carried out on the original host image for evaluation: salt and pepper noise attack, rotation attack, cropping attack, compression attack, Gaussian noise attack, and translation attack. At the same time, the experimental results of this method are compared with the image watermarking algorithm based on improved singular value decomposition and Haar wavelet transform (ISVD-HWT), the zero-watermark algorithm for medical images based on Fourier parameterization (DO-FFT), and the non-zero watermark method based on dense residual network (WDRN). The specific results are shown in Table 1. It can be seen that the present invention has strong robustness and is significantly better than the traditional watermarking method (ISVD-HWT) and the zero-watermark method (DO-FFT); although the robustness is comparable to that of the neural network-based method (WDRN), the present invention is a zero-watermark method, and the watermark has complete invisibility, and the watermark transparency is better than that of the WDRN-based method. The copyright verification effect diagrams of the host image under various attacks are as Figures 5 - 34 shown, Figures 5 - 34 The results of further verify the strong robustness of the present invention. Thus, it can be seen that the method of the present invention solves the problem that it is difficult for the host image subjected to conventional image processing and geometric attacks to provide image features consistent with those at the time of zero-watermark generation during the copyright verification process of the host image.

[0142] Table 1 NC values of each watermarking method under different attack levels

[0143] Attack Modes ISVD - HWT DO - FFT WDRN This Method Salt - and - Pepper Noise (σ = 10) 0.783 0.862 0.953 0.963 Salt - and - Pepper Noise (σ = 35) 0.669 0.857 0948 0.952 Rotation (Clockwise 45°) 0.542 0.789 0.904 0.933 Rotation (Clockwise 135°) 0.483 0.768 0.888 0.925 Cropping (10%) 0.531 0.823 0.931 0.958 Cropping (25%) 0.402 0.811 0.912 0.947 Compression (Quality Factor 80) 0.779 0.884 0.976 0.961 Compression (Quality Factor 50) 0.764 0.875 0.964 0.989 Gaussian Noise (σ = 15) 0.791 0.873 0.962 0.983 Gaussian Noise (σ = 30) 0.785 0.869 0.957 0.976 Translation (13% Leftward) 0.744 0.856 0.962 1 Translation (20% Upward) 0.738 0.861 0.957 1 Compression (Quality Factor 80)+Cropping (10%) 0.769 0.851 0.953 0.958 Gaussian Noise (σ = 30)+Translation (10% Leftward) 0.783 0.848 0.926 0.957

[0144] Example 2

[0145] The zero-watermark method based on image contour features includes two processes: zero-watermark generation and copyright verification;

[0146] Among them, the zero-watermark generation process: Use the canny operator to obtain the binary contour feature map of the host image; Add a timestamp to the watermark logo image and then perform binarization processing; The binary contour feature map of the host image and the binary map of the logo are respectively scrambled, and then an XOR operation is performed to generate a zero-watermark image; Design and train the neural network ExCNN for extracting the binary contour feature map; Finally, register and save the zero-watermark image and the neural network ExCNN at the copyright protection center on the specified date;

[0147] Copyright verification process: First, take out the convolutional neural network ExCNN and the zero-watermark image from the copyright protection center; Input the image to be verified for copyright into the convolutional neural network ExCNN, extract the binary contour feature map, scramble it and then perform an XOR operation with the zero-watermark image taken out from the copyright protection center to obtain a scrambled logo image, and finally inverse-scramble it to obtain the logo image, calculate the NC value, and verify the copyright ownership according to its value.

[0148] Example 3

[0149] The zero-watermark method based on the image contour feature includes the following steps:

[0150] Step 1, use the canny operator to generate the binary host contour feature map of the host image;

[0151] Step 2, load a timestamp for the logo image and perform binarization to obtain a binary logo image;

[0152] Step 3, respectively perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 to obtain a scrambled contour map and a scrambled logo map;

[0153] Step 4, perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it at the copyright protection center at the specified time point;

[0154] Step 5, design and train the convolutional neural network ExCNN;

[0155] Step 6, at the specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together at the copyright protection center;

[0156] Step 7, input the image to be verified for copyright into the ExCNN network obtained in Step 6 to obtain the binary contour feature map of the image and scramble it;

[0157] Step 8, perform an XOR operation on the binary contour scrambled map obtained in Step 7 and the zero-watermark image registered at the copyright protection center to obtain a scrambled image of the logo;

[0158] Step 9: Inverse scrambling transformation is performed on the logo image obtained in Step 8, and the similarity value between the calculated image and the logo image used when generating the zero-watermark image is calculated. The copyright ownership of the host image is determined based on this value.

[0159] Example 4

[0160] The zero-watermark method based on image contour features includes the following steps:

[0161] Step 1: Use the canny operator to generate a binary host contour feature map of the host image;

[0162] Specifically, Step 1 is as follows:

[0163] Step 1.1: Smooth the host image using a Gaussian filter to remove noise and reduce edge jitter;

[0164] Step 1.2: For the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction;

[0165] Step 1.3: According to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima and suppress the pixel values of non-maxima, refining the detected edges;

[0166] Step 1.4: Use double-threshold processing on the edge pixel values obtained in Step 1.3 to obtain a binary contour feature map of the host image; the two thresholds are T h , T l .

[0167] Step 2: Load a timestamp for the logo image and binarize it to obtain a binary logo image;

[0168] Step 3: Perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 respectively to obtain a scrambled contour map and a scrambled logo map;

[0169] Step 4: Perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it in the copyright protection center at a specified time point;

[0170] Step 5: Design and train the convolutional neural network ExCNN;

[0171] Step 6: At a specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together in the copyright protection center;

[0172] Step 7: Input the image whose copyright is to be verified into the ExCNN network obtained in Step 6 to obtain a binary contour feature map of the image and scramble it;

[0173] Step 8: Perform an XOR operation on the scrambled binary contour image obtained in Step 7 and the zero-watermark image registered in the copyright protection center to obtain the scrambled image of the logo;

[0174] Step 9: Perform an inverse scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image based on this value.

[0175] Example 5

[0176] A zero-watermark method based on image contour features includes the following steps:

[0177] Step 1: Use the canny operator to generate a binary host contour feature map of the host image;

[0178] Specifically, Step 1 is as follows:

[0179] Step 1.1: Smooth the host image using a Gaussian filter to remove noise and reduce edge jitter;

[0180] Step 1.2: For the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction;

[0181] Step 1.3: According to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima and suppress the pixel values of non-maxima to refine the detected edges;

[0182] Step 1.4: Use double thresholding to process the edge pixel values obtained in Step 1.3 to obtain a binary contour feature map of the host image; the two thresholds are T h , T l .

[0183] Specifically, Step 1.4 is as follows:

[0184] Step 1.4.1: If the edge pixel value obtained in Step 1.3 is greater than the threshold T h , it is considered a strong edge and is represented by '1', T h = 117;;

[0185] Step 1.4.2: If the edge pixel value obtained in Step 1.3 is lower than the threshold T l , it is considered a non-edge and is represented by '0', T l = 58;;

[0186] Step 1.4.3: For the pixels between T h and T l , the pixels connected to the strong edge are represented by '1'; the pixels connected to the non-edge are represented by '0', thereby obtaining a binary contour feature map.

[0187] Step 2: Load the timestamp of the logo image and binarize it to obtain a binary logo image;

[0188] Step 3: Perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 respectively to obtain a scrambled contour map and a scrambled logo map;

[0189] Step 4: Perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it in the copyright protection center at a specified time point;

[0190] Step 5: Design and train a convolutional neural network ExCNN;

[0191] Step 6: At a specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together in the copyright protection center;

[0192] Step 7: Input the image to be verified for copyright into the ExCNN network obtained in Step 6 to obtain a binary contour feature map of the image and scramble it;

[0193] Step 8: Perform an XOR operation on the binary contour scrambled map obtained in Step 7 and the zero-watermark image registered in the copyright protection center to obtain a scrambled logo image;

[0194] Step 9: Perform an inverse scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image based on this value.

[0195] Example 6

[0196] A zero-watermark method based on image contour features includes the following steps:

[0197] Step 1: Use the canny operator to generate a binary host contour feature map of the host image;

[0198] Step 1 is specifically as follows:

[0199] Step 1.1: Smooth the host image using a Gaussian filter to remove noise and reduce edge jitter;

[0200] Step 1.2: For the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction;

[0201] Step 1.3: According to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima, suppress the pixel values of non-maxima, and refine the detected edges;

[0202] Step 1.4, use double thresholds to process the edge pixel values obtained in Step 1.3 to obtain the binary contour feature map of the host image; the double thresholds are T h , T l .

[0203] Specifically, Step 1.4 is as follows:

[0204] Step 1.4.1, if the edge pixel value obtained in Step 1.3 is greater than the threshold T h , it is considered a strong edge and is represented by '1', where T h = 117;

[0205] Step 1.4.2, if the edge pixel value obtained in Step 1.3 is lower than the threshold T l , it is considered a non-edge and is represented by '0', where T l = 58;

[0206] Step 1.4.3, for the pixels between T h and T l , the pixels connected to the strong edge are represented by '1'; the pixels connected to the non-edge are represented by '0', thereby obtaining the binary contour feature map.

[0207] Step 2, load the timestamp for the logo image and binarize it to obtain the binary logo image;

[0208] Specifically, Step 2 is as follows:

[0209] Step 2.1, load the expected time of registration of the zero watermark in the copyright center into the logo image;

[0210] Step 2.2, if it is a color logo, use formula (1) to convert the color logo image into a grayscale image;

[0211] I(x, y) = 0.299×R(x, y) + 0.587×G(x, y) + 0.114×B(x, y) (1)

[0212] where, I(x, y) represents the pixel value at (x, y) in the grayscale image, R(x, y) represents the pixel value at (x, y) in the red channel of the color logo image, G(x, y) represents the pixel value at (x, y) in the green channel of the color logo image, and B(x, y) represents the pixel value at (x, y) in the blue channel of the color logo image;

[0213] Step 2.3, obtain the optimal threshold T by calculating the between-class variance, and then compare the pixel value I(x, y) of each pixel of the logo image according to formula (2) to binarize the logo image:

[0214]

[0215] Among them, B(x, y) represents the pixel value at the position (x, y) of the binarized logo image, and I(x, y) represents the pixel value at the position (x, y) of the grayscale logo image.

[0216] Step 3: Perform Arnold scrambling encryption on the binarized host image contour map obtained in Step 1 and the binarized logo map obtained in Step 2 to obtain a scrambled contour map and a scrambled logo map.

[0217] Step 4: Perform an XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it in the copyright protection center at a specified time point.

[0218] Step 5: Design and train the convolutional neural network ExCNN.

[0219] Step 6: At a specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 in the copyright protection center together.

[0220] Step 7: Input the image to be verified for copyright into the ExCNN network obtained in Step 6 to obtain a binarized contour feature map of the image and scramble it.

[0221] Step 8: Perform an XOR operation on the binarized contour scrambled map obtained in Step 7 and the zero-watermark image registered in the copyright protection center to obtain a scrambled image of the logo.

[0222] Step 9: Perform an inverse scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image based on this value.

Claims

1. Zero-watermarking method based on image contour features, characterized in that It includes two processes: zero-watermark generation and copyright verification; Among them, the zero-watermark generation process: Use the canny operator to obtain the binary contour feature map of the host image; Add a timestamp to the watermark logo image and then perform binarization processing; The binary contour feature map of the host image and the binary map of the logo are scrambled respectively, and then through the XOR operation, a zero-watermark image is generated; Design and train the neural network ExCNN for extracting the binary contour feature map; Finally, register and save the zero-watermark image and the neural network ExCNN at the copyright protection center on the specified date; The copyright verification process: First, take out the convolutional neural network ExCNN and the zero-watermark image from the copyright protection center; Input the image to be verified for copyright into the convolutional neural network ExCNN, extract the binary contour feature map, scramble it and then perform the XOR operation with the zero-watermark image taken out from the copyright protection center to obtain the scrambled logo image, and finally inverse-scramble it to obtain the logo image, calculate the NC value, and verify the copyright ownership according to its value.

2. The zero-watermark method based on image contour features according to claim 1, characterized in that, It includes the following steps: Step 1, Use the canny operator to generate the binary host contour feature map of the host image; Step 2, Load a timestamp on the logo image and perform binarization to obtain a binary logo image; Step 3, Perform Arnold scrambling encryption on the binary host image contour map obtained in Step 1 and the binary logo map obtained in Step 2 respectively to obtain the scrambled contour map and the scrambled logo map; Step 4, Perform the XOR operation on the scrambled contour map and the scrambled logo map obtained in Step 3 to obtain a zero-watermark image, and register and save it at the copyright protection center at the specified time point; Step 5, Design and train the convolutional neural network ExCNN; Step 6, At the specified time point, register and save the zero-watermark image obtained in Step 4 and the ExCNN network obtained in Step 5 together at the copyright protection center; Step 7, Input the image to be verified for copyright into the ExCNN network obtained in Step 6 to obtain the binary contour feature map of the image and scramble it; Step 8, Perform the XOR operation on the binary contour scrambled map obtained in Step 7 and the zero-watermark image registered at the copyright protection center to obtain the scrambled logo image; Step 9, Perform the inverse-scrambling transformation on the logo image obtained in Step 8, calculate the similarity value between the obtained image and the logo image used when generating the zero-watermark image, and determine the copyright ownership of the host image according to this value.

3. The zero-watermark method based on image contour features according to claim 2, wherein Step 1 is specifically: Step 1.1, Use a Gaussian filter to smooth the host image to remove noise and reduce edge jitter; Step 1.2, For the image obtained in Step 1.1, calculate the gradient magnitude and gradient direction; Step 1.3, According to the gradient magnitude and gradient direction obtained in Step 1.2, use the non-maximum suppression method to retain the pixel values of local maxima and suppress the pixel values of non-maxima to refine the detected edges; Step 1.4, using double thresholds to process the edge pixel values obtained in step 1.3 to obtain a binary contour feature map of the host image; the double thresholds are T h , T l .

4. The zero-watermark method based on image contour features according to claim 3, characterized in that Step 1.4 is specifically: Step 1.4.1, if the edge pixel value obtained in Step 1.3 is greater than the threshold T h , it is considered a strong edge and represented by '1'; Step 1.4.2, if the edge pixel value obtained in Step 1.3 is lower than the threshold T l , it is considered non-edge and represented by '0'; Step 1.4.3, pixels between T h and T l that are connected to strong edges are represented by '1', and pixels connected to non-edges are represented by '0', thereby obtaining a binary contour feature map.

5. The zero-watermarking method based on image contour features according to claim 2, characterized in that Step 2 is specifically: Step 2.1, Load the expected time of zero-watermark registration in the copyright center into the logo image; Step 2.2, If it is a color logo, use formula (1) to convert the color logo image into a grayscale image; I(x,y) = 0.299×R(x,y) + 0.587×G(x,y) + 0.114×B(x,y) (1) Wherein, I(x,y) represents the pixel value at the position (x,y) of the grayscale image, R(x,y) represents the pixel value at the position (x,y) of the red channel of the color logo image, G(x,y) represents the pixel value at the position (x,y) of the green channel of the color logo image, and B(x,y) represents the pixel value at the position (x,y) of the blue channel of the color logo image; Step 2.3: Obtain the optimal threshold T by calculating the between-class variance, and then compare the pixel value I(x,y) of each pixel of the logo image according to formula (2) to binarize the logo image: Wherein, B(x,y) represents the pixel value at the position (x,y) of the binarized logo image, and I(x,y) represents the pixel value at the position (x,y) of the grayscale logo image.

6. The zero-watermark method based on image contour features according to claim 5, characterized in that, Step 5 is specifically as follows: Step 5.1: Build the convolutional neural network ExCNN structure; Step 5.2: Construct the training set T1 of the ExCNN network: Step 5.3: Design the loss function of the ExCNN network: Step 5.4: Continuously optimize the parameters of the ExCNN network through iterative loops until the loss function tends to be stable, that is, the change in the loss value is not greater than 0.001, and end the training of the ExCNN network.

7. The zero-watermark method based on image contour features according to claim 6, wherein In Step 5.1: The built convolutional neural network ExCNN is composed of 10 convolutional layers and 2 residual block layers. The specific structure of each layer of the network is as follows: The first layer includes the following structure: a convolutional layer composed of 64 convolutional kernels, a normalization layer, an activation function, and a max pooling layer; The second and third layers have the same structure, including the following structure: a convolutional layer composed of 64 convolutional kernels, a normalization layer, and an activation function; The fourth and fifth layers have the same structure, including the following structure: a convolutional layer composed of 128 convolutional kernels, a normalization layer, and an activation function; The sixth and seventh layers are both convolutional residual block layers, and each residual block contains two convolutional layers composed of 128 convolutional kernels, a normalization layer, and an activation function; The eighth and ninth layers have the same structure, including the following structure: a convolutional layer composed of 256 convolutional kernels, a normalization layer, and an activation function; The tenth and eleventh layers have the same structure, including the following structure: a convolutional layer composed of 512 convolutional kernels, a normalization layer, and an activation function; The twelfth layer uses a 3×3 convolutional kernel and a sigmod activation function to generate the final contour feature map; In the built convolutional neural network ExCNN, the size of the convolutional kernels of all convolutional layers is 3×3, the stride of the convolutional kernels is 1, and except for the last layer which uses the sigmod activation function, the relu activation function is used for all other activation functions.

8. The zero-watermark method based on image contour features according to claim 7, wherein Step 5.2 is specifically as follows: Step 5.2.1: Select X images from the Waterloo dataset as the training set T1 of the ExCNN network, and standardize these images to the size of M×N; Step 5.2.2: Process the images selected in Step 5.2.1 as follows: Use one or several of salt-and-pepper noise attack, rotation attack, cropping attack, compression attack, translation attack, and Gaussian noise attack to expand and enhance the number of images in the training set T1.

9. The zero-watermarking method based on image contour features according to claim 7, wherein Step 5.3 is specifically as follows: Step 5.3.1: Set the learning target image; The learning target image is the binary contour feature map of the host image, that is, the image obtained by extracting the host image with the canny operator without any attack; Step 5.3.2: Calculate the loss function of the ExCNN network; the loss function is represented by the mean square error, and the specific calculation method is shown in formula (3) where w represents the width of the host image, h represents the height of the host image, x(i,j) represents the pixel value at the (x,y) position of the output image of the ExCNN network, and y(i,j) represents the binary contour feature value at the (x,y) position of the host image.

10. The zero-watermarking method based on image contour features according to claim 2, characterized in that, Step 9 is specifically as follows: Step 9.1: Perform an inverse Arnold transform on the image obtained in Step 8 to restore the logo image; Step 9.2: Calculate the similarity between the logo image obtained in Step 9.1 and the logo image when generating the zero-watermark image, and obtain a similarity value NC according to formula (4). The expression is as follows: Among them, W (i,j) represents the pixel value at the position (x, y) of the original logo image, and W' (i,j) represents the pixel value at the position (x, y) of the logo image restored by the steps in the copyright verification process; Step 9.3: Verify the copyright ownership according to the similarity value obtained in Step 9.

2. When the NC value > 0.5, the host image belongs to the owner of the logo image used when generating the zero-watermark image.