Recovering Blurred Text Using Photoshop and JavaScript 157
An anonymous reader writes "There's been a lot of talk about recovering blurred or pixelated text, but here's an actual implementation using nothing but Photoshop and a little JavaScript. Includes a Hollywood-esque video showing the uncovered letters slowly appearing."
Re:Just ovveride? (Score:5, Interesting)
Ideal conditions (Score:5, Interesting)
Re:Oblig (Score:0, Interesting)
Re:OSX-style dock on website. (Score:4, Interesting)
Neat.
*takes picture*
I hate the dock, and I hate transparency.
I think it's even worse on a website.
But I'm half-tempted to look at the code.
Re:Just ovveride? (Score:5, Interesting)
Why not make a "secure" mosaic filter that does one or more of the following:
- Randomizes the pixel data before applying the mosaic (Keeping the original colors so the mosaic looks natural.)
- Applies noise to the area before applying the mosaic (Could use intensity noise rather than hue to retain the color scheme that is being obfuscated.)
- Requires the user to drag the smudge tool across the area by a pre-determined amount to randomize the data before the mosaic.
- Apply noise to the mosaic pixels, (1:1 with the mosaic size) after it has been applied.
These would all retain the look of the mosaic but would defeat the reverse engineering tactics displayed here.
Heck, forget the plugin, these would be pretty simple to automate these within Photoshop.
Short version (Score:5, Interesting)
If you know the blur algorithm, you can run each character through it to produce the blurred output, then compare that result to the image you are trying to unscramble and pick the closest match.
This assumes the blurring doesn't cause pixels to overlap their neighbors too much, that the algorithm produces deterministic output (isn't random), and that there are few possible inputs resulting in the same blurred output.
If the letters overlap because the blur blends with its neighbors then it just becomes a computational complexity problem where you have to try words instead of letters. A lot harder, but not totally impossible.
A blurring algorithm that used some large mosaic effect prior to bluring or used randomized input would produce a similar looking blur effect, but without disclosing much about the input.
Personally, I'd prefer examining the blur area for the predominant background color and create a gradient/mosaic around that color to fill the area. Then there is absolutely no chance of recovering information, but the effect on video wouldn't be too horribly jarring (as a black box might be).
Re:Ideal conditions (Score:3, Interesting)
What is more significant is knowing exactly which font and which blur filter was used. Also having the filter applied evenly is going to make things far easier than if someone grabs the blur tool and scribbles over the area with it.
Re:OSX-style dock on website. (Score:4, Interesting)
Yes, you can de-obfuscate black rectangles. (Score:5, Interesting)
drawing a big black rectangle is 10x faster and there is no way you can de-obfuscate that
That's not entirely true. There was an article a couple years back about a technique for recovering redacted text with pretty high reliability.
It used the fact that most standard fonts have variable spacing, and that once you've determined the font you can model that only certain combinations of letters will actually fit in the space of the redacted word or words. Combined with a dictionary and bayesian matching based on nearby words, you can often figure out what words would have fit into a redacted rectangle. Or at least limit it to a fairly small pool of possibilities.
They demonstrated it on a redacted government document, and pulled out some places where the redacted words had to be "Iran" and "Ahmedinejad" etc., because nothing else both fit and made sense. If it's a monospaced font, you know the exact number of letters of the redacted text.
I can't find the original link, but here's a paper [lehigh.edu] that describes some of the techniques available for "cracking" blackout redaction. (some apply only to magic-marker-type redaction, but others apply even to electronic black-rectangle redaction).
Re:Yes, you can de-obfuscate black rectangles. (Score:2, Interesting)
Plus, if you are obfuscating an important, scanned document, and its cruicial you hide stuff in it, the best option is to OCR it, and simply delete the snippets you dont want.
javascript dock? (Score:3, Interesting)
Holy cow, I thought I had seen all possible ways to crapify a web page via Javascript, but today I have learned of another: Adding a partially transparent Mac OS dock to it. So that when you scroll down (as you normally do with web pages), the thing jumps around like a monkey on amphetamines. And you presume that it doesn't get any worse than that, wouldn't you? You would, but then you'd be wrong because it also does the magnification thing and it does it about as well as you'd expect Javascript to do it.
Now if you'll excuse me, I'm heading out to abuse my 2nd Amendment rights.
Re:Interesting (Score:1, Interesting)
FWIW, de-blurring "like it's done in the movies" is quite possible.
http://refocus-it.sourceforge.net/ [sourceforge.net] with samples.