Digital Image Forgery Detection on Artificially Blurred Images Hrudya P, Lekha S. Nair, Adithya S.M, Reshma Unni,Vishnu Priya H, Prabaharan Poornachandran Amrita Center for Cyber Security Amrita Vishwa Vidyapeetham Clappana P.O, Kollam, Kerala, India Email:
[email protected],
[email protected],
[email protected] [email protected],
[email protected],
[email protected] Abstract—In this digital era, lot of information are expressed through images. Various social networking websites, such as Facebook, Twitter, MySpace etc. provides a platform for the users to post up almost any type of picture or photo. However, with the advancement in image editing technologies, many users have become victims of digital forgery as their uploaded images were forged for malicious activities. We have come up with a system which detects image forgery based on edge width analysis and center of gravity concepts. An algorithm based on edge detection is also used to identify the fuzzy edges in the forged digital image. The forged object in the image is highlighted by applying Flood fill algorithm. Different types of image forgeries like Image splicing, Copy-Move image forgery etc. can be detected. This method also reveals multiple forgeries in the same image. The proposed system is capable of detecting digital image forgeries in various image formats efficiently. The results we obtained after the analysis of different images shows that the proposed system is 95% efficient.
I.
I NTRODUCTION
Digital Image forgery is the process of altering or manipulating a digital image with an intention to mislead others by representing the changes as true copies of the original. The advancement in technology introduces many digital image editing softwares such as Photoshop, Gimp, Fireworks etc. which helps in editing the images without making any visible traces of forgery. So the maintenance of integrity and authenticity of digital images is a major problem. The existing image forensic tools can be generally classified into five categories: A.Pixel-based techniques that detect statistical anomalies introduced at the pixel level. B. Format-based techniques that leverage the statistical correlations introduced by a specific lossy compression scheme. C. Camera-based techniques that exploit artifacts introduced by the camera lens, sensor, or on-chip post-processing. D. Physically-based techniques that explicitly model and detect anomalies in the three dimensional interaction between physical objects, light, and the camera. E. Geometric-based techniques that make measurements of objects in the world and their positions with respective to the camera [17] [18]. In this paper we are focusing on pixel based technique for detecting whether an image is forged or not. The detection approach is based on the analysis of edge width, which is the number of pixels along the edge. This technique can be used to identify four types of image forgery: image
retouching, splicing forgery, copy-move image forgery and copy-cover image forgery. In all these types of forgery, during manipulations, jagged edges will be formed. To conceal these jagged edges by a smooth transition, manipulators perform an artificial blur operation on the image [1]. This operation results in an increase in edge width and thereby increases the number of pixels along the edge. The resultant edge width matrix is then evaluated and thin edges are eliminated to retain the rough edges of the altered portion. For the efficient detection of forgery, the output image is divided in to 9 blocks and a concept of center of gravity is applied which identifies the density of white pixels. Depending on the count of white pixel in each block, forged objects are identified and highlighted using flood fill algorithm. Hence multiple forgeries in the same image can also be detected and also images with different extension can be tested efficiently. This paper is organized as, part II explains about the related work in the image forgery field. Part III explains about our proposed system. In the fourth section we show the results we obtained and last section is the Conclusion. II.
L ITERATURE SURVEY
SHang Li and JiangbinZheng, proposed the Blind Detection Of Digital Forgery Image Based on the Edge Width with good percentage of accuracy, but this method could not be successful if the image is naturally blurred [1].Shinfeng D.Lin and Tszan Wu [3] proposed a technique for splicing and copy-move forgery image detection. In this method they have analysed the double compression effect in spacial and DCT domain to detect image forgery. They could correctly identify the forged region with good accuracy but this technique is mainly focussed on JPEG image format. Yang Wang, KaitlynGurule, Jacqueline Wise,Jun Zheng detected Region duplication forgery using Wavelet transforms. This method achieved better performance than DCT-based method, even for images with heavily distorted with noises [14]. Wang Junwen, Liu Guangjie, Dai Yuewei and Wang Zhiquan, proposed a very simple and efficient method to detect the tampered parts from a double compressed JPEG image. This method also uses the DCT technique but limited only to JPEG images [5]. Leida Li, Shushang Li, Jun Wang, proposed a method to detect copy-move forgery with rotation. For this they used Polar Harmonic Transform method. This method is also limited to JPEG image format [15]. Wei Fan, Kai Wang, FrancoisCayre and Zhang Xiong,
proposed a 3D Lighting-Based Image Forgery Detection using Shape-Form-Shading. This technique has great potential to make lighting-based forensics more strong and reliable [16]. In [2] Zhen Zhang, PeiYing Zhang, Zhou Yu, describes a novel approach for tamper localization, which is based on the edge detection. The technique used to find edge is LaplaceGaussian Operator. They could accurately detect the trace of blur operation on composite forged image. FeiPeng and Xi-lan Wang did a research on Digital Image Forgery Forensics by Using Blur Estimation and Abnormal Hue Detection [4]. From their experimental results and analysis they got good performance in detecting artificial blur region. In [6] Xavier Marichal, Wei- Ying Ma and Hong Jiang Zhang detected blur in the compressed domain using DCT information. This technique is directly applicable to images and video frames in compressed (MPEG or JPEG) domain and to all types of MPEG frames (I-, P- or Bframes). In [7] Jing Zhang, ZhanleiFeng and Yuting Su did anew approach for detecting Copy-Move Forgery in Digital Images. In their technique they usediscrete wavelet transform. HweiJen Lin, Chun Wei Wang and Yang-Ta-Kao did fast copy-move forgery detection [8]. In this paper they have divided the given image into overlapping blocks of equal size and collected the features and did medium filtering and connected component analysis are performed on the tentative detected result to obtain the final result. Matthew C. Stamm, Steven K. Tjoa, W. Sabrina Lin and K. J. Ray Liu did undetectable image tampering through jpeg compression Anti-forensics [9]. In this paper, they propose an anti-forensic operation capable of removing blocking artefacts from a previously JPEG compressed image. Suneetha and Dr. T. Venkateswarlu, developed an enhancement techniques for gray scale Images in spatial domain [11]. In [12] Matthew C. Stamm and K.J.RayLiu did some work on anti-Forensics of Digital Image Compression. In this they have presented a set of anti-forensic techniques to remove forensically significant indicators of compression from an image. Xu Bo, Wang Junwen, Liu Guangjie and Dai Yuewei detected Image Copymove Forgery Based on Speed Up Robust Features (SURF) descriptors [13] are invariant to rotation, scaling etc. III.
P ROPOSED SYSTEM
To detect forgery, we use passive blind detection approach which does not require any prior knowledge and conditions for the identification of the authenticity of digital images. The passive method works purely by analyzing binary information of digital image without any need for external information. The image enhancement technique used here is spatial domain analysis, which refers to the grid of pixels that represent an image. The images are subjected to an artificial blur operation after copy-move, splicing forgery etc. by forgers to conceal the jagged edges. This artificial blur operation results in an increased edge width and thereby increases the number of pixels along the edge. Fig.1 shows the architectural flow of our proposed system. A. Pre-processing The input image should be converted from RGB to gray scale. The gray scale image is then convolved horizontally and vertically with the help of Sobel filters [1].
Fig. 1.
Architectural Flow Diagram TABLE I.
E IGHT ADJACENT PIXEL MATRIX
Zone 4
Zone 3
Zone 2
Zone 5
∂(i, j)
Zone 1
Zone 6
Zone 7
Zone 8
B. Calculation of image gradient direction The gradient direction is the directional change in intensity or color of an image. Gradient values are used to determine the same. This is calculated by taking the tan inverse of the convoluted results.
∂(i, j) = tan−1 (
∆Y ) ∆X
(1)
Where ∂(i, j) is the gradient direction of pixel(i, j) , ∆Y and ∆X are the results obtained after the convolution of vertical Sobel matrix and horizontal Sobel matrix with the image respectively. Table I shows the eight adjacent pixel matrix of an image. And Table II shows the pixel position in an image. The gradient value of each pixel is stored in a matrix. Each pixel of digital images has 8 adjacent pixels; hence the gradient values are divided in to eight zones [1]. These eight zones shown in Fig 2. corresponds to eight adjacent pixels in an image. The gradient direction are defined in the range [0, 2π].
IHO =
(P (i − 1, j + 1) + 2 ∗ P (i, j + 1) + P (i + 1, j + 1)) 4
IM O =
(P (i − 1, j) + 2 ∗ P (i, j) + P (i + 1, j)) 4
ILO =
(P (i − 1, j − 1) + 2 ∗ P (i, j − 1) + P (i + 1, j − 1)) 4 (3)
2) Even zone pixels: Equation for even zone pixels are:
Fig. 2.
Zone Diagram of adjacent pixels [1] TABLE II.
P IXEL POSITION IN AN IMAGE
P(i-1,j-1)
P(i-1,j)
P(i-1,j+1)
P(i,j-1)
P(i,j)
P(i,j+1)
IHE =
(P (i − 1, j) + P (i, j + 1)) 2
IM E =
(P (i − 1, j − 1) + 2 ∗ P (i, j) + P (i + 1, j + 1)) 4
ILE =
(P (i, j − 1) + 2 ∗ P (i + 1)) 2
D. Finding edge pixels When the pixels located in the edge of the area, along the gradient direction θ(i, j), it will have a high gray value which is greater than the middle gray value. The middle gray value is greater than the low gray value [1]. IH − IM > α ∩ IM − LL > α
P(i+1,j-1)
P(i+1,j)
(4)
P(i+1,j+1)
To find the gradient direction of these pixels, the following equation is used.
(5)
The pixels that satisfy the given equation are defined as edge pixels and it is marked as white pixel. The pixels that are not satisfying this are marked as black. Alpha is the difference of gray value along the gradient direction. When alpha value increases, the more likely weak edges are ignored and if alpha value decreases, it is easier to detect the weak edges. Here the alpha value is defined as 1.4 where the weak artificial blur edge detection effect is better. E. Edge pixel width calculation
xπ (x + 2)π (x + 1)π , δ(i, j)[ , ), θ(i, j) = 8 8 8 0, otherwise.
(2)
Where x = 1, 3, 5 ...13
Edge width can be defined as the number of pixels along the edge. In the previous step we have determined the pixels which are located at the edge. In the edge matrix, if a pixel is found to be an edge pixel, then the search continues in that pixel’s gradient direction. If the adjacent pixel is also found to be an edge, then the width is incremented by 1. Thus the width matrix can be calculated [1].
C. Calculation of average gray value
F. Elimination of thin edges
Corresponding to each zone, low medium and high intensity values are calculated. Separate equations are there for the pixels belongs to odd zones (3) and even zones (4).
The normal images have edge width less than five. The images are subjected to an artificial blur operation after copymove, splicing forgery etc. by forgers to conceal the jagged edges. This artificial blur operation will results in an increase in edge width by increasing the number of pixels along the edge. So the edge width values less than five are neglected and greater than five are retained.
1) Odd zone pixels: Equation for odd zone pixels are:
G. Apply center of gravity after dividing into nine blocks The output image after finding the edge width is divided into 9 blocks in order to apply center of gravity in each block of the image. The center of gravity helps to determine the white pixel density. The equation for calculating center of gravity is as follows.
Centerof Gravity = (x, y) where x =
(6)
Σxi of whitepixels Σwhitepixels
Fig. 5.
Forgery Detected
Fig. 6.
Original Images
Fig. 7.
Forged and Detected Images
Fig. 8.
Success and Error Ratio Percentages
and y=
Σyi of whitepixels Σwhitepixels
H. Highlight the forged object The forged object is highlighted by applying flood fill algorithm. This algorithm is used to fill connected pixels in an image with new color starts from a seed pixel. IV.
E XPERIMENTAL R ESULT
The images which are shown in figures 3 and 6 are the original images which are used to combine the forged images. Figures 4, 5 and 7 shows the forged images and results obtained by our proposed method, image splicing forgery detection technique.
Fig. 3.
Original Image [1]
Fig. 4.
Forged Image [1]
Table III shows the output we got for different forged, nonforged and naturally blurred images. Fig 8 is the bar diagram of the success and error rates of our system. The results we obtained after the analysis of these different images shows that
TABLE III.
E XPERIMENTAL RESULTS
R EFERENCES [1]
Types of images
Count
Successful detection
Detection rate
[2]
Forged images
22
20
91
Non Forged images
23
22
95
[3]
[4]
[5] Naturally blurred images
23
21
91
[6]
Total
68
63
92.5
[7]
[8]
the proposed system is more than 92% efficient on an average. The given technique will be much efficient compared to other existing image forgery detection tools. [9]
V.
C ONCLUSION
We successfully detected forgery from a fake image, based on edge width analysis. The project can be applied in areas like images submitted as evidences in court of law, part of medical records, financial documents etc. The proposed system analyses the influence of blur operations on the edges of forged image. This operation results in an increase in edge width and thereby increases the number of pixels along the edge. This characteristic of artificial blur operation is considered to remove the thin edges and keeping wide edges to detect the forged area. The concept of centre of gravity helps in the efficient detection of multiple forgeries. Experimental results shows that proposed approach has better results to edge detection and detects forged images with artificial blurred edges effectively with an overall efficiency of moreb than 92%. For the future we are planning to scale the system in cloud so that anyone can check whether a particular image is forged or not. We are also trying to enhance the system by reducing the false error rates we obtained so far.
[10]
[11]
[12] [13]
[14]
[15] [16]
[17]
ACKNOWLEDGMENT We owe a great thanks to many a people who have helped and supported us for the completion of this project. We express our deepest sense of gratitude to Dr. KrishnasreeAchuthan, Director of TBI, for believing in our potential and providing us an opportunity to work for Amrita Center for Cyber Security with adequate facilities. We would like to thank Mr. Aravind Ashok (Research Engineer, Amrita Center for Cyber Security), for correcting various mistakes of ours with great attention and care. Last but not the least we would also like to thank our Institution, Amrita School of Engineering, Amritapuri Campus for their help and support.
[18]
SHang Li and JiangbinZheng,Blind Detection Of Digtal Forgery Image Based on the Edge Width,School of Computer,Northwestern Polytechnical University,Xi an 710072,China. Zhen Zhang,PeiYing Zhang, Zhou Yu,A Novel Approach for Detecting Forged Image, School of Electrical Engineering, Zhengzhou University,Zhengzhou 450001,China. Shinfeng D. Lin and Tszan Wu,An Integrated Technique for Splicing and Copy-move Forgery Image Detection, Department of Computer Science and Information Engineering,National Dong Hwa University,Hualien,Taiwan. FeiPeng,Xi-lan Wang,Digital Image Forgery Forensics by Using Blur Estimation and Abnormal Hue DetectionCollege of Computer and Communication,Hunan University,Changsha,PRC,410082. Wang Junwen,Liu Guangjie,Dai Yuewei & WangZhiquan,Detecting JPEG image forgery based on double compression,School of Automation,Nanjing Univ. of Science and Technology,Nanjing 210094, P. R. China. Xavier Marichal,Wei- Ying Ma and HongJiang Zhang,Blur derermination in the compressed domain using DCT information,Hewlett Packard Research Laboratories,1501 Page Mill Road,Palo Alto CA-94304 ,USA. Jing Zhang,ZhanleiFeng and Yuting Su,A New Approach for Detecting Copy-Move Forgery in Digital Images,School of Electronic Information Engineering,Tianjin University,Tianjin,China,300072. Hwei-Jen Lin,Chun Wei Wang and Yang-Ta-Kao, Fast Copy- Move Forgery Detection ,Department of Information Engineering and Computer Science,Tamkang University and Department of Network Information Technology,Chihlee Institute of Technology,151 Ying-Chuan Road,Tamsui,Taipei,Taiwan,ROC. Matthew C. Stamm,Steven K. Tjoa,W. Sabrina Lin,and K. J. Ray Liu,Undetectable image tampering through jpeg compression Antiforensics, Dept. of Electrical and Computer Engineering, University of Maryland,College Park Li Kang and Xiao-ping Cheng, Copy- move Forgery Detection in Digital Image,College of Computer and Information Science,Southwest University,Chongqing,China. Suneetha and Dr. T. Venkateswarlu, Enhancement Techniques for Gray scale Images in Spatial Domain,Associate Professor,Department of ECE,AITS,Tirupati,INDIA and Professor,ECE Department,S.V. University College of Engineering,Tirupati,INDIA. Matthew C. Stamm, Student Member, IEEE,andK.J.RayLiu, Fellow,IEEE, Anti-Forensics of Digital Image Compression. Xu Bo, Wang Junwen, Liu Guangjie and Dai Yuewei,Image Copy move Forgery Detection Based on SURF, School of Automation,Nanjing University of Science and Technology,Nanjing 210094, China. Yang Wang,KaitlynGurule,JacquelineWise,JunZheng,Wavelet Based Region Duplication Forgery Detection,New Mexico Institute of Mining and Technology Socorro,NM. Leida Li,Shushang Li,Jun Wang,Copy-Move Forgery Detection Based on PHT,Shanghai 200240,China. Wei Fan,KaiWang,FrancoisCayre and Zhang Xiong,3D Lighting- Based Image Forgery Detection using Shape-Form-Shading,Beihang University,Beijing 100191,P.R.China. Baina Su,Zhu Kaizhen,Detection of Copy Forgery in Digital Images Based on Lpp-Sift,Schoolof Electrical Engineering,Zhengzhou University. HanyFarid,Image Forgery Detection,IEEE SIGNAL PROCESSING MAGAZINE,MARCH 2009,pp.16-25.