Recovering Blurred Text Using Photoshop and JavaScript
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."
From TFA:
Hey Timothy, are you trying to get the mac fans riled up?
I'd try this myself, but I stopped pirating PS at version 6. Be interesting to see what other Slashdotters make of this.
Linux, you magnificent bastard, I read the fucking manual!
Now for all of the other pixellated stuff...
Bwahahahaha.
20x zoom. Mr. Data, what does that look like to you?
Well done, sir. Well done indeed.
Dance like you're hurt, Love like you need money, and work when somebody's watching.
-Scott Adams
I never understood why people use pixel mis-mashing when they want to obfuscate something in an image.
drawing a big black rectangle is 10x faster and there is no way you can de-obfuscate that
Maybe some day there will be like a way to overblend a sacrificial nipple or clit onto anything that was tarnished with the censorship "star." On second thought, that sounds like doublspeak censorware -- like downloading a DRM'd song and the wrong key to decrypt will give you a song sung by Hillary Rosen, same lyrics and sinstruments an' all. *SHIVERS
Never works, regardless of details. In this case, creation of information from nothing.
In this case, text was already recognizable, before the change. By encoding it in different format that is not readable by humans it doesn't mean that information was not there. Think of it as a cipher.
Is it not the case that the reason this works is because you're running the -same blur algorithm- with the -same input- (the unblurred letters/pixels) and simply iterating through the letters and looking for equivalent output?
Presumably, the blur algorithm output could resolve such that multiple unblurred letters resolve to the same blurred pixels, but even if it is not this trivial to map the input state to output state, it still wouldn't seem to me to approach solving the general case of letters "blurred" by any arbitrary means, which is the real-world capability implied by the article.
What am I missing here?
~ Whence do you come, slayer of men, or where are you going, conqueror of space?
I wonder if this technique is anything similar to how some of the recent captchas have been recently cracked?
The article mentions the authors 'cheating a little' by de-blurring the image under 'ideal conditions'. From what I can gather, he is using a source Photoshop file (PSD) as the sample. If he already had access to the source PSD file, wouldn't it be easier to just click undo a few dozen times? Can this be reproduced to a raster image at all?
I judt got a nre Kinesis keybiartf so please excusr ant egregiou typos.
Wouldn't it be cool if you could use this technique to clear up the fuzzies on censored Japanese pr0n?!
Jeez. Hasn't anyone seen CSI?
"While my original goal of recovering the censored text on my friendâ(TM)s page was never achieved, the project was a success."
I wouldn't call that a success...
Good execution of a basic concept, but the fact remains that this shit is infeasible in practice. You have all the font issues (the typeface, the spacing, the color, the size, etc.), and you've got all the source issues - Are you sure that's text? Is it English? Was it obfuscated in other ways? Has the image been altered after the text was rendered? How has compression affected it?
The biggest fucking issue, of course, is that you're assuming the text was obfuscated using photoshop, or at least very similar blurring/pixelating algorithms.
It's a great project in terms of using javascript and photoshop to do something neat but basic in concept (essentially brute forcing, as the author says).
But unless you have inside info about how the text was rendered and obfuscated, you're better off taking a step back and squinting.
I think I see a duck.
Where's the comments complaining about how they didn't find a similar way to do this in GIMP?
Or maybe they did, but it's not here. Not that I can tell from a 500 sever error. :)
I'm getting a 500 status connecting to the original, but it seems that Coral CDN has a decent cache.
"The easy way to read numbers"
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).
Natural != (nontoxic || beneficial)
Sounds like your typical "we're going to revolutionize a decades-old standard" start up.
He's ****, Jim
There. Fixed that for you.
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 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).
I stole this sig from someone cleverer than me.
> Wouldn't it be cool if you could use this technique to clear up the fuzzies on censored Japanese pr0n?!
You jest, but if you spend a bit of time on Wikipedia, you'll find that some of the mosaics are created in a special way precisely so that people CAN undo the censorship and there are, in fact, programs to automate this.
Basically, they created this scheme as a way to get around the law and there are several mosaic/decoder pairs, so not everyone uses the same scheme and not all mosaics were made to be decoded.
I think people would be more interested if this removed the blur from nipples.
I'll bite. What the hell is this a reference to?
Property is theft.
Mr. Robinson was indicted for violating a recent patent owned by Apple, Inc...
(take a look at the website)
Remove the text you want hidden and replace it with some lipsum of believable length and general consistency. Apply standard mosaic filter. Simple, relatively quick, no special software needed.
If you randomize pixel in any way before applying mosaic, adding noise or just randomly permute the pixels around, then what you get in the mosaic is going to be the same colored blocks that look like a solid colored strip. That's because mosaic computes the average of the pixel values that fall under the block, which would be the same for all blocks if randomness is evenly distributed. However, if you apply mosaic first and then randomize the blocks after, then the result looks much more like mosaic and yet is irreversible.
I once had a signature.
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.
Great, ecmascript is wonderful! Software automization is always cool.
:)
But here's the problem with the problem being solved.
1) The font size is known
2) The application which rendered the font is known (different apps render a little differently than others)
3) There is no background image or pattern to distort the pixelization
I can go on, but these points are the real issues, I guess it would be possible, with enough resources to build a database containing all characters from all fonts rendered at all interesting sizes and through all interesting applications. But even then, the background image would have to be recovered in order to apply this technique as it will greatly impact the colors of the pixelization.
Either way... nice presentation of ecmascript in Photoshop
Yulia Nova's boogie, here we come!
1. Focus Magic can unblur stuff like you wouldn't believe.
http://www.focusmagic.com/index.htm
I found out about it when some guy from Canon put up a blurred photo of the 5D Mk II, and someone /else/ unblurred it to show the "5D". That freaked him out, and he suggested that Canon integrate the software into the camera itself...
2. change all redacted words to 3 chars, before black-boxing 'em ( in audio, replace all redacted portions with 1 sec of digital silence, and if there's no background noise that gives away the real duration, you should be good to go ).
There:
1 method for unredacting stuff, and 1 method for redacting stuff.
(:
Better yet, replace the text with the blurred values of "lorem ipsum ...", or some other random text. That way, it still will have the white/black balance of text-that's-been-obscured, but will be unintelligible.
Like others, I don't understand why simply white/grey/blacking out a block of text on an image is something people are averse to doing.
Space Ghost: Wait a minute! Computer, zoom in.
[Control monitor zooms in on painting of Golden Gate Bridge on Space Ghost's wall, forming two big blocks]
Automated Voice: Enhancing.
[Image becomes one big yellow block]
Automated Voice: Enhancing complete.
Space Ghost: That's the bridge I painted. It's like they filmed this tape recording in an exact replica of my apartment. Wait a minute! They must be in my apartment! But wait a minute...
Automated Voice: Yellow.
Space Ghost: How'm I gonna get in there?
Automated Voice: Block.
Space Ghost: Wait a minute. I have the keys. Perfect!
Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
Just replace the text you wish to blur with some other random text of the same size and then blur it.
If they would have did it MATLAB (http://www.mathworks.com/products/image/), it could be done using a beowulf cluster!