You are on page 1of 8

Journal of Computational Information Systems 10: 12 (2014) 51135120

Available at http://www.Jofcis.com

A Double Encrypted Digital Image Watermarking


Algorithm Based on Compressed Sensing
Xia LIU, Jianqiao YU ,

Yongdou YUE, Yuyong WEI

Institute of Computer and Information Science, Southwest University, Chongqing 400715, China

Abstract
In order to ameliorate the secrecy of image watermarking algorithm and the drawback of watermarking
algorithm based on single compressed sensing (CS) that cannot resist large-scale attacks, a double
encrypted digital image watermarking algorithm based on CS is presented in this paper. According to
the secrecy property of CS, the watermark and the process of watermark embedding are both encrypted
by CS. Then use orthogonal matching pursuit to reconstruct watermarked image. Theoretical analysis
and simulation experimental results show that the proposed algorithm could withstand large-scale attacks
on the premise of invisibility guaranteed and it has better robustness and confidentiality.
Keywords: Compressed Sensing; Digital Watermarking; Anti-attack Capability

Introduction

Theory of digital watermark is to embed information which could not be easily removed into
digital media, and the watermark information can be extracted through a specific algorithm or
device when needed. Finding a balance between robustness and invisibility is one of the difficulties
in the research of digital watermark.
Compressed sensing presented by Candes, Romberg and Donoho breaks through the traditional
limits of sampling theorem in the theory of signal processing. It collects and compresses data
simultaneously. Rachbin and others prove that CS observations have computational secrecy.
Chen GuoFa et al. (2012) successfully applied CS to digital image watermark [4]. First, sparse
decompose the carrier image by wavelet base. Then observe sparse matrix coefficients to obtain
observations and embed the whole watermark information into the observations. Finally restore
the image through a reconstruction algorithm. This method uses a single observation matrix to
observe the coefficient matrix so that the anti-attack capability for large-scale attacks such as
gaussian noise and shear attack is weak.
To solve the problem above, a double encrypted digital image watermarking algorithm based on
CS is presented in this paper. First, pre-process the watermark by compressed sensing. Then observe the high and low frequency coefficients of the sparse carrier image with different observation

Corresponding author.
Email address: yujq@swu.edu.cn (Jianqiao YU).

15539105 / Copyright 2014 Binary Information Press


DOI: 10.12733/jcis10586
June 15, 2014

5114

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

matrix. At last, embed pre-processed watermark in the observation of high frequency coefficient to achieve the information hiding of watermark. This algorithm could withstand large-scale
attack such as gaussian noise and shear attack on the premise of invisibility guaranteed.

Theory of Compressed Sensing

2.1

Compressed sensing

Theory of compressed sensing includes the sparse representations of signals, the design of observation matrix and the reconstructed algorithm.
The sparse representations of signals mean that when the signal is projected onto a transformation matrix, the transformation vector is sparse or approximately sparse. Recorded discrete
signal whose length is n as x(n), n [1, 2, 3,....., N]. According to signal processing theory, x can
be expressed by a set of linearly independent array base T = [1 , 2 , ..., N ] (T represents the
transpose of ) so that
N
X
x=
i i
(1)
i=1

where i =< x, i >, x and are N 1 matrix, and is N N matrix. When signal x have only
i << N non-zero coefficients on base , base is the Sparse transformation base of signal x .
According to theory of CS, the sufficient condition of sparse signal reconstruction with high
probability is that the measurement matrix must satisfy the restricted isometry property (RIP),
that is to say, for any k-sparse signal x(x RN ) and constant k (0, 1),
(1 k ) kxk22 kT xk22 (1 + k ) kxk22

(2)

where T {1, ..., N } and T K. T is a K T sub-matrix constituted by the relevant columns


which indicated by the index T in the . As shown in the above equation, RIP is satisfied more
easily when the sparsity of signal K is smaller.
Candes et al. (2005) have proved that gaussian stochastic matrix meet RIP with a larger
probability [9, 10]. Therefore, a gaussian matrix with a size of M << N whose each value meets independent normal distribution of N (0; 1 = N ) can be designed as a measurement matrix.
Reconstruction algorithm is one of the cores of the theory of CS. At present a number of reconstruction algorithms have been proposed, including greedy algorithm, minimum total variation
method, orthogonal matching pursuit, and the subspace tracking algorithm.

2.2

Orthogonal matching pursuit

