Image Tampering Detection by Blocking Periodicity Analysis in JPEG Compressed Images Yi-Lei Chen and Chiou-Ting Hsu Department of Computer Science, National Tsing Hua University, Taiwan Email: [email protected]

matrix from a double compressed JPEG image using histograms of individual DCT coefficients. Also, in [10], Ye et al. use the histogram of DCT coefficients to estimate the quantization step size and then measure the inconsistency of quantization errors between different image regions. The other attempt relies on detection of blocking artifacts. In [11], Luo et al. proposed a blocking artifact characteristics matrix (BACM) to measure the symmetrical property of the blocking artifacts introduced by JPEG encoder. Their experiments show that, once a JPEG image has been cropped and recompressed, the regular symmetry of BACM will be destroyed. However, from our simulation, we observed that this symmetric property measured in spatial domain is highly content dependent and not always provides as a reliable measurement. For example, in Figure 1, the two JPEG images contain different content and thus have very different symmetric strength in their original and tampered BACMs. It is very difficult to determine whether they have been tampered or not from the unsymmetry in their corresponding BACMs.

Abstract — Since JPEG image format has been a popularly used image compression standard, tampering detection in JPEG images now plays an important role. The artifacts introduced by lossy JPEG compression can be seen as an inherent signature for compressed images. In this paper, we propose a new approach to analyse the blocking periodicity by, 1) developing a linearly dependency model of pixel differences, 2) constructing a probability map of each pixel’s belonging to this model, and 3) finally extracting a peak window from the Fourier spectrum of the probability map. We will show that, for single and double compressed images, their peaks’ energy distribution behave very differently. We exploit this property and derive statistic features from peak windows to classify whether an image has been tampered by cropping and recompression. Experimental results demonstrate the validity of the proposed approach.

I. INTRODUCTION Rapid progress in image processing technologies keeps bringing new issues and challenges in image authentication. Although many digital (fragile or semi-fragile) watermarking methods have been studied for image authentication, these methods unfortunately cannot provide as a general solution in the absence of a popularly adopted watermarking technique. Without using watermarks, many passive or non-intrusive methods have been proposed for digital image tampering detection. Some rely on detecting the traces resulted from image acquisition/tampering operations, such as re-sampling [1], color filter array interpolation [2, 3], camera response function [4, 5], and camera sensor noise pattern [6]. Other attempts tried to analyse the inconsistencies in lighting direction [7] or statistics of natural image [8]. Nevertheless, many of the existing methods achieve high performance only for uncompressed raw images and are very vulnerable to JPEG compression. Since JPEG image format has now been popularly adopted in digital cameras and image processing software, it is impractical to include no compression issues in the tampering detection methods. The artifacts introduced by lossy JPEG compression can be seen as an inherent signature for compressed images. When a compressed image is tampered and/or recompressed, the tampered image may inherit the primary compression artifacts. Some attempts have been proposed to detect image tampering using JPEG artifacts. One relies on the estimation of JPEG quantization table. For example, in [9], Lukas and Fridrich presented a method to estimate the primary quantization

(a)

(b)

(c)

(d)

(e)

(f)

Fig 1. A simulation for analysing the symmetric property of BACM [11]: (a)(b) two JPEG compressed images; (c)(d) the BACMs of images in (a) and (b); and (e)(f) the BACMs of the cropped and recompressed images of (a) and (b), respectively.

1

Motivated from the above observation, in this paper, we aim to analyse the blocking artifacts from its periodic property and try to devise a robust method insensitive to different image contents. The periodic blocking artifacts, due to differences in quantization errors between neighboring blocks, can be seen as an inherent feature in JPEG compressed images. A single compressed image usually has a regular periodic blocking pattern; while when an image has been cropped and double compressed, the detected blocking periodicity may reveal the trace of its original periodicity.

close to zero for within-block pixels. Moreover, when comparing the local pixel differences within a small spatial neighbourhood, we found that f ( x, y ) of within-block pixels are highly similar to each other, while across-block pixels have very different local pixel differences.

