Hsu: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
imported>Projects221
Line 61: Line 61:
Ideally, a minimum threshold for the measure of similarity can be determined to automatically detect tampered regions.  Windows that have a measure of similarity below a certain threshold would be considered tampered images.  Unfortunately, the threshold was difficult to determine due to:
Ideally, a minimum threshold for the measure of similarity can be determined to automatically detect tampered regions.  Windows that have a measure of similarity below a certain threshold would be considered tampered images.  Unfortunately, the threshold was difficult to determine due to:


1. Variation in frequency content between windows
<ol>
2. Variation in frequency content between images
<li>Variation in frequency content between windows</li>
3. Low frequency content of uniform color patches in images
<li>Variation in frequency content between images</li>
<li>Low frequency content of uniform color patches in images</li>
</ol>
 
The results section will discuss alternatives to detection based on frequency spectrum.


= Results =
= Results =

Revision as of 08:59, 20 March 2013

Back to Psych 221 Projects 2013




Introduction

Background

-CFA Interpolation and why necessary -Effect of tampering on CFA interpolation

Methods

The expectation-maximization algorithm calculated an estimation of the linear model used to interpolate the Bayer array and generated the per-pixel probability that each sample pixel belonged to the calculated linear interpolation filter (need a reference). The probability map was then analyzed for periodic frequencies to determine whether or not the image had been tampered.

Expectation-Maximization Algorithm

Expectation

The expectation step of the algorithm estimates the per-pixel probability that the pixel belongs to the estimated linear model, α. Each color channel is described as

f(x,y)=u,v=NNαu,vf(x+u,y+v)+n(x,y)

where n(x,y)=f(x,y)u,v=NNαu,vf(x+u,y+v) is the residual error between the actual image and the estimated image. The residual error is approximated using a Gaussian function with zero mean and α standard deviation. The probability that each pixel is taken from the estimated linear model is calculated using the probability distribution function of the residual errors:

P(x,y)=1σ2πexp[12σ2(f(x,y)u,v=NNαu,vf(x+u,y+v))2]

Using this probability, the per-pixel probability that the image is estimated by the proposed α is calculated using Bayes' rule. In these calculations, only the proposed linear model and an unspecified non-linear model were considered as possibilities. The non-linear model M_{2} was estimated to be one over 255;

Pr{𝑓(𝑥,𝑦)M1𝑓(𝑥,𝑦)}=Pr{𝑓(𝑥,𝑦)𝑓(𝑥,𝑦)M1}Pr{𝑓(𝑥,𝑦)M1}i=12Pr{𝑓(𝑥,𝑦)𝑓(𝑥,𝑦)Mi}Pr{𝑓(𝑥,𝑦)Mi}

Maximization

The maximization step of the algorithm computes a revised α based on minimization of the residual error. The error function that is minimized is:

equation here

A 3 x 3 linear

Tamper Detection

Measure of Similarity

Tamper detection was implemented by calculating the cosine similarity between an ideal probability map and the estimated probability map. The similarity function is given by:

M(p,s)=wx,wyP×S

where P} is the Fourier transform of the calculated probability map and S is the Fourier transform of the ideal probability map for each channel. The similarity between the ideal and calculated probability maps determines whether or not the image has been modified; high similarity indicates that the given CFA interpolation of the image can be approximated using a linear array since the frequency content of the probability map will be close to ideal. In contrast, tampering changes the frequency content of the probability map and the frequencies between the ideal and real case will result in a lower similarity measure.

Show FFTs of ideal maps

Windowing

Given that the tampered areas in the training images were small areas of the main image, a sliding window was used to calculate the measure of similarity for segmented blocks of the image. This prevented the slight spatial frequency differences in the probability map caused by tampering to be overshadowed by the regular frequency in the non-tampered parts of the image. The windows with the smallest measure of similarity are identified as tampered regions.

Threshold

Ideally, a minimum threshold for the measure of similarity can be determined to automatically detect tampered regions. Windows that have a measure of similarity below a certain threshold would be considered tampered images. Unfortunately, the threshold was difficult to determine due to:

  1. Variation in frequency content between windows
  2. Variation in frequency content between images
  3. Low frequency content of uniform color patches in images

The results section will discuss alternatives to detection based on frequency spectrum.

Results

Conclusions

- Buggy areas: places with large areas of pixels with the same pixel so that the probability map shows the same value for a large swath - Automation: normalization between different images - Use information about the CFA to determine tampering (i.e. threshold adjustment done based on CFA interpolation technique - Classification using frequency information between channels instead of processing them differently Could give better estimate in the case of CFA interpolators across multiple channels or get better estimate of frequency across different channels


References - Resources and related work

References

Software

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

zip file with my data