You are on page 1of 8

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

Block Based Technique for Detecting Copy-Move Digital Image


Forgeries: Wavelet Transform and Zernike Moments
Thuong Le-Tien, 1MarieLuong, 2Tu Huynh-Kha, Long Pham-Cong-Hoan, An Tran-Hong
Dept of Electronics and Electrical Eng., HoChiMinh City University of Technology, Vietnam
1
Laboratory L2TI, University Paris 13, France
2
International University, National University of HoChiMinh City, Vietnam
268 Ly Thuong Kiet, Dist 10, HCMC, Vietnam
thuongle@hcmut.edu.vn, marie.luong@univ-paris13.fr, huynhkhatu@gmail.com,
phamcong.hoanlong@gmail.com, an.tranhong@gmail.com

ABSTRACT
In this paper, a combination of the Wavelet
transform and the Zernike moments is presented for
detecting copymove regions in digital forged
images. Assuming that tested images have the JPEG
format on both before and after being tampered. The
proposed method uses the Wavelet transform to
remove unimportant details in the forged images by
using the approximate components only. After that,
the Zernike moments of each 16 x 16 image block
are calculated then compared the Euclidean
distances to get pairs of any similar blocks. In order
to support efficiently the proposed algorithm, a
morphological technique is applied to extract the
foreground first as a preprocessing. The evaluation
for the theory and effectiveness of the proposed
algorithm are demonstrated via experimental results
on various images with different properties.

KEYWORDS

both positive and negative reasons, and


extremely dangerous if they are to be used to
falsify evidences or altering proofs regarding
legal issues or politics affair. Some softwares
can alter an image so delicate that it cannot be
easily recognized by naked eyes (e.g. in Figure
1). An effective counter measure has been
thriving throughout the recent years. One of the
effective approaches is the Zernike moments
and it has been proved to be a superiority in the
analysis of invariant points of digital images.
However, the Zernike based algorithm requires
a large amount of running time [1]; for example
a 1536x2048 image divided to L x L blocks
takes O(Nmoments) + O(Nblocks Nmoments L2) +
O(Nmoments Nblocks logNblocks) [2] to get high
accuracy which is incredibly long for a tested
simulation as an example processed on a
computer using Window 7 Ultimate 64-bit,
CPU Intel Core i5 @ 1.8GHz and RAM 4GB.

Wavelet transform; block-based technique; Zernike


moment; Euclidean distance; tempered images,
Morphological Technique.

1.

INTRODUCTION
(a)

Without a doubt, digital images have been the


significant role in daily activities and social
areas; therefore, its security and authentication
should be checked. When various softwares for
image processing are getting more sophisticated
and easily accessed by anybody, then
researches on forged image detection are
getting more attention and becoming more
importance. Tampered images can be used on

ISBN: 978-1-941968-30-7 2016 SDIWC

(b)

(c)
(d)
Figure 1. Original Images and Forged Images by
Photoshop: (a), (c) Original; (b), (d) Forged Images

26

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

Recognizing the feasibility to improve the


method for identifying tampered images by the
Zernike moment in order to take advantages of
all the features of the algorithm, we proposed
an algorithm where the approximate component
of images derived from the Wavelet transform
is used for further analysis and improves the
runtime of the processing. After the wavelet
transform, overlapping blocks with fixed-sized
are used to store the information of the image as
vectors. These vectors are calculated by Zernike
algorithm and then compared to find the
similarities for detecting identical regions. In
order to make the proposed algorithm
happened; some related works of other
scientists have been researched in section 2, the
proposed algorithm is in section 3, the
experimental results are in next section, the last
section is the conclusion and future intention.
2.

RELATED PREVIOUS WORKS

2.1. Extracting Features directly from the