B1: within-block pixel

To analyse the periodic characteristic in compressed images, B2: across-block pixel we first measure each pixel’s blockiness and then model their different spatial dependency for within-block and across-block pixels. In order to have a reliable estimation on blocking periodicity, we introduce a block selection process to filter out inappropriate blocks from our estimation. Next, we build a Fig.2. The within-block pixels and across-block pixels in an 8x8 block. probability map of each pixel’s belonging to within-block pixels and then convert the map into its Fourier domain. Therefore, we aim to model the dependency of Finally, we extract several statistical features from the peak energy distribution to train SVM classifiers for discriminating f ( x, y ) within a small neighbourhood and derive different single compressed images from cropped-and-recompressed dependency models for within-block and across-block pixels. images. Here we assume, in a small neighbourhood of f ( x  u , y  v) with The rest of this paper is organized as follows. Section 2 0  u , v  1 , the within-block pixel f ( x, y ) is linearly presents the proposed method with periodic estimation in correlated to its neighbours. Thus, we model the conditional spatial domain and analysis in frequency domain. Section 3 probability of f ( x, y ) ’s belonging to within-block pixels as a shows the experimental results and discussions. Finally, Gaussian [2]: section 4 gives the conclusion. Pr{ f ( x, y ) | within_blo ck } 

II. PROPOSED METHOD

1

 2



 ( f ( x, y )    u ,v f ( x  u , y  v )) 2  u ,v exp   2 2  

    

.

(2)

To analyse the variation in blocking periodicity after cropping and JPEG recompression, we first measure the blocking period of the whole image in spatial domain and adopt some constraints on the block selection process to have a robust and content-independent estimation. Then, we convert the periodic model to frequency domain and derive several statistical features from the energy distribution of periodic peaks for SVM training.

Then, by Bayes’ rule, the posterior probability of each f ( x, y ) ’s belonging to within-block pixels becomes

A. Blocking Period Estimation in Spatial Domain

and should be proportional to equation (2) if equal prior probabilities for both classes is assumed.

Pr( within _ block | f ( x, y )) 

1) Model of Blocking Artifact

(3)

Next, we use EM algorithm as derived in [2] to estimate each pixel’s probability of being a within-block pixel and the unknown weights  u,v iteratively. An example of the

We first use a simple and effective method [12] to measure the pixel blockiness. For each pixel ( x, y ) , we compute the local pixel difference f ( x, y ) as its blockiness by f ( x, y )  I ( x, y )  I ( x  1, y  1)  I ( x  1, y )  I ( x, y  1) ,

,

Pr( f ( x, y ) | within _ block ) Pr( within _ block )

probability map for the image in Fig. 3 (a) is shown in Fig. 3 (b). As we expected, since the local pixel difference f ( x, y ) of across-block pixels are independent with its neighbours, mostly their probability converge to zero, which is shown as a black pixel in Fig. 3 (b). While for within-block pixels, their local pixel difference f ( x, y ) have higher dependency with neighbours and thus have higher probability (i.e. pixels with brighter intensities) in the map.

(1)

where I ( x, y ) is intensity value of pixel ( x, y ) . Assume we classify image pixels into two classes: within-block pixels and across-block pixels (as shown in Fig. 2), for images with mostly smooth regions, the local pixel difference f ( x, y ) should be comparatively large for across-block pixels and

2

Tsmooth 

 f ( x, y )  T

 x , y an 8x8 block

edge

.

(5)

Here, we determine the control parameter C and the two thresholds Tsmooth and Tedge empirically. We set

(C , Tsmooth , Tedge ) to be (3, 50, 100) and (2.5, 30, 80) for low quality and high quality images, respectively. (a)

(c)

(b)

Using the two constraints defined in equations (4) and (5), we then select the block set which better preserve the blocking periodicity introduced by JPEG encoder. The selected blocks of Fig. 3(a) are shown in Fig. 3(c) as white blocks, and the probability map calculated from the selected blocks is shown in Fig. 3(d). Compared to Fig. 3(b), the probability map in Fig. 3 (d) gives a much satisfactory result, which shows clear periodic blocking artifacts and has no content-dependent information.

