A list,

With the rapid development of computers and the Internet, many of people’s creations and achievements are stored and released in digital form. However, digital works are easy to be illegally copied, forged and altered, which makes many copyright owners reluctant to use the Internet to publicize their works, thus hindering their own development. At present, copyright protection of digital works is not only a legislative issue, but also a very important technical problem. From the technical point of view, the embedding and detection of copyright information in digital media are two key problems in copyright protection of digital works. It integrates the characteristics of authentication and identification of traditional cryptography, and adds the requirement of robustness. Copyright protection information must be closely combined with protected data, and the identification process of copyright protection information must have anti-interference ability. In this case, digital watermarking technology arises at the historic moment.

  1. Overview of digital watermarking technology

When it comes to watermarks, people always think of watermarks in banknotes. Banknote watermarking has two characteristics. First, the watermark is not visible under normal circumstances, but only under special observation conditions (the watermark in banknote is visible under light). Second, the watermark information must be related to the carrier object (in this case, the authenticity of the banknote).

1.1 Characteristics of digital watermarking technology

Provability: The ability to provide completely reliable evidence for copyrighted digital products.

Invisibility: that is, digital products embedded with watermark information will not have obvious quality decline, hidden data is not easy to detect; In addition, the watermark cannot be recovered by statistical method.

Robustness: the added digital watermark must be immune to the attack on the host image and cannot be lost due to some operation on the host image.

1.2 Application of digital watermarking technology

Watermarking technology is widely used in the following 7 application areas: broadcast monitoring, owner identification, ownership verification, transaction tracking, content authenticity identification, copy control and device control.

  1. Theoretical basis

2.1 Wavelet transform theory

Since 1986, the research of theory, method and application of wavelet analysis has been in the ascendant. As a mathematical tool, wavelet transform is a major breakthrough of Fourier transform and window Fourier transform, which are known by people, and brings revolutionary influence to signal analysis, image processing and other nonlinear scientific research fields.

The textural and masking properties of the human visual system (HVS) indicate that the more complex the texture is, the brighter the background is, and the less sensitive human vision is to slight changes in the texture. A large number of studies have shown that when human eyes process image signals, they filter the image into several sub-band signals, which occupy different frequency ranges, that is, images in HVS are considered to be composed of information in different frequency ranges. Its characteristics are as follows: human eyes are insensitive to the edges and contours of local structures; It shows high sensitivity to low frequency signals. HVS shows different sensitivity to texture details in different directions in a large range of the same product, which is similar to the multi-resolution analysis of wavelet transform. Wavelet transform is the development of Fourier transform, is the local transformation of space and frequency, it has good localization characteristics in both frequency domain and time domain. The basic idea of wavelet transform in image processing is to decompose multi-resolution image into sub-image of different space and independent frequency band, and then process the coefficient of sub-image.

According to S. Mallat’s tower decomposition algorithm, the image is decomposed into four subgraphs after wavelet transform: the middle and high frequency detail subgraph of horizontal direction LH, vertical direction HL and diagonal direction HH, and the low frequency approximation subgraph LL. The low frequency part can be further decomposed to produce three high frequency band series LHn, HLn, HHn (n=1, 2, 3) and one low frequency band LL3 (see Figure 1).

LL3 in Figure 1 represents the best approximation to the original image under the maximum scale and minimum resolution determined by the wavelet transform decomposition series. Its peer characteristics are similar to the schematic diagram, and most of the image energy is concentrated here. The high band series represents the edges and textures of the image.

2.2 Application of wavelet transform

Wavelet analysis has a wide range of applications, including: many subjects in mathematics; Signal analysis, image processing; Quantum mechanics, theoretical physics; Military electronic Countermeasures and intelligence of weapons; Computer classification and recognition; The synthesis of music and language; Medical imaging and diagnosis; Seismic exploration data processing; Fault diagnosis of large machinery; For example, in mathematics, it has been used in numerical analysis, construction of rapid numerical methods, curve and surface construction, differential equation solving, cybernetics and so on. In signal analysis of filtering, noise, compression, transmission, etc. In image processing, image compression, classification, recognition and diagnosis, decontamination, etc. In terms of medical imaging, it can reduce the time of B ultrasound, CT and MRI, and improve the resolution. Wavelet analysis for signal and image compression is an important aspect of wavelet analysis applications. It is characterized by high compression ratio, fast compression speed, invariable signal and image characteristics after compression, and anti-interference in transmission. There are many compression methods based on wavelet analysis, the most successful ones are wavelet packet best base method, wavelet domain texture model method, wavelet transform zerotree compression, wavelet transform vector compression and so on. The application of wavelet in signal analysis is also very extensive. It can be used for boundary processing and filtering, time-frequency analysis, signal-noise separation and weak signal extraction, fractal index, signal recognition and diagnosis and multi-scale edge detection, etc. (3) The application of engineering technology, etc. Including computer vision, computer graphics, curve design, turbulence, remote universe research and biomedical aspects. From the perspective of image processing, wavelet transform has the following advantages: (1) wavelet decomposition can cover the whole frequency domain (provides a complete mathematical description) 2] by selecting suitable filter, wavelet transform can greatly reduce or eliminate the proposed obtains the correlation between different characteristics (3) wavelet transform has the “zoom” feature, available in low frequency high frequency resolution and low time resolution (wide analysis window), at high frequencies, Low frequency resolution and high time resolution are available (narrow analysis window)

