Slashdot Mirror


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."

12 of 157 comments (clear)

  1. Re:Just ovveride? by fbjon · · Score: 4, Interesting

    It may stand out too much in the layout. What would be interesting (maybe even useful) is developing a formula that determines the minimum mosaic size for a given font style/complexity and size that makes reversing it produce ambiguous results, one extreme being a black rectangle, the other no mosaic at all.

    --
    True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
  2. Ideal conditions by Itninja · · Score: 5, Interesting

    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.
    1. Re:Ideal conditions by petermgreen · · Score: 2, 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.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  3. Re:Oblig by Anonymous Coward · · Score: 0, Interesting

    Posting to undo mistaken moderation.

  4. Re:OSX-style dock on website. by sexconker · · Score: 3, 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.

  5. Re:Just ovveride? by Zadaz · · Score: 4, 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.

  6. Short version by rabtech · · Score: 4, 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).

    --
    Natural != (nontoxic || beneficial)
  7. Re:OSX-style dock on website. by cheesy9999 · · Score: 4, Interesting

    Actually the one on my site was written myself, and is located at http://tlrobinson.net/projects/js/jsdock.php It was written back in my early days of JavaScript, so it's probably not the prettiest code...

    --
    -tom
  8. Yes, you can de-obfuscate black rectangles. by IdahoEv · · 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 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.
    1. Re:Yes, you can de-obfuscate black rectangles. by Dreen · · Score: 2, Interesting

      Thats pretty interesting. The document lists some good countermeasures but still, the more you obfuscate, the harder it becomes to "brute-force" it back. For whole long-ish sentences it would probably be impossible.

      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.

  9. javascript dock? by Eil · · Score: 2, 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.

  10. Re:Interesting by Anonymous Coward · · Score: 1, Interesting

    FWIW, de-blurring "like it's done in the movies" is quite possible.

    http://refocus-it.sourceforge.net/ with samples.