(d)

B. Period Analysis in Frequency Domain 1) Peak Window

Fig.3. (a) The test image of size 720x480; (b) the probability map of part of (a); (c) the selected blocks for blockiness measurement are indicated as white blocks; and (d) the probability map of the selected blocks.

After we obtain the probability map, we convert the probability map to Fourier domain for periodicity analysis. Since JPEG compression is based on 8x8 DCT, the blocking grids should repeatedly appear for every eight pixels along horizontal and vertical directions. Thus, we should expect to observe 8x8 peaks in the power spectrum.

2) Dynamic Block Selection Although this linear dependency model provides as a more reliable measure than using only local pixel differences f ( x, y ) , the resulting probability map is still highly contentdependent. For example, as shown in Fig. 3 (b), some withinblock pixels existing in texture region or edge boundary do not follow the linearly-dependency model and get very small probabilities.

However, in order to have a more robust result, we follow the suggestion described in [2] to first up-sample the probability map by a factor of two and then high-pass filter the up-sampled map. After this pre-processing step, we would obtain 16x16 peaks from the power spectrum, as shown in Fig. 4.

In order to tackle this content-dependent problem, we propose a dynamic block selection method to select only the blocks which can provide reliable blockiness measurement. The first constraint of our block selection is, the local pixel difference of across-block pixels must be greater than that of within-block pixels; that is, 1 B2

1

 f ( x , y )  C  B  f ( x, y ) ,

x , yB2

(4)

1 x , yB1

where C is a control parameter and B1 , B2 are the numbers of within-block and across-block pixels, respectively. Here B1 =49 and B2 =15 in the case of 8x8 block. Moreover, we also prefer to select the blocks whose content is neither overly-smooth nor overly-complex. An overlycomplex block is not a good selection because the variation in its block content may become higher than blocking artifacts. Also, from our experiments, we found that it is sometimes very difficult to identify the blockiness for overly-smooth region. Therefore, our second constraint for block selection is

Fig.4. Power spectrum of the probability map

As these 16x16 peaks indicate the periodic characteristic of a JPEG compressed image, we expect to see variation in the peaks when this image has been tampered by cropping and double compression. We use only the peaks in lower-

3

appear in the probability map, we can see that most peak energy concentrates on vertical and horizontal peaks. On the other hand, for cropped-and-recompressed images, since the blocking periodicity from the first compression may also contribute to the probability map, the peak energy now diverges also to diagonal peaks, as shown in Fig. 6 (c).

frequency area to analyse the variation in periodic peaks, because other peaks’ values are usually too large to dominate the following analysis. In this paper, we use the central 11x11 peaks and extract the power spectrum strength from only these peaks to construct a peak window. In an ideal case that withinblock pixels have probability of one and across-block pixels have probabilities of zero, the peak window should look like Fig. 5.

By measuring the peak energy distribution, we will next extract appropriate features to discriminate single compressed images from cropped-and-recompressed images. 2) Feature Extraction From the above discussion, we conclude that, for single compressed images 

Peak energy mostly concentrates on vertical and horizontal peaks, and



Peak energy along diagonal peaks is evenly distributed.

Next, we calculate the normalized peak energy from three non-overlapping regions R1, R2 and R3, as indicated in Fig. 7. Finally, we adopt the following six features for SVM classification:

Fig.5. The peak window of the ideal case, where each sub-grid indicates the peak value which is normalized to [0, 255].

Mean Ratio ( Fm,1 and Fm, 2 )

Fm,i 

Mean( Ri )    ,   i  1,2 Mean( R3 )

(6)

Variance Ratio ( Fv ,1 and Fv , 2 )

Fv ,i 

Var ( Ri )    ,   i  1,2 Var ( R3 )

(7)

Entropy ( Fe,1 and Fe, 2 )

Fe,i   

p ( x , y )Ri

p( x, y )  log

p ( x, y )   ,   i  1,2. (8) Mean( Ri )