The essence of OMP is to select columns of D with greed iteration to make the selected column in
the process of iteration related to the current redundancy vector to the maximum extent, subtract
the relevant parts from original signal and repeat iterations until the times of iterations are reach
to the sparsity k. The specific procedure of the algorithm is as follows:
Initialization: f0 = 0, R0 f = f, D0 = {}, x0 = 0, a00 = 0, k = 0.
(1) Calculate {hRk f, xn i ; xn D}, where D represents the space of atom dictionary.

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

5115


(2) Search xnk+1 D so that Rk f, xnk+1 sup |hRk f, xj i| , 0 1.
j


(3) If Rk f, xnk+1 < , ( < 0), then terminate the process.
(4) Apply k+1 to the permutation and interchange of nk+1 , and reorder the atoms of D.
 k
P
(5) Calculate bkn n=1 so that xk+1 = kn=1 bkn xn + k and hk , xn i = 0, n = 1, ..., k.
2
(6) Set ak+1
= akn k bkn , n = 1, ..., k, then update atom
hR f, xk+1 i and ak+1
n
k+1 = k = kk k
Pk+1 k+1k
dictionary fk+1 = n=1 an xn , Rk+1 f = f fk+1 , Dk+1 = Dk {xk+1 }.

(7) Set k k + 1, and repeat Steps (1) (7).


Compression ratio is equal to the length of the original signal divided by the length of the
compressed signal. According to the literature [5], when the compression ratio is equal to 0.7,
OMP algorithm can reconstruct images preferably.

Double Encrypted Watermarking Algorithm Based on


CS

A double encrypted digital image watermarking algorithm based on CS is presented in this paper.
First, pre-process the watermark by CS, which is considered as the first encryption. Secondly
observe the high and low frequency coefficients in sparse carrier image with different observation
matrix. Then embed pre-processed watermark in the observation of high frequency coefficient,
which is considered as the second encryption. Finally restore high frequency and low frequency
coefficients by OMP and obtain watermarked image through wavelet inverse transform.

3.1

Pre-processing of watermark

In the pre-processing of watermark, CS takes the place of the traditional method of scrambling.
Since the amount of watermark information is reduced after the process of CS, the information
embedded in the carrier image will be also reduced, which is beneficial to hiding watermark. In
addition, when extracting the watermark, reconstruction algorithm will need measurement matrix
and coefficient of correlation. Therefore CS plays a role in watermarking encryption.
Homemade binary image shown in Fig. 1(a) is selected as the watermark image. Sparse or
compressible signals should be processed by sparse transformation before compressed sensing.
Wavelet transform is used to make the watermark sparse in this paper. The random gaussian
matrix is selected as the measurement matrix to multiply by the sparse representation of watermark. Fig. 1(b) shows the watermark processed by CS, where the compression ratio is 0.7.
Mathematical formulas are as follows:
y = x1 = x

(3)

where y is the image processed by CS, is the measurement matrix, is the sparse-transformed
base, x is original image, and x1 is the sparse image. Sparse representation and measurement
of CS are the pre-processing of watermark, which is the equivalent of the encryption process of
digital watermark. The key is product of measurement matrix and sparse-transformed base.

5116

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

(a)

(b)

Fig. 1: Original watermark (a) and watermark processed by CS (b)

3.2

Embedding of watermark

The steps of watermark embedding are as follows:


(1) Through wavelet sparse decomposition, the carrier image is decomposed into low frequency
coefficients WL (smooth approximation of the original image (LL)) and high frequency coefficients WH (level detail component(LH), vertical detail component (HL) and diagonal detail
component (HH)). DWT of the image has the property of energy-tightening. The sub-image
of low frequency (LL) which is a smooth approximation of the original image contains most
of the energy of the original image. Since the corresponding coefficient of each sub-image
decreases from low frequency to high frequency orderly, the operation of high frequency coefficient hardly affects the visual effects for original image. Hence WH is selected as the
embedded area.
(2) If the size of carrier image is M N , divide the image into small blocks with a size of B B
(M and N may be divisible by B). The image is divided into M N/B 2 blocks. Observe
low frequency coefficients WL by block diagonal matrix 1 to obtain the observations yL
(L = 1, 2...M N/4B 2 ). Observe high frequency coefficients WH by block diagonal matrix
2 to obtain the observations yH (H = 1, 2...3M N/4B 2 ).
(3) Divide the watermark information processed by CS into two equal parts. If q = 1, 2......M
N/4B 2 , yq , y2q , y3q represent the three parts of yH respectively. Use formula L0 = L + w to
embed the part one of watermark with embedding strength and the part two of watermark
with embedding strength . For yq , embed part one first and then part two. For y2q , embed
part two first and then part one. At last, embed the whole pre-processed watermark in y3q
with embedding strength . Embedding strength , and measurement matrix 2 should
be saved as the second part of the key to watermark extraction.
(4) After the Watermark embedding, restore low frequency coefficient by OMP with 1 as measurement matrix to obtain WL 0 . Then restore high frequency coefficient with 2 to obtain
WH 0 . At last, combine WL 0 and WH 0 into sparse matrix W 0 and then obtain watermarked
image through the wavelet inverse transformation of W 0 .