tested Image without Transformations
A survey was conducted in [2], Kha Tu
Huynh et al. proposed that copymove forgeries
detection generally requires 7 steps using the
block based technique; the steps go from
dividing the input image into overlapping
blocks then calculate features of blocks and
final steps are comparing blocks for detecting
forgery. An algorithm to extract image features
was proposed by Weiqi Luo et al. [3], by using
seven characteristics features computed from
the statistical analysis of pixels in an image
block. Three features are colors and the others
are directions. The right matching is obtained
by defining which vector has the highest change
to occur. In 2013, Leida Li et al. [4] introduced
a new method to extract the image features
called Local Binary Pattern (LBP) operated on
the gray scale image and low frequency features
for stability. The feature matching is still
defined based on threshold and the detecting
process requires a specially designed filter and
morphological operations. In the past, a forged
image with copied areas rotated with arbitrary
angles can be detected via the method proposed
by Hailing Huang et al. [5] (2008). Their

ISBN: 978-1-941968-30-7 2016 SDIWC

method is using the Scale Invariant Feature


Transform (SIFT) to extracts keypoints from an
unknown image; these points are invariant to
changes in scale, location and rotation.
Keypoints are described by a descriptor vectors
which are then compared based on ED and
distance ratio threshold to search for matched
keypoints. The higher threshold value leads to
more false matching.
Applying the method of Zernike moments
was suggested by Seung Jin Ryu et al. in [6].
In this method, features are derived from
overlapped blocks in the image then sorted for
forgery detection. The similarity of two
adjacent blocks is calculated using Euclidian
distance and a threshold to find the candidates
for the forgery. In the case of blocks with the
similar Zernike moments (satisfied D1
condition in eq.(15)), to ensure the exactness of
detection, they consider calculating the distance
between of the actual blocks of image (D2, in
eq.(16)). Although this technique was weak
against scaling and other tampering type based
on affine transform, they still choose this to
improve the algorithm for its advance in the
feature representation capability, rotation
invariance, fast computation, multi-level
representation for describing shapes of patterns
and low noise sensitivity.
2.2. Extracting Features Directly from the
tested Image with a Transformation.
The Block-Based algorithm which is
dividing image into small overlapping blocks
was proposed by Jessica Fridrich et al. [7].
They called it exact match and as its called,
this algorithm compares and only shows the
result when there are two or more segments of
the image are match exactly. This technique has
shorter computation time then the exhausted
search method but still consumes a large
amount of time when it deals with large images.
Another approach from [8] uses neighborhood
sorting, in which G. Li et al. used the DWT
(Discrete Wavelet Transform) and SVD
(Singular Value Decomposition). All the
algorithms based on block-matching can reduce
significant computational time compared to the

27

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

original exhausted search. However, they still


have a complex computation and require the
JPEG image compression in order to work
properly [9]. E.S.Gopi et al. [10] had found a
way to work around that issue by proposed a
method using Auto Regressive coefficients and
Artificial Neural Network. This method works
on uncompressed TIFF images, GIF and even
JPEG images with minimal compression.
When it comes to direct features extraction,
there are many algorithms to detect the forgery
from an image. In this paper, we proposed an
algorithm applied the DWT into the forged
image detection therefore this part will present
some related theory of the DWT as an overview
for the topic.
According to [11], the two-dimensional images
which requires a two-dimensional scaling
function, (x, y), and three two-dimensional
wavelets, H (x, y), V (x, y) and D (x, y). They
are the product of one-dimensional scaling
function and corresponding wavelet ,

( x, y ) ( x) ( y )

(1)

H ( x, y ) ( x) ( y )

(2)

V ( x, y ) ( x) ( y )

(3)

D ( x, y ) ( x) ( y )

(4)

In which H measures variations along


horizontal edges, v measures variations along
vertical edges and D measures variations along
diagonals. After finding two-dimensional
scaling and wavelet functions, based on onedimensional discrete wavelet transform, we
define the scaled and translated basis functions:

j ,m,n ( x, y ) 2 j / 2 (2 j x m, 2 j y n)

(5)

ij ,m,n ( x, y ) 2 j / 2 (2 j x m, 2 j y n)

