forensic estimation of gamma correction in digital images

Report 2 Downloads 51 Views
Proceedings of 2010 IEEE 17th International Conference on Image Processing

September 26-29, 2010, Hong Kong

FORENSIC ESTIMATION OF GAMMA CORRECTION IN DIGITAL IMAGES Gang Cao, Yao Zhao, Rongrong Ni Institute of Information Science, Beijing Jiaotong University [email protected], {yzhao, rrni}@bjtu.edu.cn ABSTRACT In the digital era, digital photographs become pervasive and are frequently used to record event facts. Authenticity and integrity of such photos can be ascertained by discovering more information about the previously applied operations. In this paper, we propose a forensic scheme for identifying and reconstructing gamma correction operations in digital images. Statistical abnormity on image grayscale histograms, which is caused by the contrast enhancement, is analyzed theoretically and measured effectively. Graylevel mapping functions involved in gamma correction can be estimated blindly. Experiments both on globally and locally applied corrected images show the validity of our proposed gamma estimation algorithm. Index Terms — Image forensics, forensic estimation, gamma correction, contrast enhancement 1. INTRODUCTION Along with the rapid development of digital imaging and processing techniques, plenty of powerful media editing softwares emerge and make sophisticated image forgeries created easily and frequently. As a result, human’s trust on the integrity and authenticity of digital images could no longer be ensured. There is a potentially increasing need for developing techniques to investigate image manipulations blindly. Digital image forensics is just such a technique. Generally, image manipulations could be classified into the content-changing and content-preserving manipulations. Accordingly, prior works on image manipulation forensics fall into two categories. As the first category, the forensics methods focus on detecting image tampering such as copymove [1] and splicing [2], by which the image content is reshaped arbitrarily according to semantic content. In the other category, common manipulations, as compression [3], blur [4] and contrast enhancement [5~7, 10] are detected passively. These content-preserving manipulations are often applied as postprocessing to conceal the residual trail of malicious tampering operations and create realistic forgeries. Detection of common image operations can certainly throw in doubt both originality and integrity of digital images. Gamma correction, the widely used contrast enhancement operation, is just a sort of content-preserving manipulation.

978-1-4244-7993-1/10/$26.00 ©2010 IEEE

2097

Blind detection of the contrast enhancement including gamma correction is of the second category techniques. In ref. [5, 6], blind forensic algorithms have been proposed to detect the globally and locally applied contrast enhancement manipulations in digital images. However, such detection algorithms fail to estimate the graylevel mapping function including gamma mapping. As for application, the mapping estimation is significant in image inverse engineering and refined forensics, because more information known about manipulation can help to investigate the image’s life history. In the simultaneous work [7], an iterative algorithm is designed to estimate any contrast enhancement mapping as well as the pixel value histogram of the unenhanced image. Although this algorithm is highly effective for mapping reconstruction, its computational complexity might not be low enough because a large number of repeated iterations are employed. In ref. [8], in the case of preknowing gamma correction has been applied, the gamma amount is estimated by minimizing the higher-order correlations in frequency domain via bispectral analysis. Different from such existing solutions, in this paper, a cost-effective estimation scheme is proposed to reconstruct the gamma mapping via fast recognition of the peak-gap fingerprinting in graylevel histograms. In such a scheme, we address formulating and measuring the unique characteristic of the peak-gap distribution, which is just caused by gamma correction. Histogram peak-gap fingerprint patterns and the methodology of pattern matching are employed to achieve fast gamma estimation. The influence of image quality and image size on the gamma estimation is considered in detail. The rest of this paper is organized as follows. In Section 2, we formulate and analyze the histogram peak-gap artifact which is caused by gamma correction operations, followed by the presentation of gamma mapping estimation algorithm in Section 3. Performance evaluation results are reported in Section 4. Finally conclusions are drawn in Section 5. 2. ANALYSIS OF PEAK-GAP FINGERPRINT In this section, we will analyze the statistical fingerprints unique to contrast enhancement manipulations. Particularly, we focus on gamma correction in this paper, which is one of the most popular operations used to adjust the contrast of a digital image. Generally, gamma correction could often be formulated by a simple point-wise operation as follows [8],