R1 R2 R3

(a)

(b)

(c)

Fig.7. The three non-overlapping regions in peak window.

Fig.6. (a) The original test images; (b) the corresponding peak windows for images compressed with QF=80; (c) the peak windows for images first compressed with QF=60 and then cropped and recompressed with QF=80.

III. EXPERIMENTAL RESULTS AND DISCUSSION

Next, we use the examples in Fig. 6 to show the variations in peak windows for images under single compression and cropped-and-double-compression. In Fig. 6 (b), for single compressed images, since only the 8x8 blocking periodicity

In our experiments, we use 250 images captured using Nikon D80 with RAW format and 3872x2592 resolutions. We first compress these images with JPEG quality factor QF1 ,

4

[2] A.C. Popescu and H. Farid, “Exposing Digital Forgeries in Color Filter Array Interpolated Images,” IEEE Trans. on Signal Processing, vol. 53, no. 10, pp. 3948-3959, 2005. [3] A. Swaminathan, M.Wu, and K.J.R. Liu, “Non-intrusive Component Forensics of Visual Sensors Using Output Images,” IEEE Trans. on Info. Forensics and Security, vol. 2, no. 1, pp. 91-106, March 2007. [4] Y.F. Hsu and S.F. Chang, “Detecting Image Splicing Using Geometry Invariants and Camera Characteristics Consistency,” Proc. ICME, 2006 . [5] T.T. Ng, S.F. Chang and M.P. Tsui, “Using Geometry Invariants for Camera Response Function Estimation,” Proc. CVPR, 2007. [6] J. Lukas and J. Fridrich, “Digital Camera Identification From Sensor Pattern Noise”, IEEE Trans. on Info. Forensics and Security, vol. 1, no. 2, pp. 205-214, June 2006. [7] M.K. Johnson and H. Farid, “Exposing Digital Forgeries by Detecting Inconsistencies in Lighting”, ACM Multimedia and Security Workshop, New York, NY, 2005. [8] S. Lyu and H. Farid, “How Realistic is Photorealistic?”, IEEE Trans. on Signal Processing, vol. 53, no. 2, pp. 845-850, Feb. 2005. [9] J. Lukas and J. Fridrich, “Estimation of Primary Quantization Matrix in Double Compressed JPEG Images”, Digital Forensic Research Workshop, Cleveland, Ohio, Aug. 2003. [10] S. Ye, Q. Sun, and E.C. Chang, “Detecting Digital Image by Measuring Inconsistencies of Blocking Artifact”, Proc. ICME, pp. 1215, July 2007. [11] W. Luo, Z. Qu, J. Huang, and G. Qiu, “A Novel Method for Detecting Cropped and Recompressed Image Block,” Proc. ICASSP, vol.2, pp. 217-220, April 2007. [12] Z. Fan and R.L. de Queiroz, “Identification of Bitmap Compression History: JPEG Detection and Quantizer Estimation,” IEEE Trans. on Image Processing, vol. 12, no. 2, pp. 230-235, Feb. 2003.

crop into size of 720x480 without block-misalignment, and use this data set as our single compressed image set . To create the cropped-and-recompressed image set, we compress the original RAW images with quality factor QF 2 , followed by randomly cropping into size of 720x480 and recompression with quality factor QF1 . Figure 8 shows the three features ( Fm ,1 , Fv ,1 and Fe,1 ) measured from the 500 test images. As shown in Fig. 8, the two data sets indeed behave very differently in these features. We randomly select 400 images as training data to SVM, and use the other images for testing. Table 1 shows the experimental results and also the comparison with BACM [11] method. The detection results in Table 1 show that the performance of our proposed method indeed outperforms BACM in most cases. Nevertheless, detection of cropped-and-recompressed is feasible only when the original quality factor is smaller than the recompression quality factor. Otherwise, the former high quality compression information would be destroyed by recompression with lower quality factor. The cropping position also influences the detection accuracy. For example, if images are cropped along (0, x) or (x,0) with ( 0  x  7 ) before recompression, the previous blocking artifacts would become less obvious to be detected. We use an experiment in Fig. 9 to show that, the histogram of local pixel differences at position (7,7) originally behaves very different with other cases. However, as shown in Fig. 10 (b), if we crop images along (0,x) or (x,0), most primary blocking artifacts will be merged into the second blocking artifacts, including the pixel difference at position (7,7). Therefore, the trace of original compression become less obvious compared with Fig. 10 (a). After Fourier transform, the peak energy, instead of diverging to diagonal peaks, would still distribute along vertical or horizontal peaks and can no longer provide as a reliable features.