6)

i = {H, V, D}
Therefore, the discrete wavelet transform
of function f(x, y) of size M x N is [11],

W ( j0 , m, n)

1
MN

M 1 N 1

f ( x, y)
x 0 y 0

j 0,m,n

( x, y) (7)

ISBN: 978-1-941968-30-7 2016 SDIWC

Wi ( j, m, n)

1
MN

M 1 N 1

f ( x, y)
x 0 y 0

i
j ,m,n

( x, y )

(8)

i = {H, V, D}
where j0 is an arbitrary starting scale and the
W(j0,m,n) coefficients define an approximation
of f(x, y)at scale j0. The Wi(J, m, n)
coefficients add horizontal, vertical, and
diagonal details for scales j j0. Normally we
let j0 = 0 and select N =M = 2J so that we can
get j = 0, 1, 2..,J 1 and m, n = 0, 1, 2,, 2J
1. Given the W and Wi of 2 equations (7) (8),
f(x, y) is obtained by inverse discrete wavelet
transform [11].
1
f ( x, y )
W ( j0 , m, n) j 0,m,n ( x, y)
MN m n
(9)

1
i
W ( j0 , m, n) ij,m,n ( x, y)
MN i H ,V , D j j 0 m n
3.

THE PROPOSED ALGORITHM

In Fig. 2, the proposed copy-move image


forgery detection is shown in a block diagram.
In the first step, the input image is converted
into gray scale and goes through some
morphological enhancement to extract the
foreground components. In the second step, the
Wavelets transform will be applied to take the
approximation of the foreground component.

Fig.2. Block diagram of the proposed algorithm

This is the key step of the algorithm to decrease


the calculation time of block based image
forgery detection technique using the Zernike
moments. After that, the Zernike moment
calculation is applied to the approximate
component to extract the features. In the last
step, in order to detect the similar blocks,
Euclidean distance of each pair of blocks will

28

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

be computed. If the Euclidean distance is lower


than a threshold, the pair of blocks will be
marked similar.
3.1. Foreground Component Extraction
In order to extract the foreground component,
firstly, the input color image is converted into
gray scale which is necessary for calculating
Zernike moment lately. Emphasis on studying
the geometrical structure of the components of
images, the morphological technique is a useful
tool for extracting image edge components. To
pre-processing or post-processing the images
containing shapes of interest, the morphological
algorithm has been efficiently used in image
processing. Hence, the proposed method used
function edge and morphological technique to
create a binary gradient mask in order to extract
the foreground components. Then the binary
gradient mask that contains the segmented
components of the image will be enhanced with
morphological functions. After that the mask is
used to remove the background.
For analyzing shapes in images, morphological
technique is a useful tool. Some of the
morphology functions have been used for
extracting the foreground components such as
dilation, erosion, image filling, etc. There are
two basis operations of morphology which
combination of those two can build all other
operations: the dilation and erosion [12].

A B z ( B ) z A

(10)

Erosion is the opposite of dilation. If the effect


of dilation is to grow or thicken objects,
erosions effect is to shrink or thin the
objects in a binary image or gray scale image.
This thinning is also controlled by the
structuring element.

AB z ( B ) z AC

(11)

Figure 4. An example of erosion

To create the binary gradient mask to extract


the foreground component, the function edge
is applied first to retrieve the edges of the input
image. Then these edges will be enhanced by
dilation and filling holes, the result will be used
as mask to extract the foreground component.

(a)

(b)

(c)

Figure 5. An example of creating a mask from the input


image. (a) Input image, (b) Binary gradient mask, (c)
Mask that used to extract foreground component.

3.2. Wavelets Approximation

Figure 3. An example of dilation

Dilations effect is to grow or thicken


objects in a binary image. The size and shape of
the structuring element (SE) are used to control
the extension and direction of this thickening.

ISBN: 978-1-941968-30-7 2016 SDIWC

This is the key step of this algorithm that make


