"Enhance 15 to 23. Give me a hard copy right there."
April 5, 2010 2:40 AM   Subscribe

Image Error Level Analyser

Digital photography and associated software tools have made it trivially easy to manipulate the images and media messages that we consume on a daily basis (previously and more recently).

While some individuals have adopted more unique approaches to getting to the truth behind a photo, the JPEG image format's inherent "lossiness" — like a photocopy, the fidelity or quality of the original is reduced on subsequent re-saves — opens up the opportunity to learn if and how an image has been doctored.

Dr. Neal Krawetz's error level analysis (PDF) technique describes resaving a JPEG image and using principal component analysis to measure the difference between original and resaved images, highlighting "hot" areas that suggest manipulation.
posted by Blazecock Pileon (30 comments total) 18 users marked this as a favorite

 
Didn't we have a thread here awhile back where people talked about how error analysis doesn't really reveal what Krawetz claims it does?
posted by Pope Guilty at 2:45 AM on April 5, 2010 [1 favorite]


I searched for it. Couldn't find anything. Do you have a link?

If so, I'll flag this for deletion.
posted by Blazecock Pileon at 2:46 AM on April 5, 2010


It looks like there is this link, which appears to be more complaints about the informal nature of his analysis and its technical limitations, which I think are also mentioned in the paper and main link.
posted by Blazecock Pileon at 2:54 AM on April 5, 2010 [1 favorite]


I'm going to have to say it's pretty unreliable. I just analyzed two images of the same subject, one which I know I heavily, heavily manipulated, and another I simply cropped, and they came back with roughly the same analysis.
posted by maxwelton at 3:32 AM on April 5, 2010 [1 favorite]


Back to the drawing board.
posted by pracowity at 4:00 AM on April 5, 2010


It appears ordinary acceptable tools like light level manipulation are totally washing out really dramatic body alterations, color me unimpressed.
posted by jeffburdges at 4:13 AM on April 5, 2010


Metafilter is on the case.
posted by Evilspork at 4:48 AM on April 5, 2010


Yeah. It doesn't work unless the image hasn't been:

1) Manipulated in a loss less format, then saved
2) resized, or
3) cropped.

So this might work on your average fark photoshop from '99, where the source image frequently is already a highly compressed JPG, not resized or cropped, and just has something plopped down on top of it.

Also, look at the example ELA on the page. The crack in the wall shows up as "hot". Do you really think the crack was photoshopped? I think there's a good chance that photographs where some parts will "compress well" will be less likely to change on re-saving, while other parts will not.

I actually tried it on some pictures I know have not been photoshoped, and I still got basically all the borders showing up as bright lines in the ELA.

I also tried it on a photo that I did NOT photoshop, and the parts that I had smoothed out didn't show up as 'hot' in the ELA, but tons of other stuff, basically every border where one color blended into another showed up, lots of noise, etc.

---

Like I said in the other thread. This only works on a small class of poorly done amateur photoshops, it won't catch anything that's been done by a professional or even a skilled amateur working with larger source images. It also won't catch anything by anyone who crops their image, just re sizes it a little, etc.
posted by delmoi at 5:07 AM on April 5, 2010


Oh, yeah. MetaFilter is on the case. Ha.

MetaFilter sometimes gets a bit big for its collective britches. That ELA thread is a choice example of people overstepping their expertise and understanding.

If you take two JPG images which are saved a different number of times, copy-paste something from one of those images, and then blend it into another, ELA will show it.

Here is an example source image taken from Reddit.com.

Here is the Error Level Analysis output, which clearly shows the editing.

This is a perfectly valid technique, if you know how to use it. The failure you see in the original thread is because Krawetz' post was written in a way that was inflammatory. He overstepped what seem to be the bounds of his own technique.

For more forensic imaging information check out my previous comment.
posted by fake at 5:17 AM on April 5, 2010 [4 favorites]


I actually tried it on some pictures I know have not been photoshoped, and I still got basically all the borders showing up as bright lines in the ELA.

I also tried it on a photo that I did NOT photoshop, and the parts that I had smoothed out didn't show up as 'hot' in the ELA, but tons of other stuff, basically every border where one color blended into another showed up, lots of noise, etc.


