Image-Splicing Forgery Detection Based On Improved LBP and K-Nearest Neighbors Algorithm Fahime Hakimi, Department of Electrical and Computer engineering. Zanjan branch, Islamic Azad University. Zanjan, Iran Mahdi Hariri, Department of Electrical and Computer engineering. Zanjan branch, Islamic Azad University. Zanjan, Iran Received: August 26, 2015 Accepted: September 28, 2015 Published: October 30, 2015 Abstract. The wide use of high-performance image acquisition devices and powerful image-processing software has made it easy to tamper images for malicious purposes. Image splicing, which has constituted a menace to integrity and authenticity of images, is a very common and simple trick in image forgery. Therefore, image-splicing detection is one the significant issues involved in digital forensics. In this paper, an effective passive splicing image forgery detection scheme based on Improved Local Binary Pattern (LBP) and Discrete Cosine Transform (DCT) is proposed. First, the chrominance component of the input image is divided into non-overlapping blocks. Then, for each block, Improved LBP is calculated and transformed into frequency domain using 2D DCT. Standard deviations of frequency coefficients for all blocks are calculated and used as features K-Nearest Neighbors (KNN) algorithm is used for classification. Experimental results show the accuracy improvement for the proposed method in terms of the detection performance over CASIA1 and CASIA2 image splicing detection evaluation dataset. Keywords: Image-splicing, tampering detection, local binary pattern, DCT, KNN 1 Introduction I mages are used everywhere either as personal memory reminders or for official purposes. Ever since their emergence, images have been generally accepted as evidence of depicted events of happenings. However, the advent of low-cost and powerful editing tools has made modification and manipulation of digital images much easier. It has also given way to creation of new forgeries as similar as possible to the original ones. Thus the necessity of regaining the trust of digital images makes the image forensics a very important research area [1]. In Image Splicing, two images are combined to create one tampered image. It is also known as a technique that involves a composite of two or more images which are combined to create a fake image. Fig. 1 shows an example of image splicing forgery. 1.1 Background a. Original image b. Forged image Fig. 1. An example of image splicing image forgery
Electronics Information & Planning, 2015, Volume 3 ISSN: 0304-9876 Image forgery detection techniques are classified into two main categories: active and passive. Active techniques, detect the forgery by validating the integrity of a pre-embedded (i.e. by a camera) signature or watermark. Since many available cameras are not having the ability to embed such kind of signature [2], this approach has a limited scope. In contrast to active approaches, passive techniques do not need any watermark or prior information about images. They depend on the original characteristics of the image [3], which let them to be widely used and become a hot research topic in digital image forensics. Many passive techniques for image splicing forgery detection have been proposed so far. Zhang et al. [4] applied an idea in Steganalysis [5] by merging the Markov features and discrete cosine transforms (DCT) features. They achieved a detection rate of 91.5%. Chen et al. [6] method combines the statistical moments of 1-D and 2-D characteristic functions extracted from the spatial domain and multi block discrete cosine transform (MBDCT). Their method could be effectively used in texture and non-texture images. Shi et al. [7] employs statistical features based on 1D and 2D moments, and transition probability features based on Markov chain in DCT domain. Riers & Angelopoulou [8], proposed illumination color as a new indicator to distinguish the original and manipulated image. Munkhbaatar & Rhee proposed a blind forgery detection scheme using compatibility metrics based on edge blur and lightning directions [9]. The edge blur width is used to identify the discontinuities of edge in spliced image and the lightning directions are used to enlighten the image composition. Pan, Xing & Lyu [10], describes a method based on the fact that the images from different origins tend to have different amount of noise introduced by the sensors. They proposed an effective method to expose image splicing by detecting the inconsistencies in local noise variances. But the main this method is not able to detect the entire tampered region. In this paper, an effective passive splicing image forgery detection scheme based on Improved Local Binary Pattern (LBP) and Discrete Cosine Transform (DCT) is proposed. First, the chrominance component of the input image is divided into non-overlapping blocks. Then, for each block, Improved LBP is calculated and transformed into frequency domain using 2D DCT. Standard deviations of frequency coefficients for all blocks are calculated and used as features-nearest Neighbors (KNN) algorithm is used for classification. The rest of this paper is organizes as follow. Section 2 introduces the detail of the proposed method. Experimental results and discussion are presented in Section 3, while Section 4 provides conclusion. 2 Proposed method Our proposed method to detect image splicing forgeries is based on Ojala s Improved Local Binary Pattern [12] and Discrete Cosine Transform (DCT). As you see in the diagram in Fig. 2, first, the input RGB color image is transformed into the YCbCr color system [11], and then the chrominance component (Cb or Cr) is divided into non-overlapping blocks. In the second step, we use ILBP to classify texture of the Image, then 2D DCT is applied in all blocks. Then, for each block, Standard Division is computed and its result set is considered as feature vector. Finally, features are sent to k Nearest Neighbors classifier in order to decide about authenticity of the photo. 2.1 Generation of YCbCr color system Fig 2. Diagram of the proposed method In this section, the input RGB color image is transformed into YCbCr color system because chromatic channels, captures the tampering artifacts better than other color channels. The visibility of tampering 382
Hakimi, Hariri: Image-Splicing Forgery Detection Based On Improved LBP and K-Nearest Neighbors Algorithm traces varies in different color models. Image forgery detection techniques usually work in grayscale and RGB color systems. However, recent researchers have found that using chromatic channel rather than luminance or RGB enhance the detection performance [11]. a. Original image b. Y component c. Cb component d. Cr component Fig 3. A RGB image and its YCbCr components 2.2 Improved Local Binary Pattern To formally define the uniform patterns, a uniformity measure U ( pattern ) is introduced, which corresponds to the number of spatial transitions (bitwise 0/1 changes) in the pattern [12] For example, patterns 00000000 and 11111111 have U value of 0, while the other seven patterns in the first row of Fig. 4 have U value of 2 as there are exactly two 0/1 transitions in the pattern. Similarly, the other 27 patterns have U value of at least 4. We designate patterns that have U value of at most 2 as uniform and propose the following operator instead of LBP ri p,r : LBP p,r Where ri = { p 1 p=0 s(g p g c ), if U(LBP P,R ) 2 P + 1, otherwise p 1 U (LBP P,R ) = s (g p 1 g c ) - (g 0 g c ) + p=1 (g p g c ) (g p 1 g c ). (2) Where (1) s = { 1, x 0 0, x < 0 (3) 383
Electronics Information & Planning, 2015, Volume 3 ISSN: 0304-9876 Fig 4. The 36 unique rotation invariant binary patterns that can occur in the circularly Symmetric neighbor set of LBP ri 8,1. Black and white circles correspond to bit values of 0 and 1 in the 8-bit output of the operator. a. Original image b. Improved LBP applied Image Fig 5. An Original image and its Improved LBP applied image 2.3 K nearest Neighbors Classifier KNN is one of the best, simplest and most common instance-based classifiers. This classifier considers the test data into the class which has the most votes among its k nearest neighbors. The nearest neighbors in a test are usually obtained from Euclidian distance as 4, 5 below: i (x, t) = m i d eucl (x, t) d eucl Where i=1. (4) i d eucl (x, t) = f(x) = { 1, if a i(x) a i (t) 0, if a i (x) = a i (t) (5) 3 Experimental results In this section, we first introduce the evaluation policy and the datasets used to perform the experiments using the proposed method. Later, a set of experiments as well as discussions on their results are presented. 384
Hakimi, Hariri: Image-Splicing Forgery Detection Based On Improved LBP and K-Nearest Neighbors Algorithm 3.1 Data Set and Evaluation Policy The proposed method is evaluated using two benchmark databases: CASIA Tampered Image Detection Evaluation Database Version 1.0 (CASIA TIDE v1.0) [13], CASIA TIDE v2.0 [14]. Table I provides a description of these datasets. First, we perform experiments on CASIA v1.0 to find the optimal parameter sets, and then we test the consistency of the proposed method using the other datasets Dataset Image Type Table I. Description of the Evaluated Dataset Image Size Number of Images Authentic Tampered Total CASIA1 jpg 384*256 256*384 800 921 1721 CASIA2 jpg tiff bmp 240*160 To 900*600 7491 5123 1614 To evaluate the performance of KNN, we use 20-fold cross validation. The performance of the proposed technique is given in terms of accuracy. Accuracy measures the percentage of the images that are correctly classified by the classifier and it is computed as: Accuracy = 100 x (TP+TN)/ (TP+TN+FN+FP). (6) Where TP (True Positive) is the number of tampered images which are classified as tampered, FN (False Negative) is the number of tampered images which are classified as authentic, TN (True Negative) is the number of authentic images which are classified as authentic and FP (False Positive) is the number of authentic images which are classified as tampered ones. 3.2 Results and Discussion We examine the effect of different components to find their optimal value detection rates. Fig. 6 shows the detection accuracy of different components of color systems. It can be observed that Cb and Cr achieved the best detection performance (i.e. 97.3% and 94.2%, respectively) compared to the other channels. These results show that using chromatic component enhances the detection rate of image forgeries. The performance of Cb is almost similar to that of Cr. Fusion of the features from both Cb and Cr. Applied together, they further improve the accuracy of the results to 99%. Table II gives a comparison of the performance of the proposed method using CASIA v1.0, CASIA v2.0 datasets. The results are comparable to each other which demonstrate the consistency of the proposed method. To evaluate our proposed method comprehensively, we compare it with other recent methods [15, 2, 16] which use experimental conditions similar to our method. The method described in [16] was evaluated using CASIA TIDE v2.0. Table III shows the comparison of these methods. It can be observed from Table III, that the proposed method performs much better than the state-of- the-art methods. 385
Electronics Information & Planning, 2015, Volume 3 ISSN: 0304-9876 Table II. The Performance on Different Datasets. Dataset Accuracy (%) AUC CASIA 1 98 0.98 CASIA 2 96 0.966 Dataset Table III. Results of the Comparison between the Proposed and Other Methods. Proposed method Method 16 Accuracy (%) Method 15 Method 2 CASIA 1 98-93.33 95.2 CASIA 2 96 95.5 - - 4 Conclusions In this paper, a novel splicing image forgery detection method based on Improved LBP and DCT is proposed. The image chromatic component is divided into non-overlapping blocks and then Improved LBP code of each block is transformed into DCT domain. Later, standard deviations of DCT coefficients of all blocks are computed and used as features, and KNN classifier is used for classification. The experimental results show that the proposed features of the chromatic channels are outperforming those of the other color channels. The proposed method demonstrates a noticeably enhanced consistency over CASIA TIDE v1.0, CASIA TIDE v2.0 datasets with accuracies of 98 and 96, respectively. These results are significantly higher than those of other recent methods. REFERENCES [1] Moghaddasi.Z., et al SVD-based image splicing detection in Information Technology and Multimedia (ICIMU) 2014. IEEE International Conference on 18-20 Nov. 2014. [2] H. Farid. A Survey of image forgery detection. IEEE Signal Processing Magazine, vol. 26, pp. 16-25, 2009. [3] B. L. Shiva Kumar and Lt. Dr. Santhosh. "Detecting copy-move forgery in Digital images: A survey and analysis of current methods," Global Journal of Computer Science and Technology, vol. 10, no. 7, 2010. [4] Zhang, J., Y. Zhao, and Y. Su. A new approach merging Markov and DCT features for image splicing detection, in Intelligent Computing and Intelligent Systems, 2009. ICIS 2009. IEEE International Conference on. 2009. IEEE. [5] Shi, Y.Q., C. Chen, and W. Chen. A Markov process based approach to effective attacking JPEG steganography, in Information Hiding. 2007. Springer. [6] Chen, C., Y.Q. Shi, and G. Xuan. Steganalyzing texture images, in Image Processing, 2007. ICIP 2007. IEEE International Conference on. 2007. IEEE. 386
Hakimi, Hariri: Image-Splicing Forgery Detection Based On Improved LBP and K-Nearest Neighbors Algorithm [7] Y. Q. Shi, C. Chen, and W. Chen, "A natural image model approach to splicing detection," presented at the Proceedings of the 9th workshop on Multimedia & security, Dallas, Texas, USA, 2007. [8] C. Riess and E. Angelopoulou, (2010) Scene illumination as an indicator of image manipulation, Inf. Hiding, vol. 6387, pp. 66 80. [9] Zahra Mohamadian and Ali Akbar pouyan, (2013) Detection of duplication Forgery in Digital Images in Uniform and Non- Uniform Regions, 15th International Conference on Computer Modelling and Simulation, UK. [10] O Brien and H. Farid, (Jan 2012) Exposing photo manipulation with inconsistent reflections, ACM Trans. Graphics, vol. 31, no. 1, pp. 1 11. [11] Amani A. AL Ahmadi., et al Splicing image forgery detection based on DCT and Local Binary Pattern, Global Conference on Signal and Information Processing (Global SIP), 2013 IEEE. [12] Timo Ojala., et al Multiresolution Gray-Scale and Rotation Invariant Texture Classification with Local Binary Patterns IEEE Transaction on Pattern Analysis and Machin Intelligence, July 2002. [13] "CASIA Tampered Image Detection Evaluation Database (CASIA TIDE v1.0) Internet: http://forensics.idealtest.org:8080/index_v1.html, [Sep. 22, 2012]. [14] "CASIA Tampered Image Detection Evaluation Database (CASIA TIDE v2.0) " Internet: http://forensics.idealtest.org:8080/index_v2.html, [Feb.10, 2013]. [15]M. Hussain, G. Muhammad, S. Q. Saleh, A. M. Mirza, and G. Bebis, " Image Forgery Detection Using Multi-Resolution Weber Local Descriptors," in Proc. EUROCON 2013, Image Processing and Analysis, (to appear). [16]Wang, J. Dong, and T. Tan, "Image tampering detection based on stationary distribution of Markov chain", in 17th IEEE International Conference on Image Processing (ICIP), pp.2101 2104, 2010. [17] Z. He, et al., Digital image splicing detection based on Markov features in DCT and DWT domain, Pattern Recognition (2012), http://dx.doi.org/10.1016/j.patcog.2012.05.014. 387