You are on page 1of 8

DWT-PCA (EVD) Based Copy-move Image Forgery Detection

Michael Zimba, Sun Xingming


International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

DWT-PCA (EVD) Based Copy-move Image Forgery Detection


1
Michael Zimba, 2Sun Xingming
1,
mgmzimba@gamail.com, *2, sunnudt@163.com
The School of Computer and Communications, Hunan University, P.R China, 410082
doi:10.4156/jdcta.vol5.issue1.27

Abstract
In a co py-move image forgery, a part of an ima ge is copied and then pasted on a different location
within the sa me im age. Usua lly, such an i mage tampering is do ne with the aim of e ither hiding s ome
image det ails, in whi ch case a backgro und is du plicated, o r ad ding mor e deta ils r esulting in a t least
some fea ture bein g cl oned. Whichever the ca se, ima ge i ntegrity i s lost . In thi s p aper we present an
improved a lgorithm based on Discrete Wavelet Transform (DWT) and Principal Component Anal ysis-
Eigenvalue D ecomposition (PCA-EVD) to detect s uch cloning for gery. F urthermore, for academic
purposes and via a simplified, toy image we demonstrate how such algorithm works in detecting cloning
forgery. Experimen tal results show that t he prop osed sc heme accu rately d etects such specif ic im age
manipulations as long as the copied region is not rotated or scaled.

Keywords: Copy-move, Image Integrity

1. Introduction
The availability of affordable and powerful image processing and editing software, such as Photoshop,
makes i mage manipulation r elatively easy even to a person with lukewarm s kills o f pho tography.
Unwarranted and sometimes malicious image manipulations have become rampant in the media. Figure
1, for example, shows a copy-move forgery where a part of the background is copied and moved to hide
the two ladies appea ring in t he orig inal image. It can be observed from this exa mple that s uch i mage
manipulations may not leave obvious evidence of tampering. This corrodes the already delicate trust our
societies h ave i n dig ital i mages, be i t in print o r el ectronic media. The nec essity o f algor ithms for
efficiently verifying the integrity of images cannot, therefore, be overemphasized in this digital era.

 
 
 
(a) (b)
Figure 1. (a) An original image depicting two ladies with mountain scenery as background, (b) The two
ladies have been hidden by background duplication.

Recently, num erous tech niques fo r i mage int egrity verifications have been p roposed. Some
techniques e mploy watermarking schemes [1][2][3] to a uthenticate an image as well as deter mine its
integrity. The drawback with schemes based on watermarking is that the water mark must be embedded
right during the image formation to avoid the possibility of watermarking an already forged image. This
is practically d ifficult as most digi tal cam eras and ot her i mage acqui sition devices do no t have
instantaneous watermarking facilities.

- 251 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

There ar e als o var ious tec hniques that detect i mage tampering in absence o f watermarks and
signatures. Such techn iques e xploit t he d igital i mage underlining st ructures. For ex ample, based on
statistical correlation, Popescu et al [4] stud y resampling to detect image tampering. Gopi et al [5] use
Artificial Neural N etwork and A uto Reg ressive coefficients t o localize digital f orgery. Such methods,
however, are not robust to compression and other geometric processing.
Some researchers exploit camera ‘fingerprints’ to detect image tampering. For instance, Johnson et al
[6] exp ose dig ital forgeries usin g Chro matic Aberration. The propo sed method b y L ukas and his
colleagues [ 7] can d etect image forgeries through e xploiting Sensor Pattern N oise. Po pescu et al [ 9]
expose digital forgeries by analysing Colour Filter Array Interpolation. Johnson et al [8] apply a variety
of principles of Optical Physics such as lighting inconsistencies to establish the state of an image.
Fridrich et al [11] use quantized Discrete C osine Tr ansform ( DCT) coefficients to r epresent feature
vectors in their proposed block matching based method of detecting cloning. Most recently, Bayram et
al [13] applies Fourier Mellin Transform (FMT) and 1-D projection of log-polar values in their robust
scheme of detecting image forgeries.
Each of t he schemes mentioned above co mmands meaningful efficiency onl y in specif ic kinds of
tampering.
The rest of this paper is organized as follows. In Section 2, we discuss existing work which is closely
related to the work presented in this paper. In Secti on 3, we pres ent our proposed algorithm in det ails.
Section 4 d emonstrates how ou r al gorithm works vi a a sim plified, toy image. Thi s demonstration
underlines our approach to this research, which is to enhance classroom understanding of the algorithms
by disp laying the pi xel-level effect o f major s teps of th e algorithm. Sec tion 5 presents results of the
algorithm when applied to real forged images. Section 6 concludes the paper.