3.DWT transform domain digital watermarking technology

3.1 Digital watermark embedding technology

Image watermarking technology can be divided into two categories according to the way of watermark embedding: time/space technology (the watermark is directly embedded in the brightness value of the image) and transform domain technology (the image does some mathematical transformation, and then the watermark is embedded in the transform coefficient). The early research on watermarking is basically based on time-space. The algorithm is relatively simple and has strong real-time performance, but it is not as robust as transform domain algorithm. At present, transform domain methods are increasingly popular, including DCT, DWT and DFT transform domain algorithms.

The advantages of the transform domain algorithm are as follows: 1. The watermark information is distributed to all pixels in the spatial domain, which is conducive to improving the invisibility of the watermark. 2. It can be conveniently combined with certain features of the HVS(human visual system). 3, good robustness, image compression, common image filtering and noise have a certain resistance. DCT is a global transformation from image space to frequency space. Due to the global nature of DCT, the error of any data in the transformation space will affect every pixel in the image. Wavelet transform is used to decompose the original image into multi-band image, which can adapt to the visual characteristics of human eyes and make the watermark embedding and detection can be divided into multiple levels. The digital watermarking method in wavelet transform domain has the advantages of time-space method and DCT transform domain method.

After a series of signal processing, if the change of the observer’s subjective feeling image is not large, so the image processing of low and intermediate frequency wavelet coefficients before and after the change of amplitude is also limited, in addition coefficient of amplitude change of direction (bigger or smaller) in most cases is different also, therefore, low and intermediate frequency coefficient of the average change range is very limited.

In this algorithm, part of low and medium frequency coefficients are selected and divided into coefficient blocks of a certain size, and the watermark sequence is embedded by quantizing the average value of coefficient blocks.

3.1.1 Selection coefficient

Let X(m, n) be a grayscale image of size M* n with grayscale level of 2 “(1≤m≤ m, 1≤n≤ n), where m, n and a are positive integers. X(m, n) is decomposed by l-layer (l is positive integer) wavelet to obtain 3× L detailed images and a low-frequency approximate image. L = 1,2… L; Mi = 1,2… , M / 2L; Nj = 1,2… , N / 2L represents the selected wavelet coefficients, where L represents the decomposition level, k=h, v and d represent the horizontal, vertical and diagonal sub-images of the l layer respectively. Considering that quantization of low-frequency subgraph may produce large distortion, watermark is not embedded in the subgraph, and middle-frequency coefficients except low-frequency coefficients are selected [3].

3.1.2 Divide into blocks and calculate the average value of each block

According to the embedding information and algorithm robustness requirements, the larger the block, the better the robustness of the watermark, but the embedded watermark bit is less. Divide XK, l (mi, nj) into blocks of a certain size, and use Block (s, t) to represent the coefficient blocks of size s×t in XK, l (mi, nj), where s= 1,2… , mi, t= 1,2… , nj, and b are positive integers, indicating the block number. Its average value is Ave =∑Block (S, t)/(S *t) : where ∑Block is the accumulative sum of the amplitude of the coefficients in the Block.

3.1.3 quantitative

The embedding of watermark sequence W is completed by quantization of Ave. For example, quantization into odd numbers means embedding “1”, and quantization into even numbers means embedding “0”. According to the compromise between robustness and concealment, the quantization interval △l, l= 1,2… , L represents the number of decomposition layers. For the l layer of low frequency, due to the huge coefficient amplitude, quantization can be performed at a large interval. For the L -1,… , 1 levels are quantified with decreasing intervals.

