CN107240061B - Watermark embedding and extracting method and device based on dynamic BP neural network - Google Patents

Watermark embedding and extracting method and device based on dynamic BP neural network Download PDF

Info

Publication number
CN107240061B
CN107240061B CN201710432956.2A CN201710432956A CN107240061B CN 107240061 B CN107240061 B CN 107240061B CN 201710432956 A CN201710432956 A CN 201710432956A CN 107240061 B CN107240061 B CN 107240061B
Authority
CN
China
Prior art keywords
watermark
image
neural network
dynamic
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710432956.2A
Other languages
Chinese (zh)
Other versions
CN107240061A (en
Inventor
孙林
郁丽萍
李新磊
李源
常宝方
孟玲玲
张霄雨
孟新超
刘弱南
张新乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan Normal University
Original Assignee
Henan Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan Normal University filed Critical Henan Normal University
Priority to CN201710432956.2A priority Critical patent/CN107240061B/en
Publication of CN107240061A publication Critical patent/CN107240061A/en
Application granted granted Critical
Publication of CN107240061B publication Critical patent/CN107240061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a watermark embedding and extracting method and a device based on a dynamic BP neural network, which mainly comprises the steps of scrambling an original watermark image by using improved Arnold transformation, embedding the scrambled watermark image into a hidden layer of the dynamic BP neural network, and training to obtain a carrier image embedded with a watermark; the invention combines the improved Arnold transformation with the dynamic BP neural network to obtain the carrier image containing the watermark, and the size of the pixel in the embedded position can be extracted after the carrier image is subjected to various attacks, thereby realizing the correct detection of the watermark signal and balancing the contradiction between the robustness and the imperceptibility of the image watermark. In addition, when watermark image extraction is carried out, namely the reverse process of watermark embedding, the watermark image is finally obtained by combining the dynamic BP neural network with the improved Arnold transformation.

Description

Watermark embedding and extracting method and device based on dynamic BP neural network
Technical Field
The invention relates to a digital image watermarking technology in the field of information security, in particular to a watermark embedding and extracting method and device based on a dynamic BP neural network.
Background
In recent years, with the rapid development of digital media and internet technologies, there are a great number of digital media content resources (such as texts, images, videos, and the like) on networks or various terminal devices, and users can easily use, copy, or distribute the digital media content, so that copyright protection of digital media content is attracting more and more high attention in the business and academic circles. In the process of solving the problem, adding a watermark image to digital media content is an effective supplementary means of a commonly adopted traditional encryption method, namely, a data embedding method is utilized to be hidden in a digital image product to prove the ownership of the work of a creator, and the data embedding method is used as a basis for identifying and claiming illegal infringement, and meanwhile, the detection and analysis of the watermark ensure the integrity and the reliability of digital information, so that the digital media content is an effective means for intellectual property protection and digital multimedia anti-counterfeiting, and the digital media content has attracted high attention in recent years and has become a hotspot of international academic research. Meanwhile, digital image scrambling encryption is the basic work for carrying out covert communication by using an information hiding technology, and the digital image scrambling encryption is used as a preprocessing means before information hiding, so that the information can be encrypted, and the digital image scrambling encryption has certain effects on enhancing the imperceptibility of secret information, improving the anti-attack performance of covert communication, increasing the capacity of a covert channel and the like.
The watermark image scrambling encryption technology is that a sender transforms a meaningful digital image into a disordered image by means of the technology in mathematics or other fields and then uses the disordered image for transmission; in the process of image transmission, an illegal interceptor cannot obtain the original image information from the disordered image, so that the aim of image encryption is fulfilled, and the original image can be recovered by a receiving party through decryption. To ensure the confidentiality of the image, a key is typically introduced into the scrambling process. The major scrambling transformations currently studied and used are: arnold transformation, Fibonacci and Fibonacci-Q transformation, magic square transformation, orthogonal Latin square transformation, Hilbert curve transformation, Gray code transformation, affine transformation, chaotic scrambling transformation, etc. The image watermark must have two basic elements of robustness and imperceptibility to play a proper role. Watermark robustness means that the embedded image watermark still has good detectability after the digital media is subjected to conventional signal processing or external attack. Watermark imperceptibility means that the embedding of the watermark cannot affect the visual quality of the original digital media.
The image watermark can be divided into copyright protection watermark, bill anti-counterfeiting watermark, tamper prompt watermark and hidden identification watermark according to the purpose. The method can be divided into blind watermarks and plaintext watermarks according to the extraction process. The method can be divided into robust watermarks and fragile watermarks according to attack capability, wherein the robust watermarks are mainly applied to copyright protection of digital works, and the fragile watermarks are required to be sensitive to signal modification and are mainly applied to integrity protection. Image watermarking algorithms can be classified into two categories according to the watermark embedding position: transform domain based algorithms and spatial domain based algorithms. With the widespread use of JPEG compression and JPEG2000, so far, there are many transform domain-based watermarking algorithms. Transform domain watermarking algorithms can be classified into the following categories, depending on the transform used: the image watermarking algorithm based on discrete cosine transform, the image watermarking algorithm based on discrete wavelet transform and the robust watermarking algorithm based on DFT transform. However, these algorithms are complex, require consideration of complex space-frequency domain transformation processes, and have low efficiency and small quantity of embeddable information. The spatial domain image watermarking technology becomes a new research hotspot due to the advantages of simple algorithm and high speed, the purpose of embedding the watermark is achieved by directly modifying the pixel value of the original image, but the current classical spatial domain watermarking algorithm is easily interfered by common image processing such as image compression conversion and the like, the watermark can not be correctly extracted basically after the basic processing such as geometric rotation, compression and the like is carried out on the image, and experimental simulation shows that the algorithm has weak attack resistance and low robustness. However, with the introduction of the neural network, the watermark embedding and detecting process can make full use of some natural features in the image, so that the watermark embedding and detecting robustness in the spatial domain can be improved to a certain extent. Although the combination of machine learning and various image domain transformations works well for embedding and extracting specific watermarks, there are still many problems: for example, image watermarking methods based on BP neural networks and the like generally have poor imperceptibility, poor shearing resistance and rotation resistance, and certain hidden danger of watermark confidentiality; the embedding and extracting method based on the spatial frequency domain transformation generally has high computational complexity, and the attack resistance is yet to be enhanced. In summary, there are still some problems as follows:
at present, common scrambling encryption algorithms such as Arnold transformation and Fibonacci transformation all have modular operation, so that scrambling is time-consuming, inverse transformation is difficult to obtain, and the cycle of Arnold transformation is large. Liu Fang, Jia become, express written "a binary image watermarking algorithm based on Arnold transform" (computer application, 2008,28(6): 1404-. Experiments show that the algorithm not only improves the invisibility of the watermark and the embedding capacity of the watermark, but also realizes the blind extraction of the watermark. However, there are some disadvantages, such as less parameters in the process of the Arnold spatial domain transformation, which results in too few keys of the image, and low security, the Arnold transformation only plays a role in scrambling the image, and the algorithm has poor resistance to conventional attacks of the image, especially under geometric attacks, and does not well balance the contradiction between invisibility of watermark and robustness. At present, the proposed BP neural network scheme is basically a standard-introduced BP neural network, is a global approximation network, has low learning speed and cannot meet the application of real-time requirements, namely the position of the embedded watermark is generally difficult to determine, which causes that the difficulty of finally extracting the watermark is larger and the distortion of the extracted watermark image is more serious; the robustness of the watermark system is a standard for evaluating the conventional processing capacity of the watermark system, which is very important for the watermark; the existing digital image watermark detection method focuses on the research of resisting conventional signal processing (such as lossy compression, low-pass filtering, noise interference and the like), and the resisting effect of geometric attacks such as rotation, scaling, translation, line and row removal, shearing and the like is not good.
Zhang Jun and Wang super-drafted neural network-based watermarking technology for image authentication (computer aided design and graphics bulletin 2003,15(3):307-, by randomly selecting some pixels and their fields, establishing a relation model between them by using a neural network, and embedding the bit information of the watermark pattern by adjusting the magnitude relation between the selected pixel point and the model output value, according to the extracted watermark image, but the method adopts a standard neural network, has slow learning speed and can not meet the application of real-time requirement, and the position of the embedded watermark is generally difficult to determine, which causes the problems of higher difficulty of extracting the watermark finally, more serious distortion of the extracted watermark image, less quantity of embedded keys, low safety and the like.
Disclosure of Invention
The invention provides a watermark embedding and extracting method based on a dynamic BP neural network, which is used for solving the problems of less conventional image watermark keys, low precision, low convergence speed in the learning process of the traditional BP neural network and low training sample speed, and further improving the safety, robustness and imperceptibility of image watermarks.
In order to achieve the above object, the scheme of the invention comprises:
a watermark embedding method based on a dynamic BP neural network comprises the following steps:
1) processing the original watermark image W by adopting improved Arnold transformation to obtain a scrambled watermark image W';
2) training an original carrier image block through the established dynamic BP neural network to obtain an output O of a hidden layer; embedding a scrambled watermark image W 'into an output O of the hidden layer, and then carrying out dynamic BP neural network training on the carrier image embedded with the scrambled watermark image W' to obtain a carrier image embedded with a watermark;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, the current learning rate is increased.
The improved Arnold transformation in step 1) is according to the following formula
Figure GDA0002772680330000041
To obtain
Figure GDA0002772680330000042
Making n iterations to watermark the position coordinate (x) of the image0,y0) As an initial value, an embedding position (x) corresponding to the watermark image is obtainedn,yn) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure GDA0002772680330000043
1≤xn≤N,1≤ynN is not more than N, a, b, c, d, e and f are positive integers, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
The learning rate is generated according to the following formula:
Figure GDA0002772680330000044
if the ratio of the output error of the neural network calculated this time to the output error of the neural network calculated in the last iteration is greater than a set value B, reducing the current learning rate; otherwise, increasing the current learning rate; the method for reducing the learning rate is to multiply the current learning rate by b1(ii) a The method of increasing the learning rate is to multiply the current learning rate by a positive number b2(ii) a Wherein, b1Less than 1, b2Greater than 1, b1、b2Are all positive numbers.
Establishing a 64 × 16 × 64 three-layer dynamic BP neural network in the step 2), wherein a transfer function is a sigmoid function, a training function is adjusted to be a trainlm function, the training frequency is 40, a neuron activation function threshold value is 0.05, a learning rate is compared with an output error of the neural network calculated in the last iteration in the training process of the BP neural network, and then dynamic adjustment is performed, wherein the initial value of the learning rate is 0.5.
The watermark extraction method comprises the following steps:
1) taking the carrier image embedded with the watermark as an input layer and the original carrier image as an output layer, and training the established dynamic BP neural network to obtain an output O' of the hidden layer; carrying out difference on O' and O to obtain a difference image, wherein the difference image is the extracted watermark image; the output O 'of the hidden layer is the output of the hidden layer obtained by training the image block of the watermark-embedded carrier through a dynamic BP neural network, and the output O' of the hidden layer is the output of the hidden layer obtained by training the image block of the original carrier through the dynamic BP neural network;
2) obtaining an original watermark image by utilizing improved Arnold inverse transformation of the obtained watermark image;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, the current learning rate is increased.
The improved Arnold inverse transformation formula in the step 2) is as follows:
Figure GDA0002772680330000051
performing n iterations to scramble the position coordinates (x) of the watermark imagen,yn) As an initial value, the position (x) corresponding to the original watermark image is obtained0,y0) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure GDA0002772680330000052
a. b, c, d, e and f are positive integers, and x is more than or equal to 1n≤N,1≤ynN is less than or equal to N, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
Establishing a 64 × 16 × 64 three-layer dynamic BP neural network in the step 1), wherein a transfer function is a sigmoid function, a training function is adjusted to be a trainlm function, the training frequency is 40, a neuron activation function threshold value is 0.05, a learning rate is compared with an output error of the neural network calculated in the last iteration in the training process of the BP neural network, and then dynamic adjustment is performed, wherein the initial value of the learning rate is 0.5.
A watermark embedding device based on a dynamic BP neural network is used for executing the following steps:
processing the original watermark image W by adopting improved Arnold transformation to obtain a scrambled watermark image W';
training an original carrier image block through the established dynamic BP neural network to obtain an output O of a hidden layer; embedding a scrambled watermark image W 'into an output O of the hidden layer, and then carrying out dynamic BP neural network training on the carrier image embedded with the scrambled watermark image W' to obtain a carrier image embedded with a watermark;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, the current learning rate is increased.
Watermark extraction means for performing the steps of:
taking the carrier image block embedded with the watermark as an input layer and the original carrier image as an output layer, and training the carrier image block embedded with the watermark through an established dynamic BP neural network to obtain an output O' of the hidden layer; carrying out difference on O' and O to obtain a difference image, wherein the difference image is the extracted watermark image; the output O 'of the hidden layer is the output of the hidden layer obtained by training the carrier image block embedded with the watermark by the dynamic BP neural network, and the output O' of the hidden layer is the output of the hidden layer obtained by training the original carrier image block by the dynamic BP neural network;
obtaining an original watermark image by utilizing improved Arnold inverse transformation of the obtained watermark image;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, the current learning rate is increased.
According to the invention, the dynamic BP neural network is introduced, the scrambled watermark image is embedded into the hidden layer of the dynamic BP neural network for training, and the learning rate is dynamically adjusted through the dynamic BP neural network according to the output error of the neural network calculated at this time and the output error of the neural network calculated at the last iteration, so that the convergence rate is greatly improved. In the invention, the original watermark is scrambled and encrypted by using the improved Arnold transformation, and compared with the generalized Arnold transformation, the introduced parameters are increased, namely the number of keys is increased, thereby improving the security of the image watermark; the parameters e and f in the Arnold transform are additionally modified to make (x) when the watermark is finally embeddedn,yn) It is not concentrated in a certain square of the image, so that it is as dispersed as possible in the original carrier image.
Drawings
FIG. 1 is a schematic diagram of a BP neural network;
FIG. 2 is a flow chart of the embedding and extraction of the present invention;
FIG. 3-1 is an original carrier Lena image;
fig. 3-2 is the original watermark image south of river;
fig. 4 is a watermark image henan scrambled by an improved Arnold transform;
FIG. 5-1 is a Lena image of a carrier after embedding a watermark;
fig. 5-2 is an extracted watermark image, henna;
FIG. 6-1 is an image of the Lena aqueous print carrier after brightening (+ 75);
FIG. 6-2 is an image of a Lena containing watermark carrier after darkening (-50);
FIG. 7-1 is a histogram after image equalization;
FIG. 7-2 is an image of a Lena bearing a watermark after histogram equalization;
fig. 8 is an image of the hydrous ink carrier Lena after gaussian noise (μ ═ 0 and σ ═ 0.01);
FIG. 9 is a Lena image of the watermark-bearing support after median filtering (3X 3);
FIG. 10 is an image of a Lena containing watermark carrier geometrically cut from the left side of 128X 128 pixels;
FIG. 11-1 is an image of a Lena aqueous print carrier rotated 10 degrees in a geometric counterclockwise direction;
FIG. 11-2 is an image of a Lena aqueous print carrier after a geometric clockwise rotation of 10;
FIG. 12-1 is a raw carrier Woman image;
fig. 12-2 is a carrier Woman image after embedding the watermark image in henna;
fig. 12-3 is a watermark image south of the river extracted from the carrier Woman image after embedding the watermark;
fig. 13-1 is a watermark image a;
FIG. 13-2 is a watermark image of the university school badge in Henan university;
FIG. 13-3 is a watermark image Henan Master;
FIG. 14-1 is a Lena carrier image after embedding a watermark image Henan Master and Hour;
fig. 14-2 is a watermark image, kahwira, extracted from the carrier Woman image after embedding the watermark;
fig. 15 is a comparison of NC values between different watermarking schemes.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The watermark embedding method mainly comprises the following steps: the invention mainly aims to scramble and encrypt an original watermark image by using improved Arnold transformation, increase the number of keys and improve the security of the watermark; meanwhile, a dynamic BP neural network is established, and the scrambled watermark image is embedded into a hidden layer of the dynamic BP neural network when the watermark is embedded; compared with the traditional BP neural network, the dynamic BP neural network has higher convergence speed and strong anti-noise and repairing capabilities, so that the relation between local pixel points can be still memorized in a watermark image after the watermark image is subjected to noise, and the correct detection of the watermark is realized. The invention fully utilizes the characteristics of the BP neural network and dynamically adjusts the learning rate of the BP neural network, obtains the image watermark embedding and extracting method with excellent robustness and capability of resisting the conventional image attack, and well balances the contradiction between the robustness and the imperceptibility of the image watermark.
In particular, a preferred embodiment is given below, not only the training step employs a dynamic BP neural network, but also the scrambling of the watermark image is improved, i.e. corresponding to the improved Arnold transform.
The working principle of the dynamic BP neural network is as follows: the dynamic BP neural network is mainly used for obtaining actual output by carrying out certain calculation on an input sample matrix, obtaining an error by comparing the actual output with an expected output matrix, and dynamically adjusting the learning rate by utilizing the output error of the neural network calculated this time and the output error of the neural network calculated in the last iteration. The traditional BP neural network training process can approach any function, has good nonlinear capability, but is easy to fall into a local minimum value of an error plane, so that the performance of the algorithm is reduced. Therefore, the dynamic BP neural network is introduced in the invention, and the dynamic is mainly embodied in the dynamic adjustment of the learning rate.
The BP algorithm is named as an error back propagation algorithm, successfully solves the learning problem of the neuron connection weight of a hidden layer in a multilayer network, adopts a supervised learning mode, and is based on an optimization algorithm of gradient descent and an error function which is minimized.
Let E denote the error function, Y the actual output, and T the desired output, then
Figure GDA0002772680330000081
For node j, its output OjDefinition ofIs composed of
Figure GDA0002772680330000082
Wherein wkjRepresenting the connection weight between node k and node j, the input net of node jjIs the output O of all nodes of the previous layerkWeighted sum of, excitation function of nodes
Figure GDA0002772680330000084
It must be nonlinear and differentiable, in the invention, the transfer function is taken as sigmoid function:
Figure GDA0002772680330000083
the function has an ideal derivative function:
Figure GDA0002772680330000091
the error function is subjected to partial derivation to obtain:
Figure GDA0002772680330000092
order to
Figure GDA0002772680330000093
1) When node j is the output node, then Oj=YjThus, there are:
Figure GDA0002772680330000094
2) when node j is not an output node, then there are:
Figure GDA0002772680330000095
the BP algorithm is based on a gradient descent algorithm, so the correction amount of the weight is proportional to the negative gradient of the error function E to the weight w, that is:
w(t+1)=w(t)+Δw(t)
Figure GDA0002772680330000096
where t represents the number of learning times and α represents the learning rate.
According to the invention, a dynamic BP neural network embedded model can be finally obtained through training of an original carrier image, however, the conventional BP neural network has a great defect that the convergence rate of the learning process is very low. In order to overcome the defect, the dynamic BP neural network is introduced, and the difference between the dynamic BP neural network and the conventional BP neural network is that the dynamic BP neural network can adjust the dynamic learning rate, so that the convergence rate is greatly improved. The invention adopts the following method to dynamically adjust the learning rate:
in each iteration, after the output error of the neural network is calculated, the output error of the neural network calculated this time is compared with the output error of the neural network calculated in the last iteration, and if the ratio of the output error of the neural network calculated this time and the output error of the neural network calculated in the last iteration is greater than a certain normal number b (b is usually a number slightly greater than 1), the current learning rate is properly reduced; otherwise, the current learning rate is increased appropriately. The method of reducing the learning rate is generally to multiply the current learning rate by a positive number b less than 11(ii) a The method of increasing the learning rate is generally to multiply the current learning rate by a positive number b greater than 12. Therefore, the learning rate is continuously adjusted in real time according to the change condition of the current output error in the learning process, so that the convergence speed of the learning process of the neural network is greatly increased. Is formulated as follows:
Figure GDA0002772680330000101
different from the generalized Arnold transformation, the improved Arnold transformation not only relates to independent parameters a, b, c and d and iteration times n for copyright holders to set when embedding watermarks, but also comprises parameters e and f, so that the number of secret keys is increased, and the security of the watermarks is improved.
The following embodiments are watermark embedding manners of the preferred embodiments in which scrambling, training and embedding respectively improve the Arnold transformation and the dynamic BP neural network, and the embedding process is divided into the forms of step (1), step (2) and step (3).
Step (1) uses a digital carrier image I with an input image size of M × M as an original carrier image to be embedded with a watermark, and then inputs a watermark image W with an image size of N × N, for example: the original carrier image I and the original watermark image W are respectively recorded as: i ═ I (I, j), I ≦ 1 ≦ M, j ≦ 1 ≦ M, W ≦ W (I, j), I ≦ 1 ≦ N, j ≦ 1 ≦ N, I (I, j) is the pixel value of the original carrier image at the (I, j) position, and W (I, j) is the pixel value of the original watermark image at the (I, j) position.
Step (2) using improved Arnold transformation algorithm to perform Arnold iterative transformation on the two-dimensional gray image W for n times, namely using the position coordinate (x) of the watermark image0,y0) As an initial value, wherein 1. ltoreq. x0≤N,1≤y0N is less than or equal to N according to the following formula
Figure GDA0002772680330000102
Namely, it is
Figure GDA0002772680330000103
Making n iterations to watermark the position coordinate (x) of the image0,y0) As an initial value, an embedding position (x) of the corresponding watermark is obtainedn,yn) Wherein 1 is less than or equal to xn≤N,1≤yn≤N,
Figure GDA0002772680330000104
a. b, c, d, e and f are positive integersThe area requirement is ad-bc is 1; and N is the size of the watermark image.
In the above transformation, the independent parameters a, b, c, d, e, f and the number of iterations n are set by the copyright owner himself, and can be used to recover the watermark image as seven key parameters. n is generally between 1 and 20, because too large n affects the program running speed, the computational complexity is increased, and the Arnold transformation has periodicity, i.e., n has periodicity. Where e and f are such that (x) is the last watermark embeddedn,yn) The watermark image is not concentrated in a certain square of the image, so that the watermark image is dispersed in the original carrier image as much as possible to obtain the scrambled watermark image W'.
The specific training process of the BP neural network in the step (3) is as follows:
dividing the carrier image I (I, j) into 8 x 8 image blocks C I1,j1Where C { i }1,j1"is an array of cells, and then a [ 64X 16X 64 ] is established]The three-layer BP neural network has an input value of Ci1,j1Expected value of Ci1,j1The transfer function is a sigmoid function, the training function is adjusted to be a trainlm function, the training frequency is 40, the threshold value of the neuron activation function is 0.05, the learning rate is compared with the output error of the neural network calculated in the last iteration in the training process of the BP neural network, dynamic adjustment is further carried out, the initial value is 0.5, and after the dynamic BP neural network is established, training is started to obtain the output O (i) of the hidden layer2,j2) And the adjustment factor W (i) from the hidden layer to the output layer3,j3) Wherein O (i)2,j2) Is an 8 × 1 matrix, W (i)3,j3) An 8 x 64 matrix. Loading a watermark image W ', normalizing each pixel point of the watermark image W' (i, j), and then corresponding to W (i)3,j3) At the first point of each column of (a), i.e. to W (i)3And 1) obtaining the weight W (i) of the watermark-containing image information31); then new weight information is used for training the same dynamic BP neural network, and a carrier image I containing a watermark image is obtained1
Based on the watermark embedding method, the watermark extraction process is divided in the form of step (1), step (2) and step (3) as follows:
the watermark extraction method comprises the following steps:
inputting a carrier image I to be extracted containing a watermark image1Resolution is M × M, I1(i, j) represents the pixel value of the carrier image embedded with the watermark at the position (i, j), wherein i is more than or equal to 1 and less than or equal to M, and j is more than or equal to 1 and less than or equal to M; carrier image I containing watermark1(i, j) divided into 8 x 8 image blocks C1(i1,j1) In which C is1(i1,j1) Is a one-piece cell array.
Step (2) establishing a [ 64X 16X 64 ]]The three-layer BP neural network has an input value of C1(i1,j1) The expected value is also C1(i1,j1) The parameters of the established dynamic BP neural network are the same as those of the dynamic BP neural network in the watermark embedding step (3), and after the dynamic BP neural network is established, training is started to obtain an adjusting coefficient w '(i') from a hidden layer to an output layer3,j3) (ii) a Using w (i)3,j3) Minus w' (i)3,j3) Obtaining the difference D (i) between the two3,j3) Wherein D (i)3,j3) And all pixel values of the watermark are included, so that the scrambled and encrypted watermark image can be obtained.
And (3) recovering the watermark image: d (i)3,j3) Divided into 8 x 8 image blocks D1(i1,j1) Performing Arnold inverse transformation on each image block according to the following formula:
Figure GDA0002772680330000121
performing n iterations to scramble the position coordinates (x) of the watermark imagen,yn) As an initial value, the position (x) corresponding to the original watermark image is obtained0,y0) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure GDA0002772680330000122
e is less than or equal to N, a, b, c, d, e and f are positive integers, and x is less than or equal to 1n≤N,1≤ynN is less than or equal to N, and the area protection requirement is that ad-bc is 1; n is the size of the watermark image; finally, the original watermark image W can be obtained.
After the above embodiment introduces the watermark embedding and extracting process, in order to verify the feasibility and effectiveness of the watermark embedding and extracting process, a series of experiments are performed below by taking two typical test image experiment simulation results and analysis as examples.
The experimental verification is realized by programming MATLABR2012b software on a PC (Windows 7 Intel (R) core (TM) CPU3.20GHz4.0GBmemory), the original digital image I to be embedded with the image watermark is a Lena gray image of a uint8, and the image size M is 512 x 512, as shown in FIG. 3-1; the actual image watermark W to be embedded is "south of the river" and the image size N is taken to be 64 x 64, as shown in fig. 3-2.
The extracted watermark signal is subjectively distinguished by naked eyes of general population (the age is below 50 years, the eyesight is normal), the extracted watermark can be objectively evaluated by adopting Bit Error Rate (BER) indexes of the extracted watermark and the original watermark, the closer the BER is to 0, the higher the robustness of the watermark system is, the stronger the attack resistance is, and the BER is expressed as follows
Figure GDA0002772680330000123
Where M and K are the length and width of the original image watermark, w (i, j) and w' (i, j) are the pixel values of the original watermark and the extracted watermark at the corresponding positions, respectively,
Figure GDA0002772680330000124
indicating a bitwise xor operation.
The quality and the perception performance of the digital image embedded with the actual image watermark are judged by adopting a peak signal-to-noise ratio (PSNR), which represents the damage degree of the embedded watermark information to the carrier quality, wherein the larger the PSNR, the smaller the damage degree, and the PSNR is represented as follows
Figure GDA0002772680330000131
Where m and n are the length and width of the carrier image and I (I, j) and I' (I, j) are the pixel values of the points of the original carrier image and the watermarked carrier image, respectively.
The objective evaluation of the image watermark detection result can also use a normalized correlation coefficient (NC) to evaluate the approximation degree of the watermark through the change of the carrier image before and after the watermark is embedded, the greater the similarity NC is, the higher the robustness of the watermark is, and the NC is expressed as follows
Figure GDA0002772680330000132
Fig. 5-1 is a Lena digital image after embedding an actual watermark image W according to the method of the present invention. As can be seen from the figure, the Lena digital image after the watermark is embedded has no change in quality, the PSNR is very high, reaches 33.2637dB, is consistent with the original Lena digital image shown in figure 3-1, and completely meets the requirement of imperceptibility of the watermark. Fig. 5-2 shows the watermark image extracted by the method of the present invention, and the result shows that the Lena digital image embedded with the actual watermark shown in fig. 5-1 can extract the embedded actual image watermark almost without loss when not being subjected to any attack processing, NC is 0.9999, and BER is 0.037, which is approximately equal to 0. The extracted image is therefore substantially the original watermark image.
The Lena digital image embedded with the actual watermark shown in fig. 5-1 is subjected to various attack treatments, and the robustness of the image watermark embedding and extracting method based on the improved Arnold transformation and the dynamic BP neural network provided by the invention is verified.
(1) Simple brightness adjustment
The Lena digital image after embedding the actual watermark shown in fig. 5-1 is subjected to brightness adjustment processing, that is, all pixel values of the Lena digital image are respectively subjected to operations of adding 75 and subtracting 50, so that the watermark Lena digital image shown in fig. 6-1 and fig. 6-2 is obtained. After the addition and subtraction processing of the pixel values of the image, the brightness and the darkness of the digital image of the watermark Lena are obviously changed in visual sense, and the PSNR is respectively reduced to 14.8965dB and 14.0133 dB. The method of the invention is used for extracting the image watermark of the Lena digital image of the watermark shown in the figure 5-1. At this time NC was 0.7488 and 0.989, respectively, and BER was 0.0127 and 0.0099, respectively, approximately equal to 0. Experimental data shows that the image watermark is basically not influenced by the brightness of the digital image and is almost consistent with a watermark image extracted when the carrier image is not attacked. Therefore, the extraction algorithm has strong robustness to the brightness change of the carrier image.
(2) Histogram equalization
The Lena digital image after embedding the actual watermark shown in fig. 5-1 is subjected to histogram equalization processing to obtain a Lena digital image with watermark shown in fig. 7-2. Through the histogram equalization process as shown in fig. 7-1, the pixel value distribution of the watermark Lena digital image is significantly changed, and the PSNR is reduced to 18.4464 dB. The image watermark extraction is carried out on the watermark Lena digital image shown in fig. 5-1 by using the method of the invention, wherein NC is 0.99 and is close to 1, and BER is 0.0055. According to experimental data, the embedded actual image watermark can be ideally extracted, so that the extraction algorithm has stronger robustness to contrast change of the carrier image.
(3) Superimposed gaussian noise
Noise interference is carried out on the Lena digital image after the actual watermark is embedded, which is shown in fig. 5-1, and Gaussian noise with the mean value of 0 and the variance of 0.01 is selected as the noise, so that the Lena digital image with the watermark, which is shown in fig. 8, is obtained. As can be seen from fig. 8, although the luna digital image containing the watermark is disturbed by gaussian noise, the visual quality is severely degraded, and the PSNR drops to 19.7610 dB. The method of the invention is used for extracting the image watermark of the Lena digital image of the watermark shown in the figure 5-1, at the moment, NC is 0.8894 which is very close to 1, BER is 0.0127, experimental data show that the embedded actual image watermark still has good anti-noise interference capability, and the extracted watermark is relatively close to the result without attack. Therefore, the extraction algorithm has better robustness to noise interference.
(4) Median filtering
The Lena digital image after embedding the actual watermark shown in fig. 5-1 is subjected to median filtering processing, and the size of the filter window is selected to be [3 × 3], so that the Lena digital image with the watermark shown in fig. 9 is obtained. At this time, the PSNR drops to 29.9092 dB. The image watermark extraction is carried out on the Lena digital image shown in the figure 5-1 by the method of the invention, wherein NC is 0.9938 which is very close to 1, and BER is 0.012 which is approximately equal to 0. Experimental data show that the embedded actual image watermark still has relatively ideal anti-filtering capability, so that the extraction algorithm has relatively good robustness on filtering processing.
(5) Geometric cutting
The Lena digital image after the actual watermark is embedded as shown in fig. 5-1 is subjected to geometric segmentation processing, and 128 × 128 pixel points are cut from the left side, so that the watermark Lena digital image as shown in fig. 10 is obtained. As can be seen from fig. 10, when the Lena digital image of the watermark is greatly damaged, PSNR is 17.1907dB, the method of the present invention is used to perform image watermark extraction on the Lena digital image of the watermark shown in fig. 5-1, NC is 0.9899, which is very close to 1, and BER is 0.0109, which is approximately 0. Experimental data show that the method has better robustness for geometric cutting, and the embedded actual image watermark can still be well extracted, so that the extraction algorithm has strong robustness for geometric cutting processing.
(6) Geometric rotation
The Lena digital image after the actual watermark is embedded as shown in fig. 5-1 is rotated by 10 degrees in the counterclockwise direction and 10 degrees in the clockwise direction respectively, and the watermark Lena digital images as shown in fig. 11-1 and fig. 11-2 are obtained, wherein the PSNR is 17.294dB and 17.3578 dB. The image watermark extraction is carried out on the Lena digital image of the watermark shown in the figure 5-1 by using the method of the invention, at the moment, the NC values are 0.9468 and 0.9263 which are respectively very close to 1, and the BER is equal to 0.012 and 0.0121. Experimental data show that the method still has strong robustness to geometric rotation attack, and the embedded actual image watermark can be well extracted, so that the extraction algorithm has strong robustness to geometric rotation processing.
In order to verify the general applicability of the extraction algorithm in the present invention, different carrier images are exchanged next, but the watermark image is kept unchanged, and then the corresponding PSNR, BER and NC values are found to check the robustness and imperceptibility of the algorithm.
In the part of experiments, the improved algorithm of the invention is continuously tested under the condition that the carrier image is changed and the watermark image is not changed, wherein the names of the new carrier images are Baboon, Woman, Peper and Cameraman respectively, and the images are downloaded from the USC-SIPI image set database. The experimental watermark image is still "Henan" as shown in FIG. 3-2.
Without any attack, PSNR, BER and NC values were calculated, and the experimental results are shown in table 1, i.e. the results of robustness testing of 4 different carrier images. Experimental results show that for different carrier images, PSNR values are high, NC is relatively close to 1, BER values are almost close to 0, and the improved algorithm of the invention can be effectively proved to have good robustness and imperceptibility.
TABLE 1 PSNR, BER and NC values for different carrier images
Figure GDA0002772680330000151
Figure GDA0002772680330000161
In order to make the above test results more detailed, the carrier image Woman is selected from table 1, the watermark image is still as shown in fig. 3-2, the carrier image Woman is as shown in fig. 12-1, and fig. 12-2 is the carrier image after embedding the watermark according to the present invention, and it can be seen that the image containing the watermark is almost not different from the original carrier image, the PSNR value is very high, reaching 25.0947dB, and the result fully illustrates that fig. 12-2 is basically consistent with fig. 12-1, which fully satisfies the imperceptibility of the watermark and the applicability of the system.
Fig. 12-3 shows that the watermark image is extracted by using the present invention, and experiments show that the carrier Woman shown in fig. 12-2 after embedding the watermark can extract the embedded actual image watermark almost without loss, when NC is 0.9293, which is very close to 1, and BER is 0.008, which is very close to 0. Thus, the extracted watermark is essentially the original watermark image. In order to further detect the method of the present invention, the Woman digital image of the carrier image after embedding the watermark shown in fig. 12-2 is subjected to various attack processes to verify the robustness of the digital image watermark embedding and extracting algorithm of the present invention. The results of the experiment are shown in table 2.
TABLE 2 PSNR, BER and NC values obtained after various attacks on the Woman Carrier image
Attack type PSNR(dB) BER NC
Brightness adjustment (+75) 15.4819 0.012 0.9527
Brightness adjusting (-50) 19.5946 0.0095 1
Histogram equalization 23.8453 0.0067 1
Gaussian noise (mu 0 and sigma 0.02) 26.1688 0.0032 0.9357
Median filter (9X 9) 24.9001 0.0152 0.9341
Geometric shear (left 251X 251) 35.1004 0.0084 0.9919
Geometric clockwise rotation of 30 ° 16.0507 0.0132 0.87
Geometric counterclockwise rotation by 10 ° 20.4235 0.0116 0.9317
To further verify the general applicability of the extraction algorithm in the present invention, different watermark images are then changed to "a" (as shown in fig. 13-1), "university of south river university" (as shown in fig. 13-2), and "large south river" (as shown in fig. 13-3), respectively, but the carrier Lena image remains unchanged, and then the corresponding PSNR, BER, and NC values are found to check the robustness and imperceptibility of the algorithm.
In this part of the experiment, in the case where the watermark image shown in fig. 13-3 was used, but the carrier image was still the same as that shown in fig. 3-1, similarly, the robustness and the imperceptibility of 3 watermarks were tested without any attack treatment, and the experimental results are shown in table 3. Experimental results show that under the algorithm of the invention, the robustness and the imperceptibility of the watermark are nearly perfect.
TABLE 3 different watermark images and their corresponding PSNR, BER and NC values
Figure GDA0002772680330000171
The experimental results in table 3 show that the PSNR of Lena images embedded with different watermarks is higher for the same carrier, which means that the degree of damage to the carrier images caused by embedding watermark information using the method of the present invention is smaller; the NC values of the images are very close to 1, and the result shows that the extracted watermark image has higher approximation degree with the original watermark image; the BER value is very close to 0. In conclusion, the method of the invention has good applicability and universality.
In order to further analyze the method of the present invention, fig. 13-3 is a watermark image, and fig. 3-1 is a carrier image, and the embedding of the watermark and the extraction of the watermark are performed. FIG. 14-1 is the Lena digital image after embedding the watermark according to the method of the present invention, and it can be seen from FIG. 14-1 that the quality of the Lena digital image after embedding the watermark image has not changed at all, the PSNR is very high, which reaches 30.7814dB, and is basically consistent with the original Lena digital image shown in FIG. 3-1, and the requirement of the imperceptibility of the watermark is satisfied. Fig. 14-2 is a watermark image extracted according to the method of the present invention. The experiment shows that NC is 0.9898, which is very close to 1. Thus, the extracted watermark approximates the original watermark image.
In the following, 6 attack processes are performed on the Lena digital image after the watermark is embedded in fig. 14-1 to verify the robustness of the digital image watermark embedding and extracting algorithm of the present invention. The results of the experiment are shown in table 4:
TABLE 4 FIG. 13-3 for watermark images and their corresponding PSNR, BER and NC values
Attack type PSNR BER NC
Brightness adjustment (+75) 15.3151 0.0224 0.7603
Brightness adjusting (-50) 13.6819 0.0086 0.7070
Histogram equalization 18.4331 0.0044 0.8352
Gaussian noise (mu 0 and sigma 0.02) 19.4596 0 0.8112
Median filter (9X 9) 26.8836 0.0212 0.9941
Geometric shear (left) 251×251) 16.3979 0.0154 0.9892
Geometric clockwise rotation of 30 ° 15.4924 0.0216 0.9077
Geometric counterclockwise rotation by 10 ° 16.9346 0.0197 0.9217
As shown in the experimental results in table 4, the scheme of the present invention has strong robustness, and particularly when the carrier image with the embedded watermark is subjected to median filtering (9 × 9), the PSNR value is high and reaches 26.8836, so that it can be shown that the carrier image with the embedded watermark is substantially consistent with the original carrier image.
In order to verify the applicability of the extraction algorithm in a deeper level, different carrier images are changed into Baboon, Peper and Woman respectively, the watermark image is the same as that in the figure 3-2, 5 traditional signal attacks are carried out on the carrier image embedded with the watermark, and a corresponding NC value is calculated to check the robustness of the algorithm.
In the part of experiments, 5 traditional signals are mainly used for attacking different carriers embedded with the same watermark, and corresponding watermark images are extracted to verify the robustness of the method. The results of the experiment are shown in table 5, and 6 attacks were brightness adjustment (+75), brightness adjustment (-50), histogram equalization, gaussian noise, median filtering, and clockwise rotation by 30 °. Generally, NC values above 0.80 are acceptable. From the experimental results of Table 5, it is understood that most of the values are within the range. Therefore, the scheme of the invention has strong robustness to the 6 traditional signal attacks.
TABLE 5 NC values obtained after the same watermark is attacked by different carriers
Figure GDA0002772680330000181
The invention aims to test the geometric attack resistance of the embedding and extracting system. And rotating the carrier image containing the zero watermark at a certain angle and shearing at a certain proportion. Table 6 lists the results of the spin, shear experiments.
TABLE 6 NC values after geometric attack on carrier image after embedding watermark
Figure GDA0002772680330000182
From the experimental results in table 6, it can be observed that the NC of geometric attacks on different carrier images embedded with the same watermark is all over 0.82, that is, the improved method of the present invention can effectively resist geometric attacks.
Meanwhile, in the invention, Arnold transformation + traditional BP neural network, improved Arnold transformation + traditional BP neural network and improved Arnold transformation + dynamic BP neural network are combined to extract the watermark of the carrier Lena image embedded with the watermark as shown in figure 5-1, and the comparative experimental result is shown in Table 7.
Table 7 comparison of experimental results of watermark extraction for Lena images containing watermark carrier by different schemes
Type of scenario PSNR NC BER
Arnold transformation + dynamic BP neural network 32.3867 0.9895 0.0471
Improved Arnold transformation + traditional BP neural network 32.6517 0.9894 0.0454
Improved Arnold transformation + dynamic BP neural network 33.3627 0.9999 0.037
Furthermore, the invention also compares the image watermarking method based on the improved Arnold transformation and dynamic BP neural network (called the Arnold transformation and the dynamic BP neural network for short) with other 3 related image watermarking schemes. The 3 schemes are "singular value decomposition and inverse Neural network based multi-wavelet domain digital watermarking algorithm" (2010, 27(4):219-222.) "(abbreviated as" SVD + inverse Neural network ")," shore root, grand nakai and other written "Neural network classification based image watermarking algorithm" (computer application, 2011,31(6): 1505)) "(abbreviated as" Arnold transformation + BP Neural network "), and" Zhang J, Wang NC, Xiong F written "a novel watermark for imaging Neural network using" (proceedings of IEEE International Conference Machine Learning and cyber networks ", 2002, 1408.p-1408." (abbreviated as "Neural network") for comparison, the experimental result is shown in fig. 15, and the corresponding NC value is calculated in the same software and hardware environment. The carrier image is a Lena image as shown in fig. 3-1 and the watermark image is shown in fig. 3-2. In this part of the comparison test, 5 different signal attacks were left-hand cutting of 128 × 128 pixels, superposition of gaussian noise (μ ═ 0 and σ ═ 0.01), median filtering ([3 × 3]), clockwise rotation by 10 °, and JPEG compression by 10%, respectively. As can be seen from the comparison result in fig. 14, the improved Arnold transformation and dynamic BP neural network technology proposed by the present invention can extract the watermark well, and the NC value under the above 5 attack conditions is superior to the other 3 schemes. Therefore, the scheme of the invention has good robustness in resisting other attacks.
In conclusion, the invention encrypts the original watermark image by using the improved Arnold transformation, trains the pixel points of the watermark embedded into the carrier image based on the dynamic BP neural network, not only increases the key parameter and improves the security, but also realizes the imperceptibility of the watermark. The improved Arnold transformation is used when the original watermark is scrambled and encrypted, and compared with the original Arnold transformation, the introduced parameters are increased, namely the number of keys is increased, so that the security of the image watermark is improved. The dynamic BP neural network is introduced, and the main difference between the dynamic BP neural network and the conventional BP neural network is that the dynamic BP neural network can dynamically adjust the learning rate according to the output error of the neural network calculated at this time and the output error of the neural network calculated at the last iteration, so that the convergence rate is greatly improved. Embedding the scrambled watermark image into a hidden layer of a dynamic BP neural network, wherein the change amplitude of the pixel value of the carrier image is small, so that not only is the complete imperceptibility of the image watermark realized, but also the damage to the original digital image data is reduced, the problem of image quality reduction is avoided, and the integrity of the information of the original digital image and the imperceptibility of the watermark-containing carrier image are maintained; and fourthly, when the watermark is extracted, the original pixel value of the carrier image is predicted by using the dynamic BP neural network, and the watermark embedding position is found by comparing the original pixel value with the pixel value of the carrier image after the watermark is added, so that the spatial domain characteristics of the image are fully utilized, and the precision and the efficiency of the prediction result are improved. The method is different from the traditional image watermark embedding and extracting method, and the essence of the method is that the original watermark image is encrypted by utilizing the improved Arnold transformation and the scrambled watermark image is embedded into the carrier image by utilizing the dynamic BP neural network, and the size of the pixel in the embedding position is still extracted even the carrier image containing the watermark is subjected to various attacks, so that the correct detection of the watermark signal is realized, the embedding and extracting method has strong robustness to various conventional image attacks, and the contradiction between the robustness and the imperceptibility of the image watermark is well balanced.
The basic idea of the present invention lies in the above solution, and it is obvious to those skilled in the art that it is not necessary to spend creative efforts to design various modified models, formulas and parameters according to the teaching of the present invention. Variations, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention, and still fall within the scope of the invention.

Claims (7)

1. A watermark embedding method based on a dynamic BP neural network is characterized by comprising the following steps:
1) processing the original watermark image W by adopting improved Arnold transformation to obtain a scrambled watermark image W';
2) training an original carrier image block through the established dynamic BP neural network to obtain an output O of a hidden layer; embedding a scrambled watermark image W 'into an output O of the hidden layer, and then carrying out dynamic BP neural network training on the carrier image embedded with the scrambled watermark image W' to obtain a carrier image embedded with a watermark;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, increasing the current learning rate;
the improved Arnold transformation in step 1) is according to the following formula
Figure FDA0002772680320000011
To obtain
Figure FDA0002772680320000012
Making n iterations to watermark the position coordinate (x) of the image0,y0) As an initial value, an embedding position (x) corresponding to the watermark image is obtainedn,yn) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure FDA0002772680320000013
1≤xn≤N,1≤ynN is not more than N, a, b, c, d, e and f are positive integers, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
2. The dynamic BP neural network-based watermark embedding method according to claim 1, wherein the learning rate is generated according to the following formula:
Figure FDA0002772680320000014
if the ratio of the output error of the neural network calculated this time to the output error of the neural network calculated in the last iteration is greater than a set value B, reducing the current learning rate; otherwise, increasing the current learning rate; the method for reducing the learning rate is to multiply the current learning rate by b1(ii) a The method of increasing the learning rate is to multiply the current learning rate by a positive number b2(ii) a Wherein, b1Less than 1, b2Greater than 1, b1And b2Are all positive numbers.
3. The watermark embedding method based on the dynamic BP neural network as claimed in claim 2, wherein in step 2), a 64 × 16 × 64 three-layer dynamic BP neural network is established, the transfer function is a sigmoid function, the training function is adjusted to a trainlm function, the training frequency is 40, the threshold value of the neuron activation function is 0.05, the learning rate is dynamically adjusted by comparing the output error of the neural network calculated this time with the output error of the neural network calculated in the previous iteration in the training process of the BP neural network, and the initial value of the learning rate is 0.5.
4. A watermark extraction method corresponding to the watermark embedding method of claim 1, characterized by comprising the steps of:
1) taking the carrier image block embedded with the watermark as an input layer and the original carrier image as an output layer, and training the carrier image block embedded with the watermark through an established dynamic BP neural network to obtain an output O' of the hidden layer; carrying out difference on O' and O to obtain a difference image, wherein the difference image is the extracted watermark image; the output O 'of the hidden layer is the output of the hidden layer obtained by training the carrier image block embedded with the watermark by the dynamic BP neural network, and the output O' of the hidden layer is the output of the hidden layer obtained by training the original carrier image block by the dynamic BP neural network;
2) obtaining an original watermark image by utilizing improved Arnold inverse transformation of the obtained watermark image;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, increasing the current learning rate; the improved Arnold inverse transformation formula in the step 2) is as follows:
Figure FDA0002772680320000021
carry out n iterationsTo scramble the position coordinates (x) of the watermark imagen,yn) As an initial value, the position (x) corresponding to the original watermark image is obtained0,y0) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure FDA0002772680320000022
a. b, c, d, e and f are positive integers, and x is more than or equal to 1n≤N,1≤ynN is less than or equal to N, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
5. The watermark extraction method according to claim 4, wherein a 64 × 16 × 64 three-layer dynamic BP neural network is established in step 1), the transfer function is a sigmoid function, the training function is adjusted to a trainlm function, the training frequency is 40, the threshold of the neuron activation function is 0.05, and the learning rate is dynamically adjusted by comparing the output error of the neural network calculated this time with the output error of the neural network calculated at the previous iteration in the training process of the BP neural network, wherein the initial value of the learning rate is 0.5.
6. A watermark embedding device based on a dynamic BP neural network is characterized by being used for executing the following steps:
processing the original watermark image W by adopting improved Arnold transformation to obtain a scrambled watermark image W';
training an original carrier image block through the established dynamic BP neural network to obtain an output O of a hidden layer; embedding a scrambled watermark image W 'into an output O of the hidden layer, and then carrying out dynamic BP neural network training on the carrier image embedded with the scrambled watermark image W' to obtain a carrier image embedded with a watermark;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, increasing the current learning rate;
the improved Arnold transform is based on the following formula
Figure FDA0002772680320000031
To obtain
Figure FDA0002772680320000032
Making n iterations to watermark the position coordinate (x) of the image0,y0) As an initial value, an embedding position (x) corresponding to the watermark image is obtainedn,yn) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure FDA0002772680320000033
1≤xn≤N,1≤ynN is not more than N, a, b, c, d, e and f are positive integers, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
7. Watermark extraction means corresponding to the watermark embedding apparatus of claim 6, characterized by being adapted to perform the steps of:
taking the carrier image block embedded with the watermark as an input layer and the original carrier image as an output layer, and training the carrier image block embedded with the watermark through an established dynamic BP neural network to obtain an output O' of the hidden layer; carrying out difference on O' and O to obtain a difference image, wherein the difference image is the extracted watermark image; the output O 'of the hidden layer is the output of the hidden layer obtained by training the carrier image block embedded with the watermark by the dynamic BP neural network, and the output O' of the hidden layer is the output of the hidden layer obtained by training the original carrier image block by the dynamic BP neural network;
obtaining an original watermark image by utilizing improved Arnold inverse transformation of the obtained watermark image;
the learning rate of the established dynamic BP neural network during training is compared with the output error of the neural network calculated during the last iteration according to the output error of the neural network calculated currently, and if the ratio of the output error of the neural network calculated currently to the output error during the last iteration is greater than a set value B, the current learning rate is reduced; otherwise, increasing the current learning rate;
the improved Arnold inverse transformation formula is as follows:
Figure FDA0002772680320000041
performing n iterations to scramble the position coordinates (x) of the watermark imagen,yn) As an initial value, the position (x) corresponding to the original watermark image is obtained0,y0) Wherein 1 is less than or equal to x0≤N,1≤y0≤N,
Figure FDA0002772680320000042
a. b, c, d, e and f are positive integers, and x is more than or equal to 1n≤N,1≤ynN is less than or equal to N, and the area protection requirement is that ad-bc is 1; and N is the size of the watermark image.
CN201710432956.2A 2017-06-09 2017-06-09 Watermark embedding and extracting method and device based on dynamic BP neural network Active CN107240061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710432956.2A CN107240061B (en) 2017-06-09 2017-06-09 Watermark embedding and extracting method and device based on dynamic BP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710432956.2A CN107240061B (en) 2017-06-09 2017-06-09 Watermark embedding and extracting method and device based on dynamic BP neural network