2. Related Work
The primary task of a copy-move image forgery detection algorithm is to det ermine if a given image
contains cloned regions without prior k nowledge of their shape and location. An obvious approach is to
exhaustively compare every possibl e pair of r egions. How ever, such an approach is exponentially
complex.
Block matching appears to be a more efficient approach. Utilising such an approach, Popescu et al [10]
proposed a copy-move image forgery detection algorithm which slides a b  b block over an N  N
2
image pixel by pixel resulting in k  ( N  b  1) blocks. Each block is column-wisely reshaped into
2 2
a b long r ow vector, oth erwise known as f eature vector, an d in serted into a k  b feature matrix.
Principal Component Analysis (PCA) is performed to derive an alternative representation of each row of
the feature matrix. PCA, which we pres ent later in this section for the sake o f completeness, is a well
known algebraic tool for matrix decomposition in literature [10]. Performing PCA on the feature matrix
involves co mputing th e corresponding covariance matrix o f th e feature m atrix, obta ining a new line ar
basis through eigenvectors of the covariance matrix and obtaining a p rojection of each block onto these
basis vectors with higher eigenvalues thereby reducing the dimension of the feature vectors to N t < b2 .
The rows of the new k  N t matrix are then component-wisely quantized to reduce minor variations
due to cor rupting no ise. The matrix i s row-sorted lex icographically. The sorting obv iously r esults in
similar row vectors being adjacent to each other. Shift vector, which is the difference between positions
associated wi th every pair o f adj acent rows of th e sorted matrix, is calcu lated. The f requency of ea ch
shift vector is known. Higher frequencies suggest possibility of segment duplications. Consequently, the
associated blocks are m apped f or further d ecision making. Finally, t he i mage is m orphologically
processed to minimize false d etection. The al gorithm proposed by Popescu et al [10] has
O(32k log k ) complexity.
Li et al [12] firstly reduce the dimension of the image by co nsidering only the low frequency sub-
band of Discrete Wavelet Transform DWT output and then reduce the length of the feature vector using

- 252 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

Singular Value Decomposition, SVD. DWT is well explained in li terature and is widely used in i mage
processing [12][14][15]. The complexity of the algorithm proposed by Li et al is O(8k log k ) .
The proposed m ethod in t his p aper pres erves t he ap plication o f P rincipal Component A nalysis-
Eigenvalue Decomposition (PCA-EVD) in reducing the dimension of the f eature vector while reducing
the di mension of the i mage using DWT. We orderly combine DWT and P CA to develop an improved
version of the method in [10] and alternative to the method in [12].
We now present PCA-EVD as an algebraic tool for matrix decomposition. Let H be a matrix given
by
  a11 a12  a1b 
 a1  a
  a 22  a 2b 
H  a 2    21 (1)
     
  
 
a n1 an2  a nb 
a
 n

If we guarantee that each of the row vectors of the matrix H has zero mean, and we let  j , j be
a pair of cor responding eigen vector and eigen value respecti vely s uch th at j  1,2,  , b and
1  2    b , then equations (2) and (3) are acceptable, where C is a covariance matrix of the
matrix H.
n  T
C   ai ai (2)
i 1
 
C  j  j  j (3)

Considering a new l inear b asis f ormed by the eigenvectors,  j , equat ion ( 4) show s t hat w e can
reduce the dimension of the row vectors of H to t  b without much loss of original data.

 t b T  
ai   ai  j  j (4)
j 1

3. The Proposed Algorithm

