View Single Post
  #4 (permalink)
Old 13th June 2008, 04:47 PM
xheavenlyx
CE - Editor
 
xheavenlyx's Avatar
 
Join Date: 2nd October 2006
Location: Dubai, UAE
I'm a Crazy Electronics Hacker & Engineer
Posts: 572
Default Re: Image Tamper Detection

wow, ok, nice one

Well, I cannot answer this really soon, but I have worked with Matlabs Image Toolbox. So we can try some ideas here...lets see...

There are several considerations here:

1. It is NEARLY impossible (not 100% impossible i guess) to find out if an image is tampered with just by looking at the physical structure (Analyzing pixels). this is because present day photo editors are very very good!!

2. One way is to look at the raw file header. Because if the image is taken by a commercial camera then the file itself .jpeg or .raw or anything will have information inside the file which a user cannot normally access. This place also has information on DATE, TIME last modified and also CAMERAMODES. So this is a good place to look if its been edited after been taken.

3. I know for sure, after editing a picture with Photoshop, the file header will contain a signature from Photoshop, and a date (i think). So you can also know it from there if it has been edited.

Now as for MATLAB analyzing the actual pixels...

I dont think you can know...cuz how can I know if a newly opened box contained 4 appels or someone opened it and removed 5...or if it was opened at all, or even if I know someone opened it, how much they have taken? Again, this is one argument:

However(!), in some types it can be possible. For example, you have a security camera which takes only one picture of a place which has constant color lighting. If this is the case then we can use MATLAB to analyze a portion of the image and calculate pixel changes. This heavily depends on your image and color scheme used. since some color schemes are difficult to modify and replicate. So you can know which part of the image has the highest variation of changes!

Here are some operations (some ways, you can make your own too) that can be performed on an image:

Morphological Operations:
These are Image Processing operations done on binary images based on certain morphologies or shapes. The value of each pixel in the output is based on the corresponding input pixel and its neighbors. By choosing appropriately shaped neighbors one can construct an operation that is sensitive to a certain shape in the input image.

a) Bridge - bridges unconnected pixels.
b) Clean - removes isolated pixels.
c) Fill - fills isolated interior pixels.
d) Majority - sets a pixel 1 if five or more pixels in 3x3 neighborhood are 1’s.
e) Remove - removes interior pixels by setting pixels to zero if its 4 neighbors are 1, thus leaving only boundary pixels on.
f) Shrink - shrinks object to a point.
g) Diagonal Fill - fills diagonal elements to eliminate 8 connectivity with background.
h) Skeletonize - It creates skeleton of an object, by removing pixels on the boundaries but does not allow objects to break apart.
i) Dilation - if any pixel in the input pixel’s neighborhood is on, the output pixel is set otherwise cleared. It removes the small holes in the object.
j) Erosion - if every pixel in the input pixel’s neighborhood is on, the output pixel is set otherwise cleared. It results in shrinking the object’s area, thus small isolated regions disappear.





If you are really unsure, give me an original image and a modified, I will try writing a MATLAB algo for it..
xheavenlyx is offline   Reply With Quote