LiuVenkatesanYang: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
imported>Projects221
Line 55: Line 55:
====Bilinear and Bicubic====
====Bilinear and Bicubic====
A simplest method of interpolation act on each channel independently. This method can be implemented as a linear filtering operation on each color channel independently.
A simplest method of interpolation act on each channel independently. This method can be implemented as a linear filtering operation on each color channel independently.
<br>
 
Let S(x,y) denote the CFA image in the following matrix
 
<math>
<math>
R(x,y) = \sum hr(u, v)R1(x-u, y-v)</math>
\begin{bmatrix}
  <br>
r_{1,1} &  g_{1,2} & r_{1,3}  &  .. \\
<math>
g_{2,1}  & b_{2,2}  & r_{2,3}  & .. \\
  <br>G(x,y) = \sum hr(u, v)G1(x-u, y-v)</math>
r_{3,1}  &  r_{3,2}  &  r_{3,3} & ..\\
  <br>
..  & ..  &  .. & ..
<math>
\end{bmatrix} </math>
  <br>B(x,y) = \sum hr(u, v)B1(x-u, y-v)</math>
<math> R1(x,y) =
\left\{\begin{matrix}
S(x,y) & if(S(x,y)=r_{x,y} \\
0 & otherwise
\end{matrix}\right</math>
 
<math> G1(x,y) =
\left\{\begin{matrix}
S(x,y) & if(S(x,y)=g_{x,y} \\
0 & otherwise
\end{matrix}\right</math>
   
<math> B1(x,y) =
\left\{\begin{matrix}
S(x,y) & if(S(x,y)=b_{x,y} \\
0 & otherwise
\end{matrix}\right</math>
  <br><math>R(x,y) = \sum hr(u, v)R1(x-u, y-v)</math>
  <math>G(x,y) = \sum hr(u, v)G1(x-u, y-v)</math>
  <math> B(x,y) = \sum hr(u, v)B1(x-u, y-v)</math>


=== Detection using Expectation/Maximization algorithm ===
=== Detection using Expectation/Maximization algorithm ===

Revision as of 03:31, 16 March 2013

Back to Psych 221 Projects 2013



Background

Since digital images have become ubiquitous in the internet, the image based forgeries have become widespread as well. From the ultra slim model flashing in the cover of a fashion magazines to the manipulated images submitted to the Journal of cell biology, image based forgeries have become very common these days. The U.S Office of Research Integrity reported that there were less than 2.5% of accusations of fraud involving disputed images in 1990. The percentage rose to 26% in 2001 and by 2006, it went up to 44.1% [1]. Image Forgeries are frequently seen in forensic evidence, tabloid magazines, research journals, political campaigns, media outlets and funny hoax images sent in spam emails which leaves no doubts for the viewer as they appear to be visually acceptable without any signs of tampering. This necessitates a good method to detect these kind of forgeries. There are two main interests in Digital Camera Image Forensics. One is source identification and the second is forgery detection. Source identification delas with identifying the source camera with which an image is taken while camera forensics deals with detecting tampering in an image by assessing the underlying statistics of the image.


Few examples of Forged images available on the internet


Figure 1 Figure 2


Introduction

In this class project, we have concentrated on Forgery detection by detecting changes in the underlying statistics of the image. Many digital cameras use color filter arrays in conjunction with a single sensor to record the short, medium and long wavelength information in different pixels of an image. The color information in each individual pixel is obtained by interpolating these color samples using a technique called demosaicing. This interpolation introduces specific correlations which are likely to be destroyed when the image is tampered. The goal of our project is to build a classifier in MATLAB that can take an input image and identify the parts of the image that do not exhibit the expected CFA correlations. We will use the correlation techniques described in [2] to identify parts of the image that are being tampered with.

Methods

Detecting Forgeries using CFA interpolation

We have used a method that detects tampering in images using the correlation in image pixels left by the CFA interpolation algorithm used. [#References - Resources and related work|2] This technique work on the assumption that although digital forgeries may leave no visual clues of having been tampered with, they may, nevertheless, alter the underlying statistics of an image. Most digital cameras, for example, capture color images using a single sensor in conjunction with an array of color filters. As a result, only one third of the samples in a color image are captured by the camera, the other two thirds being interpolated. This interpolation introduces specific correlations between the samples of a color image. When creating a digital forgery these correlations may be destroyed or altered. We describe the form of these correlations, and propose a method that quantities and detects them in any portion of an image 2. We show the general effectiveness of this technique in detecting traces of digital tampering, and analyze its sensitivity and robustness to simple image distortions (compression, noise, and gamma correction).

CFA - Bayer Array

The Bayer arrangement of color filters on the pixel array of an image sensor

In photography, a color filter array (CFA), or color filter mosaic (CFM), is a mosaic of tiny color filters placed over the pixel sensors of an image sensor to capture color information. Color filters are needed because the typical photosensors detect light intensity with little or no wavelength specificity, and therefore cannot separate color information. The color filters filter the light by wavelength range, such that the separate filtered intensities include information about the color of light. For example, the Bayer filter (shown to the right) gives information about the intensity of light in red, green, and blue (RGB) wavelength regions. The raw image data captured by the image sensor is then converted to a full-color image (with intensities of all three primary colors represented at each pixel) by a demosaicing algorithm which is tailored for each type of color filter. A Bayer filter mosaic is a color filter array (CFA) for arranging RGB color filters on a square grid of photosensors. Its particular arrangement of color filters is used in most single-chip digital image sensors used in digital cameras, camcorders, and scanners to create a color image.

Interpolation Algorithms

A demosaicing (also de-mosaicing or demosaicking) algorithm is a digital image process used to reconstruct a full color image from the incomplete color samples output from an image sensor overlaid with a color filter array (CFA). It is also known as CFA interpolation or color reconstruction. A wide range of interpolation algorithms exist in the image processing industry and different digital camera implement different interpolation techniques. The following demosaicing techniques for the Bayer array are mentioned in the paper and has been used for the studies.[1].


i) Bilinear and Bicubic
ii) Smooth Hue Transition
iii) Median Filter
iv) Gradient-Based
v) Adaptive Color Plane
vi)Threshold based variable number of Gradients

To illustrate the Expectation and Maximization algorithm, we will review the most commonly used interpolation technique "Bilinear and Bicubic".

Bilinear and Bicubic

A simplest method of interpolation act on each channel independently. This method can be implemented as a linear filtering operation on each color channel independently.

Let S(x,y) denote the CFA image in the following matrix

[r1,1g1,2r1,3..g2,1b2,2r2,3..r3,1r3,2r3,3..........]

Failed to parse (syntax error): {\displaystyle  R1(x,y) = \left\{\begin{matrix} S(x,y) & if(S(x,y)=r_{x,y} \\  0 & otherwise \end{matrix}\right}

Failed to parse (syntax error): {\displaystyle G1(x,y) = \left\{\begin{matrix} S(x,y) & if(S(x,y)=g_{x,y} \\ 0 & otherwise \end{matrix}\right}

Failed to parse (syntax error): {\displaystyle B1(x,y) = \left\{\begin{matrix} S(x,y) & if(S(x,y)=b_{x,y} \\ 0 & otherwise \end{matrix}\right}



R(x,y)=hr(u,v)R1(xu,yv) G(x,y)=hr(u,v)G1(xu,yv) B(x,y)=hr(u,v)B1(xu,yv)

Detection using Expectation/Maximization algorithm

Results

Results from uncompressed images

Some text. Some analysis. Some figures.

Results from compressed images with different quality factors

Some text. Some analysis. Some figures.

Sensitivity and Robustness Measure

Some text. Some analysis. Some figures. Maybe some equations.


Equations

If you want to use equations, you can use the same formats that are use on wikipedia.
See wikimedia help on formulas for help.
This example of equation use is copied and pasted from wikipedia's article on the DFT.

The sequence of N complex numbers x0, ..., xN−1 is transformed into the sequence of N complex numbers X0, ..., XN−1 by the DFT according to the formula:

Xk=n=0N1xne2πiNknk=0,,N1

where i is the imaginary unit and e2πiN is a primitive N'th root of unity. (This expression can also be written in terms of a DFT matrix; when scaled appropriately it becomes a unitary matrix and the Xk can thus be viewed as coefficients of x in an orthonormal basis.)

The transform is sometimes denoted by the symbol , as in 𝐗={𝐱} or (𝐱) or 𝐱.

The inverse discrete Fourier transform (IDFT) is given by

xn=1Nk=0N1Xke2πiNknn=0,,N1.

Retinotopic models in group-averaged data projected back into native space

Some text. Some analysis. Some figures.


Conclusions

References - Resources and related work

References

1. Farid, Hany. "Image forgery detection." Signal Processing Magazine, IEEE26.2 (2009): 16-25.

2. Popescu, Alin C., and Hany Farid. "Exposing digital forgeries in color filter array interpolated images." Signal Processing, IEEE Transactions on 53.10 (2005): 3948-3959.

Software

1. MATLAB

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

zip file with my data

Appendix II - Work partition (if a group project)