it different from other methods. In order to
reduce the calculation time of block based
image forgery detection techniques, the
Wavelets approximation will be used instead of
the original input image. The information of
the image will be divided into approximation
and detail sub-signal using Wavelets analysis
[11, 13]. Using four-band filter bank for sub-

29

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

band coding, the Low Pass Filter (LPF) is


applied to the foreground component on rows
(along x) to obtain the horizontal approximate,
and High Pass Filter (HPF) on rows to obtain
the horizontal detail. Then, in the horizontal
approximate, LPF and HPF is applied on
columns (along y) to get approximate image
and vertical detail respectively (Fig.6 and
Fig.7). Do the same thing for horizontal detail;
the results are horizontal detail and diagonal
detail. The general trend of pixel values is
shown in the approximate sub-band and the
three detail sub-band can be neglected. Hence,
using the approximate sub-band for detecting
forgery is possible.

technique. It is used to analyze and calculate the


Zernike moment of each block of the testing
image. In this proposed method, the
approximate of foreground component will be
used to calculate the moment instead of whole
original image. The mappings of an image onto
a set of complex Zernike polynomials are the
Zernike moments. Complex Zernike functions
constitute a set of orthogonal basis functions
mapped over the unit circle. The Zernike
moments of a pattern are constructed by
projecting it onto those functions. There are
three main properties [6, 14]: First is the
orthogonal feature with the unique and
independent contribution of each moment;
Second is the rotation invariance and third is the
robust to noise or deformation of small
descriptors.
The 2D Zernike moment of order n with
repetition of m for a continuous image function
f(x,y) that vanishes outside the unit circle is:

Figure 6. Wavelets transform flowchart

Z nm

n 1

f ( x, y)V

*
nm

(12)

x 2 y 2 1

Where (n-|m|) is non-negative and even in


which n is a non-negative integer and m is an
integer. The Zernike basis function Vnm ( , ) is
defined by:
Vnm ( , ) Rnm ( ) exp( jm )

Figure 7. A two-dimensional, four-band filter bank for


sub-band image coding [11]

After being filtered, the foreground component


is decomposed into two parts- a detailed and an
approximated part. The sub-signal produced
from low filter will have a highest frequency
equal to half of the original. Hence, after
sampling, only half of the original samples is
needed to reconstruct the signal.
3.3. Zernike Moments Properties
Zernike moment calculation is an important part
of block based image forgery detection

ISBN: 978-1-941968-30-7 2016 SDIWC

(13)

Where Rnm ( , ) is the n-th order of Zernike


radial polynomial given by:
Rnm ( )
(n m ) / 2

k 0

(n k )!
(14)
n 2k
n 2k m n 2k m
k!
!
!
2
2

Identical to the rotational moments and the


complex moments, the magnitude of Zernike
moments is unchanged under image rotation
transformation. Suppose that we know
moments Znm of f(,) up to a given order m. A
discretized original image function f()
whose moments are those of f(,) up to given

30

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

order can be computed. The Zernike moments


have rotational invariance and can be made
scale and translational invariant, making them
suitable for many applications. The Zernike
moments are accurate descriptors even with
relatively few data points. Because of the three
properties of Zernike moments, they are more
effective than other kind of moments in
describing an image. In spite of the
characteristic of Zernike moments, they have
some problems; one of them is costly to
compute as their order increased which can be
resolve with the proposed method.

then the Zernike moments are extracted from


the foreground. Using Euclidean distant and the
actual distant of the pair of blocks, the copymove blocks are determined.
Although the calculation time of Zernike
moments is increased as the maximum order
increased, the wavelets transform reduces the
size of original image to a quarter and reduce
the computational time for calculating the
Zernike moments. These results show the
feasibility and possibility of the proposed
method (see Fig. 8).

3.4. Forgery Detection Conclusion


Firstly, the M x M size tested image is divided
into overlapped L x L sub-blocks. Zernike
moment, Vij of degree n is extracted from each
block. After the Zernike moments are
calculated, each pair of moments will be
compared using Euclidean distance [2].