Publications (2)

Publication Number Publication Date
CN107240061A CN107240061A (en) 2017-10-10
CN107240061B true CN107240061B (en) 2021-01-12

Family

ID=59986755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710432956.2A Active CN107240061B (en) 2017-06-09 2017-06-09 Watermark embedding and extracting method and device based on dynamic BP neural network

Country Status (1)

Country Link
CN (1) CN107240061B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197488B (en) * 2017-12-25 2020-04-14 大国创新智能科技(东莞)有限公司 Information hiding and extracting method and system based on big data and neural network
CN110874808A (en) * 2018-08-31 2020-03-10 浙江大学 Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and equipment
CN110889796B (en) * 2018-09-07 2021-11-02 浙江大学 Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and equipment
CN109544438A (en) * 2018-11-20 2019-03-29 北京工业大学 A kind of digital watermark method based on neural network and dct transform
CN111383155B (en) * 2018-12-28 2023-04-21 广州市百果园信息技术有限公司 Watermark identification method, device, equipment and storage medium
US11537689B2 (en) * 2019-10-10 2022-12-27 Baidu Usa Llc Method and system for signing an artificial intelligence watermark using a kernel
CN112750065B (en) * 2019-10-31 2022-12-09 阿里巴巴(中国)网络技术有限公司 Carrier object processing and watermark embedding method, device and electronic equipment
CN111523094B (en) * 2020-03-25 2023-04-18 平安科技(深圳)有限公司 Deep learning model watermark embedding method and device, electronic equipment and storage medium
CN113012019B (en) * 2021-04-23 2023-12-26 中国科学院空间应用工程与技术中心 Image watermarking method, system and electronic equipment
CN115391516B (en) * 2022-10-31 2023-04-07 成都飞机工业(集团)有限责任公司 Unstructured document extraction method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662686A (en) * 2009-09-07 2010-03-03 江南大学 DCT domain video watermark treatment method based on texture features

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8005254B2 (en) * 1996-11-12 2011-08-23 Digimarc Corporation Background watermark processing
US20100179935A1 (en) * 2009-01-13 2010-07-15 Gm Global Technology Operations, Inc. Spiking dynamical neural network for parallel prediction of multiple temporal events
CN103248854B (en) * 2013-04-27 2016-04-20 东北大学 Based on the medical image encryption method of even scramble and chaotic maps
CN104217389B (en) * 2014-01-22 2017-09-05 河南师范大学 A kind of method and apparatus based on the image watermark insertion, the extraction that improve Arnold conversion
CN104361548B (en) * 2014-10-28 2017-10-20 河南师范大学 Image watermark insertion and extracting method based on BP neural network digital image compression
CN104616244B (en) * 2015-01-24 2018-01-09 河南师范大学 Image watermark insertion and extracting method based on BP neutral net compression domains
CN104810022B (en) * 2015-05-11 2018-06-15 东北师范大学 A kind of time domain digital audio water mark method based on audio breakpoint

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662686A (en) * 2009-09-07 2010-03-03 江南大学 DCT domain video watermark treatment method based on texture features