Ave was quantized to the nearest odd and even point according to wi ={0,1}. Dat(I, j) is used to represent a wavelet coefficient in the Block, and the quantized coefficient is represented by Dat ‘(I, j), where I = 1,2… , s; J = 1,2… , t.

Let T=Ave / △ L, Turdat=rem([T], 2) where [] means rounding, rem means finding the remainder of [T] divided by 2.

If Turdat is the same as WI, the quantized wavelet coefficient is

Dat ‘(I, j)=Dat(I, j)+[T]×△ L-ave

If Turdat differs from WI, the wavelet coefficients are quantified as follows

Dat ‘(I, j)=Dat(I, j)+ ([T]+1) ×△ L — Ave, T≥[T]

Dat ‘(I, j)=Dat(I, j)+ ([T]-1) ×△l — Ave, T<[T]

3.1.4 refactoring

The same wavelet base is used to generate images containing watermarks through inverse wavelet transformation, and the wavelet base, the number of wavelet decomposition layers, the selected coefficient region, the blocking method, the quantization interval, and the parity correspondence are recorded to form the key [4].

3.2 Digital watermark extraction technology

The extraction of watermark is determined by embedding method, which is the reverse process of embedding method. Firstly, wavelet transform is carried out on the image to be detected, the position of embedding watermark is determined according to the key, and the reverse operation of scrambling the watermark is carried out. The robustness and transparency of the watermarking algorithm can be measured by calculating the normalized cross-correlation function Nc and the peak signal-to-noise ratio Rpsnr.

Calculation parameters :(find the formula by yourself)

  1. Normalized cross correlation function Nc
  2. Peak signal-to-noise ratio Rpsnr

Ii. Source code

clear all
clc
[a,fs,bits]=wavread('s.wav'); % Please modify the path subplot(3.1.1); plot(a); title('Original audio waveform')
w=imread('32.bmp'); % Please modify the path subplot(3.1.2); imshow(w) title('Original watermark')
w1=w(:);
[c,l]=wavedec(a,3.'haar'); %3Ca3 = AppCoef (c, L,3.'haar'); % extract3The lowest frequency part cd3= DetCoef (C, L,3); % extract3The sub-low frequency part cd2= DetCoef (C, L,2);
cd1=detcoef(c,l,1); % to the adjacent60The coefficients for the quantization group, then from the low frequency components in the first60A to60* (1024+1) as the quantization embedding point q=1.7263 e-004% is greater than in the lowest frequency component0.00001The coefficient with the smallest absolute value is the quantization step, and this value is saved as the keyfor i=1:1024
    ave(i)=sum(ca3(i*60:(i+1) *60)) /60; Because ca3 coefficient has both positive and negative, ave(I)∈1.0000.11111Z (I)=fix(ave(I)/q+1/2); % so the following z(I)∈(- 1000..1000Q ∈(0.001.0.001)
end
for i=1:1024
        if mod(z(i),2)==w1(i)
            cxzc=0;
    else
        if mod(z(i),2)~=w1(i)&&z(i)==fix(ave(i)/q)&&z(i)>=0||mod(z(i),2)~=w1(i)&&z(i)~=fix(ave(i)/q)&&z(i)<0
          ca3(i*60:(i+1) *60)=ca3(i*60:(i+1) *60)+q;
        else 
        ca3(i*60:(i+1) *60)=ca3(i*60:(i+1) *60)-q;
        end
     end
end
%Idwt
c1=[ca3',cd3',cd2',cd1']; % this step is important, otherwise the following audio b reconstruction will be the same as the original audio'haar'); %b is the audio data subplot(3.1.3);
plot(b);
title('Embedded audio');
wavwrite(b,fs,bits,'S32marked.wav');
psnr_value=psnr(a,b)

%------test---------
%[c,l]=wavedec(b,3.'haar'); %3Ca3 = appCoef (c,l,'haar'.3);
%for i=1:1024
%    ave(i)=sum(ca3(i*30:(i+1) *30)) /30;
%    zz(i)=(mod(fix(ave(i)/q+1/2),2));
%end
clear all
clc
a=wavread('marked.wav');
subplot(3.1.1); plot(a); title('Watermarked audio waveform')
w_source=imread('mark.bmp');
subplot(3.1.2); imshow(w_source) q=1.7263 e-004; %q should be saved as the key at embed time, so use the embed value directlyfor i=1:1024
    ave(i)=sum(ca3(i*60:(i+1) *60)) /60;
    w1(i)=(mod(fix(ave(i)/q+1/2),2));
end
Copy the code

3. Operation results

Fourth, note

Version: 2014 a