3.3

Extraction of watermark

The steps of watermark extraction are as follows:


(1) Watermarked image and original image are respectively processed by wavelet sparse decomposition to get coefficient matrix S1 and S2 . S1 and S2 are parted into blocks with the size of
B B. The size of B can be acquired from 2 in the key. Observe high frequency coefficient
by measurement matrix 2 to get yH 0 (H = 1, 2...3M N/4B 2 ).

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

5117

(2) yH 0 subtracts from yH . Calculate the length of the embedded information W from part one of
the key. If q = 1, 2......M N/4B 2 , yq 0 , y2q 0 , y3q 0 represent the three parts of yH 0 respectively.
Multiply the values from 1 to M/2 in yq 0 yq by the embedding strength and the values from
M/2+1 to M by the embedding strength . Multiply the values from 1 to M/2 in y2q 0 y2q
by the embedding strength and the values from M/2+1 to M by the embedding strength
. Multiply the values from 1 to M in by the embedding strength .
(3) Add the three results got from (2) together and divide it by 3 to get watermarking information
processed by CS.
(4) Reconstruct the watermark by OMP, and then the extraction is completed.

4
4.1

Experimental Results and Analysis


Experimental results

The experiment runs in Matlab7.10.0(R2010a). The grayscale Lena with a size of 512 512 is
chose to be the host image since it is generally known as a standard test chart in image processing.
A two-value picture with the size of 64 64 is chose to be the watermark. DWT is chose to do
sparse transforming and the size of blocks is 4 4. The size of measurement matrix 1 is 16 16.
The size of measurement matrix is 2 . Experimental results are shown in Fig. 2.

(a)

(b)

Fig. 2: Original image and watermarked image (a) and original watermark and extracted watermark (b)
From the visual effect shown in Fig. 2(a), there is no significant difference between the original
image and the watermarked image which means the subjective quality is good. The peak signal to
noise ratio (PSNR) can be used to measure the invisibility of the watermark. The computational
formula of PSNR is

P SN R = 10 log

2552

1
M

M
1
N
1
P P
2
0
[X(i, j) X (i, j)]

(4)

i=0 j=0

where X is the original image, X 0 is the watermarked image, and M N is pixels of rows
and columns. The higher PSNR is, the less the original image distorts which means a better
transparency. The PSNR between Lena0 and Lena is 35.6594 in this paper, which is higher than
the PSNR in literature [4].

5118

4.2

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

Analysis of robustness

In this paper, the normalized correlation coefficient (NC) which is a commonly used test model
of robustness is chose to measure the robustness of the watermark. The computational formula
is
L1
P K1
P
x(i, j)x0 (i, j)
i=0 j=0
(5)
N C = L1 K1
P P
2
[x(i, j)]
i=0 j=0
0

where x is the original watermark, x is the extracted watermark, and L K is pixels of rows
and columns. NC can effectively characterize the quality of extracted watermark. An NC of 1
indicates the robustness is perfect. An N C < 0.5 means failed extraction.JPEG compression
attack, noise attack, and shearing attack are used to validate the robustness of the algorithm.
4.2.1

JPEG compression attack

Attack the watermarked image by JPEG compression. Table 1 shows the experimental results
with different compressed threshold value Q. Anti-attack ability of the algorithm for JPEG
compression is favorable. Compared to robustness in literature [4], there is little difference.
Table 1: Results of JPEG compression attack with different compressed threshold value
Attack type

4.2.2

Parameter Q

Our algorithm

literature [4]

100

90
JPEG
compression 80

0.9971

0.9822

0.8478

0.8071

70

0.6499

0.6033

Noisy attack