To show that we are not restricted to square images, we consider an M  N forged image. We take
DWT of the image to output four rc
sub-bands. Since the other three sub-bands, vertical, horizontal
and diagonal detail sub-bands, are useful in gradient based image processing, we consider only the low
frequency sub- band t o approxi mate the i mage. Co nsequently, th e siz e of the image is reduced to
M N
rc  where j is a positive integer. The complete algorithm goes as follows:
4j
1. Consider an M  N grey scale i mage. For a color image, preferably consider each channel
separately.
2. Resolve t he im age i nto its four Discrete Wavelet Tr ansform, DWT, s ub-bands each o f size
M N
rc  . We approximate t he image by extracting the low frequency sub-ban d,
4j
I rc only.

- 253 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

3. Slide a b 2 window ov er I r c pix el-by-pixel resulting in k1 blocks where


M N k
k1  (r  b  1)(c  b  1)  ( j  b  1)( j  b  1)  j .
2 2 4
4. Perform Prin cipal Co mponent Analysis - Ei genvalue Dec omposition ( PCA-EVD) on each of
2
the k1 row vectors to reduce vector length to t  b . A k1  t matrix, H, is then formed.
5. The rows of the matrix H are lexicographically sorted. This makes similar rows, probably as a
result of duplicated blocks, adjacent to each other.
6. For each p air of a djacent row s of H, co mpute as sociated n ormalised s hift vector
S i  ( xi  ( x1  x 2 ) , y i  ( y1  y 2 )) where ( x1 , y1 ) and ( x 2 , y 2 ) are associated
block positions.
7. If xi , y i  b , compute offset frequency C ( S i )  C ( S i )  1 from zero.
8. Blocks with C ( S j )  T , where T is a threshold ,are mapped for morphological processing to
give final results.
The i mmediate i mprovement over Popescu’s P CA method is the redu ction of the im age size from
M N
M  N to r  c  . This is an enormous improvement as far as algorithm complexity is
4j
concerned as t he nu mber of blocks is reduced by the sa me margin. Seco ndly, the flexibility tha t PCA
brings in redu cing t he feature vector’s length to t  b 2 allows detec tion of manipulations of var ying
degrees.

4. Simplified Toy Image

Consider the 6  7 toy image shown in Figure 2 (a). Since the image is too small, we slide a 4  4
window over the image without taking DWT. However the low frequency subband of the DWT of the
image shown in Figure 2 (b) d emonstrates th at the du plication is stil l maintained desp ite reduction in
image size.

(a)                                                                    (b) 
Figure 2. (a) A 6  7 toy Image. (b) Low Frequency Subband of Discrete Wavelet Transform (DWT)
of the image.
 
Sliding 4  4 block over a 6  7 image pix el-by-pixel as sho wn in Fi gure 3 g ives
(6  4  1)(7  4  1)  12 blocks. At each location, the 4  4 block is columnwisely reshaped into
a 1  16 feature v ector. Each vector f orms a row of t he matrix show n in Fig ure 4 (a) . Th e last two
columns are for respective positions of the blocks on the image.

- 254 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

Figure 3. Sliding a 4  4 window over the toy image pixel by pixel.


In a r ealistic im age, the next step would be to apply Pr incipal Co mponent An alysis, PCA, to the
feature vector to reduce its dimension, but in this example, PCA i s also ignored as t he image is a lready
too s mall. That is to sa y, we equivalently con sider al l the Eigenvalues in ou r Principal Co mponent
Analysis.
Then the 12  16 matrix is lexicographically sorted so that similar vectors are adjacent to each other.
As shown in Figure 4(b), (1,1)th vector is notably adjacent to (3,4)th vector after sorting.
The highest presenting frequency of the s hift vector in this example is one nu mber. Figure 5 s hows
the duplicated regions mapped by zeros. It must be stated that in this example, morphological processing
is not ne cessary a s it is hig hly unlikely to have false d etections. We also e mphasize th at though the
remaining regions of the image also pass f or duplication, their size i s smaller than the size of the block,
and hence they cannot be detected.

              

(a) (b)
Figure 4. (a) The matrix of feature vectors before sorting, (b) The matrix of feature vectors after sorting