TABLE 1. DETECTION ACCURACY (%) OF SINGLE COMPRESSION(QUALITY FACTOR=QF1) AND DOUBLE COMPRESSION(QUALITY FACTOR=QF2, CROPPED-AND-RECOMPRESSED WITH QUALITY FACTOR QF1)

IV. CONCLUSION For JPEG compressed images, digital image tampering by cropping and recompression often results in different blocking artifacts. We propose to first estimate the blockiness for each pixel, model the linear dependency of the blockiness measure, and finally analyze the different peak energy distributions to discriminate single compressed images from tampered images. This method could also be applied to other periodic characteristic research. Our experimental results on blocking artifacts analysis show that the proposed method achieves satisfactory results to detect images being cropped and recompressed with high quality factors. REFERENCES [1] A.C. Popescu and H. Farid, “Exposing Digital Forgeries by Detecting Traces of Re-sampling”, IEEE Trans. on Signal Processing, vol. 53, no.2 ,pp 758-767, 2005.

5

QF1 QF2 50 Proposed BACM

70

75

80

85

90

95

80.8 78.4

84.4 83.6

89.2 90.4

94 93.6

97.2 95.4

99.2 95.2

60 Proposed BACM

72.6 73.6

84 79.4

83.4 86.4

93.6 92

96 93.8

99 95.2

70 Proposed BACM

66 68.8

80.2 73.4

80.2 78.8

90.7 89.8

96.6 95.2

99 95.4

80 Proposed BACM

69.6 72.2

81.6 73.8

77.4 79.6

86.7 91.8

95.8 94.4

99.4 95.4

90 Proposed BACM

65.9 65

75.7 70.2

78.3 76.6

88.7 86.8

97 94.6

98.8 95.8

(a) mean ratio Fig.9. The averaged histogram of local pixel differences at different spatial positions. (red: within-block pixels; blue: across-block pixels on horizontal block boundary; green: across-block pixels on vertical block boundary; black: across-block pixels at position (7,7) of each block)

primary block artifact secondary block artifact primary block artifact at position (7,7)

(a) (b) variance ratio

(b)

Fig.10. A cropped and recompressed 8x8 JPEG block with different cropping vector. (a) cropping vector = (5,3); (b) cropping vector = (5,0).

(c) entropy Fig.8. The three features (mean ratio, variance ratio and entropy) for the 500 test images, where the first 250 images are single compressed and the 251st to the 500th images are cropped-and-recompressed images.

6

Image Tampering Detection by Blocking Periodicity ...

lossy JPEG compression can be seen as an inherent signature for compressed images. ... methods have been proposed for digital image tampering detection.

3MB Sizes 0 Downloads 138 Views

Recommend Documents

Fire Detection Using Image Processing - IJRIT
These techniques can be used to reduce false alarms along with fire detection methods . ... Fire detection system sensors are used to detect occurrence of fire and to make ... A fire is an image can be described by using its color properties.

Fire Detection Using Image Processing - IJRIT
Keywords: Fire detection, Video processing, Edge detection, Color detection, Gray cycle pixel, Fire pixel spreading. 1. Introduction. Fire detection system sensors ...

Tampering with History.pdf
time we provide an adapted source, the. original is available so that students can. see exactly what we've changed. To those who would persist in their. objections, we recommend a brief trip to. a typical middle or high school in one of. our nation's

A Review on Change Detection Methods in Hyper spectral Image
Keywords: - Change detection, hyper spectral, image analysis, target detection, unsupervised ..... [2] CCRS, Canada Center for Remote Sensing, 2004.