(Z

Z p 1 D1

(a)

(b)

(c)

(d)

(e)

(f)

(15)

However, the blocks that near each other


may have similar characteristic of Zernike
moments, an actual distant between each block
is calculated as:

i k 2 j l 2

D2

(16)

Where Zp = Vij and Zp+1 = Vkl


Using equ.(15) and equ.(16), the testing blocks
are determined if they are copy-move regions.
4.

SIMULATION RESULTS

4.1. Results
This proposed algorithm is run in MATLAB
2013a. All tested images have 200x200 size and
in JPEG format. The original images are color
and before applying the algorithm, are
converted into gray scale. After that, the
foreground is extracted from the gray scale
image using some morphological structures and

ISBN: 978-1-941968-30-7 2016 SDIWC

(g)
(h)
Figure 8. Some simulation results (a), (c), (e), (g):
Tested images; (b), (d), (f), (h): copy-move detection.

31

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

In the simulations, the image is divided in to


overlapping blocks 16x16 size, therefore, only
copied region greater than 16x16 can be detect.
Because the similar blocks may have the same
characteristics, if the copied region is closer
than the threshold value D2, the block cannot be
detected. Moreover, the threshold used to
determine the similarity between the vectors of
each block is not dynamic for all size of images
and can be appeared as a statistic values.

for comparing of the examined methods.


Particularly, the proposed approach is presented
with a significant reduction of the running time.
Table 1. Results for copy-move image forgery detection
(%). The values are the average values of tested images.

4.2. Comparison
An appropriate measure is needed to evaluate
the performance of copy-move image forgery
detection method. In this paper, precision p,
recall r and F are parameters used to evaluate
the efficiency of the proposed method [1]. This
method is often be used in the field. These
parameters are defined as
p T p /(T p F p )

(17)

r T p /(T p FN )

(18)

F 2 pr /( p r )

(19)

Where TP is the true positive the number of


true forged pixels, FP is the false positive the
number of false forged pixels, and FN is the
false negative the number of miss forged
pixels. F is the combination of precision and
recall in a single value. The precision is the
probability of correct forgery found and the
recall is the probability of forged image
detected.
The proposed method is compared with the
traditional method using only Zernike moment
[1] and other DWT-based methods as shown in
the references. Table 1 show the comparison
results for the case and the values listed in the
table are the average values of variety tested
images. It can be seen from he Table 1, even
the precision is reduced in the proposed method
due to the forged objects are detected usually
larger than the objects in the tested images,
however the recall and the F are getting better

ISBN: 978-1-941968-30-7 2016 SDIWC

90.47
86.72

Recall
(r)
67.09
88.57

77.04
87.64

88.71

94.78

91.65

Method

Precision(p)

Zernike
DWT
Proposed
method

Table 2. Comparison average speed between the


traditional Zernike method with the proposed method.

Method
Average calculation
time (sec.)
Running time
reduced (%)

5.

Zernike
only

Proposed
method

588.5

135.4
77%

CONCLUSION

In this work, a copy-move image forgery


detection technique using block-based method
with the combining of Zernike moments and
Wavelet approximation is proposed. Although
the precision is relatively a bit lower than the
traditional method, where only Zernike moment
is applied, and higher than the Discrete
Wavelet Transform DWT, however the
calculation time is significantly reduced as
shown in the simulation results. In addition, to
remove the background, the proposed method
detects edges and morphological technique to
create a binary gradient mask in order to extract
the foreground components. Then the binary
gradient mask that contains the segmented
components of the image will be enhanced with
morphological functions. After that the mask is
used to remove the background. This technique
provides an efficient detection of forged objects
in images.

32

Proceedings of The Second International Conference on Electrical and Electronic Engineering, Telecommunication Engineering, and Mechatronics, Philippines 2016

A future work will be to increase the precision


of the method by using suitable morphological
edge enhancements combined with the
Curvelets and/or Ridgelets transform and the
Zernike moments.

Workshop on Computational Intelligence


Industrial Application, Wuhan, China, 2008.

and

ACKNOWLEDGMENT

[6] Seung-Jin Ryu, Min-Jeong Lee, and Heung-Kyu


Lee, Detection of copy-rotate-move forgery using
Zernike moments, Lecture Note in Department of
Computer Science, Korea Advanced Institute of
Science and Technology Volume 6387, pp 51-65,
2010, Daejeon, Republic of Koea.

This Research is funded by Vietnam National


University of HoChiMinh City under the Grant
Number B2015-20-02

[7] Fridrich, D. Soukal, and J. Luks, Detection of copy


move forgery in digital images, in Proc. Digital
Forensic Research Workshop, Aug. 2003.

REFERENCES

[8] G. Li, Q. Wu, D. Tu, and S. Sun, A Sorted


Neighborhood Approach for Detecting Duplicated
Regions in Image Forgeries based on DWT and
SVD, in Proceedings of IEEE International
Conference on Multimedia and Expo, Beijing China,
July 2-5, 2007, pp. 1750-1753.

[1] Thuong Le Tien, Tan Huynh Ngoc, Tu Huynh


Kha, Luong Marie, Zernike moment-based
Approach for the Detecting Duplicated Image
Regions by a Modifierd Method to reduce
Geometrical and Numerical Errors, Lecture Note in
Computer Science (LNCS) The 7th Int. Workshop
on the Software Eng. Processes and Applications
SEPA-2015, Banff, Canada, Springer Computer
Science Proceeding (16 pages), 22 25 June 2015.

[9] P.Subathro, A.Baskar, D. Senthil Kumar, Detecting


digital image forgeries using re-sampling by
automatic Region of Interest (ROI), ICTACT
Journal on image and video processing, Vol. 2, issue.
4, May 2012

[2] Tu HuynhKha, Thuong LeTien, Khoa Van Huynh,


Sy Chi Nguyen, A survey on image forgery
detection techniques, The Proceeding of 11-th
IEEE-RIVF International Conference on Computing
and Communication Technologies," Can Tho,
Vietnam, Jan 25-28 2015.

[11] Rafael C. Gonzalez, Digital Image Processing,


Prentice-Hall, Inc, 2002, ISBN 0-201-18075-8.

[3] Weiqi Luo,Jiwu Huang, Guoping Qiu, Robust


detection of region-duplication forgery in digital
image, The proceeding of 18-th IEEE International
Conference on Pattern Recognition, Hong Kong, p.
746 749, 2006.
[4] Leida Li, Shushang Li, Hancheng Zhu, An efficient
scheme for detecting copy-move forged images by
local binary patterns,
Journal of Information
Hiding and Multimedia Signal Processing, Vol. 4,
No. 1, pp. 46-56, January 2013.

[10] E. S. Gopi, N. Lakshmanan, T. Gokul, S. Kumara


Ganesh, and P. R. Shah, Digital Image Forgery
Detection using Artificial Neural Network and Auto
Regressive Coefficients, Electrical and Computer
Engineering, 2006, pp.194-197.

[12] Oge Marques, Practical Image and Video


Processing using Matlab, John Wiley & Sons,
2011, ISBN 978-0-4704815-3
[13] Alasdair McAndrew, An introduction to digital
image processing with MATLAB, Lecture note for
SCM2511 Image processing 1, School of computer
science and mathematics, Victoria University of
Technology, 2004, pp.195-200.
[14] Sundus Y. Hasan, Study of Zernike moments using
analytical Zernike polynomials, Pelagia Research
Library, Iraq, 2012.

[5] Hailing Huang, Weiqiang Guo, Yu Zhang,


Detection of Copy-Move Forgery in Digital Images
Using SIFT Algorithm, IEEE Pacific-Asia

ISBN: 978-1-941968-30-7 2016 SDIWC

33

You might also like