Figure 5. Results of the duplication detection on the toy image of Figure 2(a).

- 255 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

5. Experimental Results
In ou r ex periments, we h ave a t otal of 300 images s ourced mostly f rom www.freefoto.com and
broken down as follows: 100 tampered images with no modification, 100 tampered images with JPEG
compression, 100 ta mpered images w ith Gaussian noise. Most i mages ar e of 25 6x256 pixels wh ich
when passed through DWT Haar become of 128x128 pixels. This is the case because we are limited to
resolution, J= 1 in our ex periments, J>1 tend to f alsify the results excep t where dupl icated regions are
relatively bigger. 8x8 blocks are used throughout the experiments giving 64 as the feature vector length.
This reduces to 8 after passing through PCA. We assume the size of duplicated region as at least 16x16
pixels w hich ideally s ets the Shift Vecto r f requency to (16-8+1)2= 81. Ho wever, i n an ticipation of
manipulation, any frequency greater than 50 passes for duplication.
Figure 6(a) show s an obviously tam pered i mage wh ere the shrub is du plicated. I n Figure 6(b), we
show the results of our algorithm performed on the green channel of the duplicated image.
Results over the set of 300 various images are given in Table 1. We observe that the size of duplicated
region al so a ffects the d etection rate in im ages w ith J PEG co mpression as wel l as Gaussian N oise
addition. The greater the region size, and /or the greater the JPEG q uality, or the greater the Signal-to-
Noise Ratio , the bett er the dup lication d etection. Ho wever, the algorithm has 100% accurac y i n
unmodified duplicated regions of all sizes.

(a) (b)
Figure 6. (a) An image with a duplication, (b) The result of the proposed algorithm run on the Green
channel of the image, accurately detecting the duplication.

Table 1. Results over a set of 300 images.


Percentage Average detection over various sizes (pixels) of
State of the image  the duplicated regions
16x16 region 64x64 region 128x128 region
Unprocessed duplication 100 100 100
100 98 98 100
JPEG
95 50 98 100
QUALITY
80 5 60 98
70 1 50 70
SNR 32 60 70 98
(db)  24 10 60 98

- 256 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

Table 2. Comparison with existing algorithms


Algorithm Feature form Number of 8x8 blocks Feature vector length.
Fridrich Quantized DCT 62,001 64
Popescu PCA 6 2,001 32
Li DWT&SVD 14,6 41 8
Proposed DW T&PCA 14,641 8

We finally compare our results to those of existing algorithms as shown in T able 2. We consider a
256x256 i mage and 8 x8 bl ock. Tabl e 2 d emonstrates o ur in tention, namely, to r educe the al gorithm
complexity of the method in [10] by a factor of powers of 4 while maintaining PCA application. On the
other hand, we only present an alternative to the method in [12] in th at, much as SVD is conditionally
similar to PCA, we want to promote unconditional use of PCA in our algorithm. The proposed algorithm
therefore has comparable performance to that of the method in [12].

6. Conclusion

In th is paper, an i mproved a lgorithm based on Di screte Wavelet Transfo rm ( DWT) and Principal
Component Analysis-Eigenvalue Decomposition (PCA-EVD) to detect copy-move digital image forgery
is proposed, a nd experimental res ults in dicate th at the d imension o f the features is r educed co mpared
with the existing related algorithms, at the same time, the accuracy of detection i s good. Furthermore, a
simplified b ut significant exa mple using a toy i mage is given in order t o assist s tudents visualize the
effect of the major steps of the algorithm at pixels level.
In f uture, we i ntend to sear ch fo r f eatures th at are i nvariant to manipulations such as rotation,
rescaling and heavy co mpression, and then we will aim at algorithms that would detect other forms of
digital image duplications than copy-move.

7. Acknowledgement

This w ork is supported by th e Nationa l N atural Sc ience Foundatio n of Ch ina ( Grant Nos.
60736016, 60873198, 60973128, 60973113, 61070196, 61073191), National Basic Research Program
973 (Grant Nos. 2009CB326202, 2010CB334706)

8. References