Also Published As

Publication number Publication date
CN107240061A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
CN107240061B (en) Watermark embedding and extracting method and device based on dynamic BP neural network
Li et al. Double-encrypted watermarking algorithm based on cosine transform and fractional Fourier transform in invariant wavelet domain
Ou et al. High payload image steganography with minimum distortion based on absolute moment block truncation coding
Kang et al. Robust and secure zero-watermarking algorithm for color images based on majority voting pattern and hyper-chaotic encryption
Shen et al. A DWT-SVD based adaptive color multi-watermarking scheme for copyright protection using AMEF and PSO-GWO
Li et al. Blind and safety-enhanced dual watermarking algorithm with chaotic system encryption based on RHFM and DWT-DCT
Hadmi et al. Perceptual image hashing
Liu et al. Robust blind image watermarking based on chaotic mixtures
CN111882477A (en) Self-adaptive zero-watermarking method combining visual password and enhanced singular value decomposition
Nazir et al. Robust secure color image watermarking using 4D hyperchaotic system, DWT, HbD, and SVD based on improved FOA algorithm
Wang et al. RD-IWAN: residual dense based imperceptible watermark attack network
Hadmi et al. A robust and secure perceptual hashing system based on a quantization step analysis
CN114998080A (en) Face tamper-proof watermark generation method, tamper detection method and attribute detection method
Sanku et al. Digital image watermarking in RGB host using DWT, SVD, and PSO techniques
Jain et al. Fragile watermarking for image authentication: survey
Araghi et al. Analysis and evaluation of template based methods against geometric attacks: a survey
Roy et al. A robust reversible image watermarking scheme in DCT domain using Arnold scrambling and histogram modification
Kumari et al. Digital image watermarking using DWT-SVD with enhanced tunicate swarm optimization algorithm
Juvvanapudi et al. Hybrid Encryption-based Color Image Watermarking using Improved GWO with LSB
Sharma et al. Digital image watermarking using machine learning techniques: a technical review
Kishan et al. Efficient large invisible color watermark embedding using conditional deep autoencoder model for medical applications
CN113034335B (en) Watermark embedding method and system and watermark extracting method and system for watermark-containing image
Juvvanapudi et al. An Optimal and Hybrid Encryption-based Integer Wavelet Transform with DCT for Color Image Watermarking.
Sharma et al. Steganalysis of Reversible Digital Watermarking Algorithm Based on LWT and SVD
Wu et al. Image Robust Watermarking Method Based on DWT‐SVD Transform and Chaotic Map

Legal Events

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