Care to link those images?
posted by fake at 5:19 AM on April 5, 2010


An algorithm that can tell by the pixels?

sorry
posted by mccarty.tim at 5:48 AM on April 5, 2010 [4 favorites]


Whelp, this one looks just fine. She really exists! Source: Digg.
posted by mccarty.tim at 5:54 AM on April 5, 2010 [1 favorite]


If you take two JPG images which are saved a different number of times, copy-paste something from one of those images, and then blend it into another, ELA will show it.
ONLY IF THE IMAGE IS NOT RESIZED OR CROPPED. Or if the image is re-saved at a lower compression level. Probably most global image alterations like color correction would 'destroy' the information ELA looks for as well. Again, this technique is very, very brittle.

ELA works on the 8x8 DCT blocks. If you resize, or crop an image, the blocks change, and ELA won't work.

Go back and look at the image we were talking about in that thread. That was where a handbag had been crudely removed. The ELA didn't see the hand bag at all. Instead the author was going on and on about other things, as if we were supposed to belive that the handbag was removed first, then the image was sized and cropped then the author went in and tried to enlarger her breasts or whatever.
Care to link those images?
here's a permalink from the site. That image is straight off the camera, no manipulation whatsoever. Except it was resized by flickr, of course.

Even if ELA does work in theory, this implementation is totally whack.

On the other hand here is a super cheesy, obvious photoshop (with 10 pixel matting) I did back in '06. That was uploaded to flickr in 2006, it's not something I just put on there today. And it's something that should show up. Two images stuck on top of eachother with hardly any manipulation.

But when you look at the ELA, there's hardly any difference between the two regions. Did I resize or crop it? Honestly I don't remember. Probably. I did that in like five minutes and wasn't paying much attention.
Here is an example source image taken from Reddit.com.

Here is the Error Level Analysis output, which clearly shows the editing.
Okay, but Check out what a NON photoshopped screen grab of a Google suggest looks like. That particular shop was obvious due to the difference in anti-aliasing. But try it for yourself. Take a screen shot of Google suggest and run it through ELA. The highlighted word will look different then the non-highlighted words.

And the green link text shows up really hot. But again this link is a straight screenshot of Google's suggestions with no manipulation whatsoever.
posted by delmoi at 6:23 AM on April 5, 2010 [4 favorites]


How does it do on one of the most famous photoshops ever?

Answer: Doesn't detect anything.
posted by delmoi at 6:36 AM on April 5, 2010


Gasp! You mean Sarah Palin's bikini was actually not American? Maybe she was wearing her Canada-wear, or worse, French bikini!
posted by mccarty.tim at 6:39 AM on April 5, 2010


I like to think this is how the Predator browses the internet.
posted by mccarty.tim at 6:40 AM on April 5, 2010 [4 favorites]


What about THE most famous photoshop ever?

(Answer: total failure)
posted by delmoi at 6:51 AM on April 5, 2010 [1 favorite]


Don't you have to find the true original though?
posted by smackfu at 7:02 AM on April 5, 2010 [1 favorite]


Let's get this straight: Does it detect errors in the compression, meaning that you could go into Photoshop and export it as a new JPG (possibly with new settings or resolutions or whatever) and get rid of the artifacts?
posted by mccarty.tim at 7:08 AM on April 5, 2010


It detects multiple compressions. So if you load a JPG into Photoshop, and then modify it, then save it as JPG again, the untouched parts of the photo are now compressed twice, and the parts you painted are only compressed once. That's what it can show you. And it can actually go multiple saves back.

The main problem with the technique is that if you make other very common changes, like resizing the final output, you lose all that compression history. Since we practically never see a professional retouched photo at full resolution, that makes it fairly worthless for what people actually want to see.

OTOH, it's pretty good at telling if someone on a forum painted in fake text on a webcam photo.
posted by smackfu at 7:13 AM on April 5, 2010


Let's get this straight: Does it detect errors in the compression, meaning that you could go into Photoshop and export it as a new JPG (possibly with new settings or resolutions or whatever) and get rid of the artifacts?

The idea is, each time you compress an image, it changes a little. But eventually it 'stabilizes' and stops changing. So what ELA is supposed to do is detect how long each pixel takes to stabilize.