[1] C. T. Hsieh and Y. K. Wu, “ Geometric I nvariant Se mi-fragile Image Watermarking Using Real
Symmetric Matrix,” WSEAS Transaction on Signal Processing, Vol. 2, Issue 5, May 2006, pp.
612-618.
[2] P. Meer wald and A . Uhl, “A Survey of Wav elet-Domain Watermarking Algo rithms,” in
Proceedubgs of SPIE, Electronic Imaging, Security and Watermarking of Multimedia Contents,
Vol. 4314, 2001, pp. 505-516.
[3] F. Hartung and M. Kutter, “Multimedia Watermarking Techniques,” in Proceedings of the IEEE,
Vol. 87, No. 7, July 1999, pp. 1079-1107.

[4] A. C. Po pescu and H. Farid, “Exposing Digital For geries by Detecting Traces of R esampling,”
IEEE Transactions on Signal Processing, Vol. 53, 2005, pp. 758-767.
[5] E. S. Gopi, N. Lakshmanan, T. Gokul, S. KumaraGanesh, and P. R. Shah, “DigitalImage Forgery
Detection using Arti ficial Neural Network and Aut o Regres sive Coefficients,” Electrical and
Computer Engineering, 2006, pp.194-197.
[6] M. K. Johnson and H. Far id, “ Exposing Digital Forgeri es T hrough Chro matic Abe rration,” in
Proceedings of the 8th workshop on Multimedia and security, 2006, pp. 48-55.

- 257 -
DWT-PCA (EVD) Based Copy-move Image Forgery Detection
Michael Zimba, Sun Xingming
International Journal of Digital Content Technology and its Applications. Volume 5, Number 1, January 2011

[7] J. Lukas, J . Fridich, and M. Go ljan, “Detecting Di gital I mage Forger ies Using Sens or Patter
Noise,” in Proceedings of the SPIE Conference on Security Steganography, and Watermarking of
Multimedia Contents, Vol. 6072, January 2006, pp. 362-372.
[8] M. K. Johnson and H. Farid, “ Exposing Dig ital Forgeries by Det ecting I nconsistencies in
Lighting,” in Proceedings of ACM Multimedia and Security Workshop, New York, 2005, pp.1-9.
[9] A. C. Po pescu and H. Far id, “ Exposing Di gital Forgeries in Color Fil ter Ar ray I nterpolated
Images,” IEEE Transactions on Signal Processing, Vol. 53, 2005, pp. 3948–3959.
[10] A. C. Pop escu and H. Far id, “ Exposing Di gital Forger ies by D etecting Duplicate d Image
Regions,” Technical Report, TR2004-515, Department of Computer Science, Dartmouth College,
2004.
[11] J. Fridrich, D. Soukal, and J. Lukas, “ Detection o f Cop y-Move For gery in Di gital Images,” in
Proceedings of Digital Forensic Research Workshop, August 2003.
[12] G. Li, Q . Wu, D. Tu, an d S. Sun, “ A Sorted Nei ghborhood Approach for Detecting Duplicated
Regions in I mage For geries b ased on DWT and SVD ,” in Pr oceedings o f I EEE I nternational
Conference on Multimedia and Expo, Beijing China, July 2-5, 2007, pp. 1750-1753.
[13] S. Bayram, T. S encar, N Me mon “ An Efficient and Robust Method for Detecting Copy-
move Forgery,” ICASSP 2009, pp. 1053-1056.
[14] Yingkun  Hou, Chunxia Zhao, Yong Cheng, Zhengli Zhu, "Image Watermarking Resynchronization
to G eometric Attacks i n DWT Domain", JDCTA: International Jo urnal of Digi tal Content
Technology and its Applications, Vol. 4, No. 4, pp. 88 ~ 98, 2010
[15] Chi-Man Pun, Moon -Chuen Lee, Cong Lin, "Geometric Invariant Shape Representation Based on
Radon and Adaptive Stationary Wavelet Transforms", JCIT: Journal o f Convergence Information
Technology, Vol. 5, No. 6, pp. 54 ~ 65, 2010

- 258 -

You might also like