ICIP 2010

5000 4000

unaltered image

3000 2000 1000

0 0

50

100

150

200

250

150

200

250

5000

peak

4000

gap ˜˜˜

˜˜˜

3000

J  1.2 2000 1000

0 0

50

100

Fig.1 Left: original image and its gamma correction version. Right: corresponding histogram of each image. J § § u · G (u ) round ¨ 2l  1) x ] means rounding x to the nearest integer. In this work, l = 8 is considered illustratively. The Lena image and its two gamma correction versions are shown in Fig. 1. We could find that the gamma mapping keeps locally linear only when the one-order derivative value takes one. In this scenario, no expansion or compression occurs. Those points, denoted by (u1 , G(u1 )) , at which the gamma curve has slope of one can be located as follows, l

PJ

{(u1 , G (u1 )) 

d (G (u1 )) du1

` .

(2)

1 § {(u1 , G (u1 )) u1  round ¨ G (u p ),G (u g )] . J

J

(6)

Distribution of the discrete peak-gap feature patterns for gamma mapping is shown in Fig. 3, where J  [0.1,3] with a sampling step 0.001 are considered. For an image to be investigated, the general peak-gap characteristic which is unique to gamma mapping should be identified firstly. Actually, there also exist other types of contrast enhancement operations which can generate the similar peak-gap phenomenon, such as ‘S’ mapping and histogram equalization. However, we can easily distinguish them by capturing the accumulating effect of peak-gap’s distribution. For ‘S’ mapping, all peaks or all gaps must appear at the histogram’s two ends simultaneously while the others fall into the middle range. Histogram equalization can be identified by thresholding the distance between an image’s histogram and a uniform distribution in frequency domain [5]. It should be pointed out that the feature pattern designed in Eq. (6) has the risk of being fooled. But the feature pattern is effective and reliable if only the applied gamma correction has been identified or made known. Once the gamma correction is detected, the middle peakgap pair of the histogram can be located by thresholding method. Location of such a peak-gap pair is denoted by f  >u Tp ,u Tg ] .

(7)

2099

Both unaltered and gamma corrected images are prepared for evaluating our proposed mapping estimation algorithm. The unaltered image set consists of 1338 uncompressed TIFF color images (with size of 384x512 or 512x384) from the popular image dataset UCID [9]. These images cover on many topics including natural scenes and man-made objects. The images are converted to YCbCr format and only the Y channel image is used for test. In the following experiments, gamma correction defined in the Eq. (1) is used to generate enhanced image samples. Gamma is limited in [0.3, 2.5] and sampled in increments of 0.1. Estimation precision for the globally applied gamma correction on images of different quality is shown in Fig. 4. Herein, the precision refers to the ratio of the batch image samples on which the estimated gamma values are equal or sufficiently close to the actual gamma values. Those with errors lower than 0.02 are regarded as precise estimation. We can see from Fig. 4 that the number of estimable images relates to the image quality. The more heavily an image has been compressed, the harder the gamma estimation becomes. However, even for the moderate JPEG (Q=70) images, the precision higher than 0.90 can still be gained except the cases J [0.9, a @ . Correspondingly, the distribution of practical estimation errors from those gamma-preciselyestimated samples is shown in Fig. 5. The error falls into the

1

1 0.9

0.8

precision

precision

0.8 0.7 0.6 0.5

TIFF ( lossless ) JPEG ( Q = 90 ) JPEG ( Q = 70 ) JPEG ( Q = 50 )

0.4 0.3

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

2.2

0.4

0.2

0

2.4

J Fig.4 Estimation precision for globally applied gamma correction.

Size = 300 x 300 Size = 200 x 200 Size = 100 x 100 0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

2.2

2.4

J Fig.6 Estimation precision for locally applied gamma correction.

the peak-gap feature pattern extracted from test images to those precomputed ones. Validity of the designed forensic estimation scheme has been verified by experiments on both globally and locally contrast enhanced images.

0.02

0.015 0.01

0.005

J  J

0.6

6. ACKNOWLEDGEMENT

0

This paper is supported in part by National 973 program (No. 2006CB303104), National Natural Science Foundation of China (No. 60702013, No. 60776794), Beijing Natural Science Foundation (No. 4073038).

-0.005 -0.01

-0.015

0.4

0.6

0.8

1

1.2

J

1.4

1.6

1.8

2

2.2

2.4

7. REFERENCES

Fig.5 Error between the estimated and actual gamma value, stat. from samples on which J is estimated precisely.

range of [-0.01, 0.018], which demonstrates the accuracy of our proposed gamma estimation algorithm once the image is detected to be gamma corrected. The estimation precision for the locally applied gamma correction on original TIFF images is plotted in Fig. 6. Here different size (300 u 300, 200 u 200, 100 u 100 respectively) of central region in each original image is treated as test samples. The test results indicate that estimation precision degrades along with the decrease of local region size. Such an exhibition can attribute to the absence of smoothness for original images’ local histograms. In this case, estimation error statistic is the same as that shown in Fig. 5. It should be noted that the proposed gamma estimation algorithm is not robust against even weak noise disturbance. Such deficiency might be inherent for the histogram-based forensics methods [10].

5. CONCLUSION In this paper, we propose an effective forensic estimation algorithm to identify the gamma correction operation, which is usually applied in inverse image engineering and forgery creation. Histogram characteristics of a gamma corrected image is analyzed and measured by peak-gap feature pattern. The amount of gamma correction is estimated by matching

2100

[1] S. Bayram, H. T. Sencar and N. Memon, “An Efficient and Robust Method for Detecting Copy-move Forgery,” in Intl. Conf. on Acoustics, Speech and Signal Processing, Taipei, 2009. [2] Y.-F. Hsu and S.-F. Chang, “Image Splicing Detection Using Camera Response Function Consistency and Automatic Segmentation,” in Intl. Conf. on Multimedia and Expo, Beijing, 2007. [3] Z. Fan and R. L. Queiroz, “Identification of Bitmap Compression History: JPEG Detection and Quantizer Estimation,” IEEE Trans. on Image Processing, vol. 12, no. 2, pp. 230–235, 2003. [4] D. Hsiao and S. Pei, “Detecting Digital Tampering by Blur Estimation,” 1st Intl. Workshop on Systematic Approaches to Digital Forensic Engineering, Washington, 2005. [5] M. Stamm and K. J. R. Liu, “Blind Forensics of Contrast Enhancement in Digital Images,” in Intl. Conf. on Image Processing, San Diego, 2008. [6] M. Stamm and K. J. R. Liu, “Forensic Detection of Image Tampering Using Intrinsic Statistical Fingerprints in Histograms,” in Proc. APSIPA Annual Summit and Conference, Sapporo, 2009. [7] M. Stamm and K. J. R. Liu, “Forensic Estimation and Reconstruction of a Contrast Enhancement Mapping,” in Intl. Conf. on Acoustics, Speech and Signal Processing, Texas, 2010. [8] H. Farid, “Blind Inverse Gamma Correction,” IEEE Trans. on Image Processing, vol. 10, no. 10, pp. 1428-1433, 2001. [9] G. Schaefer and M. Stich, “UCID - An Uncompressed Colour Image Database,” in Proc. SPIE, Storage and Retrieval Methods and Applications for Multimedia, San Jose, 2004. [10] Gang Cao, Yao Zhao and Rongrong Ni, “Anti-Forensics of Contrast Enhancement in Digital Images”, ACM Multimedia and Security Workshop, Roma, 2010.