The problem is that a fresh image will be totally unstable. And any time you resize/crop/etc you end up with a new "fresh" (as far as JPEG is concerned) image.
posted by delmoi at 7:27 AM on April 5, 2010


Wait a minute, fake - you are claiming that the ELA clearly demonstrates that the image of the google search page was altered? If you go to google and type in "is the pope" You get the same results shown in that image. So, which elements do you think were edited?

Am I misunderstanding or have you have just demonstrated that the tool is not reliable?
posted by Zetetics at 8:05 AM on April 5, 2010


If you go to google and type in "is the pope"

(I don't get "Is the pope jewish" but I do get that suggestion if I type "Is the pope j" But while that image does look altered, look at the aliasing around the words, the whole box is probably not altered)

But this one is a straight up screen grab with no manipulation, and the same stuff shows up as 'error'
posted by delmoi at 8:09 AM on April 5, 2010


I can tell by the pixels. And because I have seen many 'shops in my time.
posted by GuyZero at 9:19 AM on April 5, 2010


So, you might call me a "digital artist". I've never been involved in professional photo retouching, but I do a lot of work with photoshop. I understand many workflows are self taught or shop enforced, but I don't understand why there would be multiple compressions on any professionally worked on jpeg. I'm assuming these images will be used for web and catalog (perhaps thats a bad assumption), and so to me, the workflow that would make the most sense would be something like this:

Raw image is handed off, levels, exposure, etc tweaked, then imported into photoshop. An untouched layer is saved as background and locked, and an edited layer (or many layers) are worked on above. When one round of revisions is complete, a jpg is compressed and sent out as a copy for art director/boss to review. The whole document (with layers) is saved as a .psd (or layerd .tiff). When more revisions are to be made, the layered uncompressed file is opened and worked on, and then a separate copy is saved out. Finalized images will be resized for web, and converted to CYMK for print. This workflow keeps a direct line from "pure" to compressed (including loss of colors to cymk conversion) with no chance of compressed becoming the new "pure".

I don't understand why someone would be working jpeg to jpeg, especially when some modifications (thinking layer masks of subject over new background) would be monumentally easier to do with the original layers. Unless there is some technical aspect of how photoshop saves files I am unaware of (totally possible), this detection process sounds useless for most good workflows and would only work with a shop working round1.jpg into round2.jpg. And then, it would have to be round1.jpg at the same resolution as round2.jpg, without overall changes to the image such as levels.
posted by fontophilic at 9:49 AM on April 5, 2010 [1 favorite]


Very interesting tool, but on the Internet many of the images have tricks.
posted by datta at 10:05 AM on April 5, 2010


I’ve seen photoshops you people wouldn’t believe. Adjustment layers on fire off the shoulder of Orion. I watched 105 millimeter prime lens flares glitter in the darkness at Tan Hauser Gate. All those manipulations will be lost in time, like tears in rain.
posted by squalor at 10:28 AM on April 5, 2010 [3 favorites]


One of my fondest memories of teaching Photoshop class: The guy whose brain just switched off after we discussed some famous photoshopping cases.

After I finished my lecture, he looked visibly disturbed.

"So how are we supposed to be able to tell if ANY of this stuff is real?"

He looked like the angry version of Wilford Brimley. And by "ANY OF THIS STUFF," which was accompanied by a gesture around the room, we were clearly meant to understand that he meant "ANY OF THE STUFF IN THE WHOLE WORLD."

Me: "Well, fortunately, most of it probably isn't photoshopped, at least not in a drastic way."

"BUT HOW DO YOU KNOW!!!!"

Me: "..."

Shortly thereafter he quit the class. Or maybe he was the one who was found to have a prior for sexual assault and wasn't allowed to be in a class full of minors. Can't remember.

Anyway, maybe with a tool like this I could have made his day. :-)
posted by circular at 12:13 PM on April 5, 2010


totally real.
posted by delmoi at 12:25 PM on April 5, 2010


Heh, you seem to really be annoyed at this.
posted by smackfu at 12:40 PM on April 5, 2010 [2 favorites]


« Older Space Shuttle Discovery STS-131 is being fueled fo...  |  Oxford Clay: a webcomic about ... Newer »


This thread has been archived and is closed to new comments