Image processing based weed detection in lawn
Image processing based weed detection in lawn. Ukrit Watchareeruetai*,Yoshinori Takeuchi,Tetsuya Matsumoto,Hiroaki Kudo,Noboru Ohnishi. Department ...

A Review on Segmented Blur Image using Edge Detection
Image segmentation is an active topic of research for last many years. Edge detection is one of the most important applications for image segmentation.

MEX based Convolution For Image Gradient Filtering And Detection ...
MEX based Convolution For Image Gradient Filtering And Detection.pdf. MEX based Convolution For Image Gradient Filtering And Detection.pdf. Open. Extract.

Image Region Forgery Detection: A Deep Learning ...
region localization, most of the work targets only JPEG images due to the exploita- tion of double ... In the digital era, there are an enormous volume of forged images on social media plat- ... [10]. However, these techniques do not identify the tam

image change detection on urban area: the earthquake ...
a DISTART, University of Bologna, Viale Risorgimento, 2, 40136 Bologna, Italy - ... be used in loci to help post survey damage assessment and macroseismic evaluation, but in the ..... meaningful regions, to simulate the abstraction done by a.

Internal Audit Scope Functioning Periodicity and Methodology.pdf ...
Page 3 of 3. Internal Audit Scope Functioning Periodicity and Methodology.pdf. Internal Audit Scope Functioning Periodicity and Methodology.pdf. Open. Extract.

Internal Audit Scope Functioning Periodicity and Methodology.pdf ...
Page 3 of 3. Internal Audit Scope Functioning Periodicity and Methodology.pdf. Internal Audit Scope Functioning Periodicity and Methodology.pdf. Open. Extract.

iOS 9 Content Blocking Strategies.pdf
iOS 9 Content Blocking Strategies.pdf. iOS 9 Content Blocking Strategies.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying iOS 9 Content Blocking ...

US President Blocking Twitter Users.pdf
2 days ago - they stipulate to the underlying facts so that the legal issues presented by. this dispute could be addressed without the need to undertake a ...

Blocking Calls in Java - Semantic Scholar
Chapter 3. Blocking Calls. This chapter describes the main contribution of this ... since there is no way to return a meaningful value from a suspended method ...

Wishbone Blocking Scheme - Andrew Ward.pdf
Page 3 of 6. Whoops! There was a problem loading this page. Retrying... Wishbone Blocking Scheme - Andrew Ward.pdf. Wishbone Blocking Scheme - Andrew Ward.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Wishbone Blocking Scheme - Andrew

TRACKING FAILURE DETECTION BY IMITATING ...
School of Electrical Engineering and Computer Science, ASRI. Seoul National University, Seoul, .... the framework of online GMM method [7]. 1X(1), ..., X(t)l is a ...

Anti-Forensic Techniques, Detection and Countermeasures by ...
1.1 Outline of this paper. Section 2 of this paper discusses traditional AF techniques such as overwriting, cryptography and. steganography. Section 3 discusses AF techniques that work .... 79. Page 3 of 8. Main menu. Displaying Anti-Forensic Techniq

Blocking Calls in Java - Semantic Scholar
FACULTY OF MATHEMATICS AND COMPUTER SCIENCE. Institute of Computer Science. Rein Raudjärv. Blocking Calls in Java. Bachelor thesis (4 AP).

Truly Non-blocking Writes
accessed by a machine instruction (e.g., LOAD or STORE) causing a page fault, or (2) a system call accesses the ... Researchers have already begun designing hybrid memory systems and flash-based virtual memory .... though these implementations are hi

Efficient Spectral Neighborhood Blocking for ... - Computer Science
spectral clustering, based on different ways of normalization. We use the above ...... european language text retrieval,” Information Retrieval, vol. 7, no. 1, pp.

Salient Object Detection by Composition
mining an appropriate context in advance is difficult and incorrect .... ground. In [25], low spatial variance of a feature is con- ..... data using bidirectional similarity.