LamTangYu

From Psych 221 Image Systems Engineering
Revision as of 21:32, 18 March 2013 by imported>Projects221 (Gradient Based)
Jump to navigation Jump to search

Back to Psych 221 Projects 2013



Introduction

The purpose of the camera forensics project is to automatically detect whether an image, that was produced by CFA interpolation, was tampered with. CFA interpolation is used by digital camera to generate digital images. The interpolation will result in specific statistical patterns in the pixels of an image, which and then be utilized to determined whether or not an image has been altered.

Background

What is CFA Interpolation?

When digital cameras capture images, it saves the output of a single sensor after passing through a color filter array (CFA). Every single pixel of a color image is composed of three color channels, red, green, and blue. However, the camera is only able to sample a single color channel per pixel, so to fully form a colored image, the values of the other two colors will have to be estimated. Various interpolation techniques are used to estimate the missing samples.

Different Types of CFA Interpolation Techniques

Figure 1. The Bayer Array

A common CFA is the Bayer Array. Colors are sampled according to the pattern in Fig. 1. As shown, the green color channel is sampled at twice the rate of the red and blue channels. All of the interpolation methods below assume that the image was captured through a Bayer Array.
Let R~(x,y), G~(x,y), and B~(x,y) represent the CFA sampled versions of the three color channels.

Bilinear/Bicubic

Bilinear and bicubic are the simplest interpolation algorithms. Each color channel is interpolated independently by using a 2D linear filter h(x,y) on R~(x,y), G~(x,y), and B~(x,y).
R(x,y)=R~(x,y) for x,y such that R~(x,y)0. Otherwise, R(x,y)=h*R~(x,y). The same is done for the green and blue channels. For bilinear interpolation, a 3 by 3 filter is used and for bicubic interpolation, a 7 by 7 filter is used.

Smooth Hue Transition

One downfall of bilinear/bicubic interpolation is that neighboring pixels may differ significantly in value, which is unlikely in natural images.
Since there are twice as many green samples as red and blue, the missing samples in the green color channel are first bilinearly interpolated as described above. After interpolating the green channel, the red and blue channels can be estimated by bilinearly interpolating the ratio R~(x,y)/G(x,y) and B~(x,y)/G(x,y) respectively.

Median Filter

R~(x,y), G~(x,y), and B~(x,y) are first interpolated. Then Mrg(x,y), Mrb(x,y), and Mgb(x,y) are computed by taking pairwise differences of the interpolated color channels and filtering with a median filter.
At each pixel, only one color channel was originally sampled. To obtain the estimates for the other two channels, we look at the sum or difference between the original color sample and the corresponding median filtered point. For example, if at pixel (x,y), the green channel was sampled with a value of gx,y. Then we can estimate the red channel by R(x,y)=gx,y+Mrg(x,y) and the blue channel by B(x,y)=gx,yMgb(x,y). The missing values are estimated similarly for pixels where the red or blue channel was sampled.

Gradient Based

This method attempts to preserve edges by preventing interpolation across edges. First, the horizontal and vertical derivates estimates for each pixel is computed and used in conjunction with the green color channel samples to estimate G(x,y) by adaptively interpolating.

Adaptive Color Plane

Threshold-Based Variable Number of Gradients

Methods

EM Algorithm

E-Step

M-Step

Probability Map and Its Fourier Transform

Thresholding for Determining Fake Images

Results

Data Set

Error Rates

Conclusions

References - Resources and related work

References

Software

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

zip file with my data

Appendix II - Work partition (if a group project)

Brian and Bob gave the lectures. Jon mucked around on the wiki.