Salt and pepper noise, gaussian noise, random noise and multiplicative noise are chose to simulate
the attacks on the watermark information. Table 2 shows the experimental results of Salt and
pepper noise and Gaussian noise. As shown in Table 2, anti-attack ability of the algorithm for Salt
and pepper noise and Gaussian noise is favorable. Compared to robustness for Gaussian noise in
literature [4], the algorithm in this paper is much better. Fig. 3 shows the extracted watermark
under the attacks of salt and pepper noise, Gaussian noise, random noise and multiplicative noise.

4.2.3

Shearing attack

Fig. 4 shows the sheared images and the extracted watermarks. Table 3 shows experimental
results with varying degrees of shear. Since CS only need some sparse information and weaken
the correlations between the watermark and pixels, deletions of watermark are likely to be very
small. As indicated in Table 3, anti-attack ability of the algorithm for shearing attack is favorable.

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

5119

Table 2: Results of noisy attack with different parameters


Attack type

Gaussian
noise(, 2 )
Salt and
pepper
noise(d)

Parameter Q Our algorithm

literature [4]

(0,0.001)

0.9084

Less than 0.5

(0,0.005)

0.8942

Less than 0.5

(0,0.01)

0.8401

Less than 0.5

0.002

0.9661

0.9644

0.004

0.9323

0.9110

0.006

0.8871

0.8457

(a)

(b)

(c)

(d)

Fig. 3: Extracted watermark under gaussian noise (0,0.01)(a), Salt and pepper noise (0.006)(b), random
noise (5)(c), and multiplicative noise (0.01)

(a)

(b)

(c)

Fig. 4: Watermarked image and extracted watermark sheared by 1/16(a), 1/4(b), 1/2(c)
Table 3: Results of shearing attack with different parameters
Attack type

Shearing
attack

Parameter Q Our algorithm

literature [4]

1/16

0.9224

Less than 0.5

1/4

0.7942

Less than 0.5

1/2

0.6341

Less than 0.5

5120

X. Liu et al. /Journal of Computational Information Systems 10: 12 (2014) 51135120

Conclusion

A double encrypted digital image watermarking algorithm based on the computational secrecy
of CS is presented in this paper. The proposed algorithm could improve the anti-attack ability
of large-scale attacks such as Gaussian noise and shearing attack on the premise of invisibility
guaranteed. Only the grayscale is processed in this paper. The following study is to processed
the color image.

References
[1]

Yan Zhou, Defeng Zhang, Zilong Ma. The Research of Image Hash Watermarking Algorithm Based
on Compressed Sensing [J]. Journal of Sun Yat-sen University. 2010, 49 (6), 58-63.

[2]

Chunhui Zhao, Wei Liu. Mutual Support Dual Watermark Algorithm Based on Compressive Sensing [J]. Chinese Journal of Electronics, 2012, 40 (4), 681-687.

[3]

Yixin Chen, Yulin Wang. An Improved Technique for Watermarking Images and Video in the
Wavelet Domain [J]. Journal of Computational Information Systems, 2010, Vol. 6 (5): 1661-1668.

[4]

Guofa Chen, Shuxu Guo, Yang Li. Digital image watermark algorithm based on compressive
sensing [J]. Modern electronic technology. 2012, 35 (13), 98-104.

[5]

Min Zhang, Research on Digital Watermarking Method Based on Compressive Sensing [D], Wuhan
University of Science and Technology, 2012.

[6]

Yingying Ding, Zhen Liu. Analysis and Comparison of Three Kinds of Frequency Domain Digital
Watermarking Algorithm [J]. ChongQing: Packaging Engineering, 2011, No. 5, pp. 103-107.

[7]

T. Tony Cai, Lie Wang. Orthogonal Matching Pursuit for Sparse Signal Recovery With Noise.
IEEE Trans. Inf. Theory, vol. 57, pp. 4680-4688, 2011.

[8]

XiaoZhen Mi, Yu Che, HuaJun Dong. Study and Application of Digital Watermarking Algorithm
Based on Discrete Wavelet Transform and Human Visual System [J]. LiaoNing: Journal of Dalian
Jiaotong University, 2012. Vol. 33, No. 1, pp. 48-52.

[9]

E. J. Candes, T. Tao. Decoding by Linear Programming [J]. Information Theory, IEEE Transactions on, 2005, 51 (12): 4203-4215.

[10] E. J. Candes, J. K. Romberg, T. Tao. Stable Signal Recovery from Incomplete and Inaccurate
Measurements [J]. Communications on pure and applied mathematics, 2006, 59 (8): 1207-1223.

You might also like