Community Page
- tlrobinson.net/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Man that video is crazy, Radiohead's videos are always great.
- But this sample I can't compiled http://code.google.com/p/cocos2d-iphone/source/browse/#svn/trunk/external/Chipmunk
- Andrew: You might want to check out Cocos2d-iphone .. it's a 2d game engine written for the iPhone that includes Chipmunk if you want to use it..
- Many of these are the command line equivalents for the GUI versions available in OS X. Combining them with other command line tools can be very powerful and <a...
- I am able to use svn checkout from commandline from a url. But the same task when i add in my ant build file, the build file fails telling me that the url@HEAD does not exist.
Jump to original thread »
tlrobinson.net / blog » Blog Archive » Recovering Censored Text Using Photoshop and JavaScript
Started by tlrobinson · 8 months ago
8 months ago
@Gabulit:
This algorithm takes a certain type of censored text as input, and enables the user to find out what the original text was. How can you possibly claim that it doesn't recover censored text, when that is exactly what it does?
6 months ago
9 months ago
You could probably speed it up/increase accuracy by using Markov chains to try more likely next letters before less likely ones.
8 months ago
Ballpark — The easy way to send estimates.
8 months ago
Blacking out text isn't really an answer on a variable width font, either:
See Here
8 months ago
@Stuart
I think you would need a sufficiently large body of pre-existing text to figure out which letters are likelier than others. Also, a Markov chain wouldn't help that much on such small set of letters.
8 months ago
@Vivin
more likely as opposed to likelier...
8 months ago
Pff... There's no wrong way to eat a rhesus.
8 months ago
It's possible to reverse the black ink process ?????????? use to ?????????? their ??????? too. There are some gentlemen at the door in black suits with mirror shades in a Party Van. I'll just go and tell them they have the wrong address and I'll explain.
8 months ago
I don't know if JavaScript allows you to do that, but you should try cross-correlating each blurred character with the blurred image instead. For each character you could find the position of all its occurrences in the image in one pass.
And to save you the googling, cross-correlation is just space-space domain convolution with a reverted (flipped both horizontally and vertically) kernel, the kernel being the letter, and basically in the resulting image a bright peak denotes the detection of a match (although the peak isn't even ideally a sharp peak because its frequency response is mostly the square of the kernel's frequency response, but in your case it shouldn't be much of a problem anyways).
8 months ago
This works only for known fonts and known simple blur text.
Blur twice with different blur types scaling text between them or even better, use smudge tool after the blur (or before) and not anykind software is capable to find out what text there has be written.
If I would rate this demostration scale easy:0 and impossible:100, this trick would be just a 1 or 2 when talking about censoring text.
8 months ago
@Vivin
You don't need any more known text to use Markov chains. Let's say we know it's English based on the known text, and we've discovered that a letter is 'q' instead of running through all the letters a-u before discovering that the next letter is 'u', we should try 'u' first based on probability.
8 months ago
So.... Now you just need a rainbow table of every popular font filtered with all popular filtering techniques.
Then set it loose on google images and see what you can find :)
8 months ago
Making use of ascender/descender information might let you "resync" proportionally-spaced text after an error; spaces may also be visible.
A dictionary-based approach, matching ascender/descender patterns and word length, would probably be a lot more effective, but before long you'll be replicating OCR software :)
8 months ago
Any one else try to run it? I tried my own image then tried the one that comes with it. I keep getting an error on line 149:" app.activeDocument.artLayers[textDocTextLayer].textItem.contents = string;"
8 months ago
@Justin: I think I left out this step:
"Double-click the Smart Object layer to open it's source document, and adjust the variables listed at the top of the JavaScript to match the names and layers."
8 months ago
very amazing?
8 months ago
Jejejeje....
Ojala en algun dia que los gobiernos de: Venezuela, Cuba, Bolivia, etc... Para despellejarlas esos textos censurados/as por la CIA, USAID, etc., por meter problemas a Venezuela y Bolivia....
Ademas Sin embargo que, sin ningun comentarios como estas...
Ojala que los Gobiernos de Venezuela y Bolivia descubran los papeles secretos informatizados (como emails, fotos, etc.) para desemascarar las garras del imperialismo gringo que lo hizo el 11/04/2002 y el Caso de Bolivia ....
8 months ago
Have you looked into using a hill climbing algorithm? Sorry, I didn't look that closely at your code so you may have already done this.
http://en.wikipedia.org/wiki/Hill_climbing
It may help you speed things up a bit and get better accuracy. The idea is to essentially make a quick (random) approximation, and then iteratively 'make it better'.
8 months ago
@Craiig: Thanks for the suggestion. That might be a good idea, though it's not immediately obvious how I would apply a hill climbing algorithm.
The main problem is that with proportional width fonts the accuracy of all subsequent guesses depends a lot on the accuracy of the characters guessed so far. Perhaps it could backtrack if it notices the accuracy of even the best guess drops below a certain threshold.
It would definitely help if I could speed up the time for each individual test, but I think I'm pretty much at the mercy of Photoshop and my machine.
I don't remember the specifics of hill climbing algorithms from my AI courses well enough to see how to apply it to this. Any ideas?
8 months ago
The video is way to quick to see what happens with the jsx file and it what kind of editor this is placed.
Thanks.
- Unomi -
8 months ago
Photoshop comes with an editor called "ExtendScript Toolkit 2", which is what I used. I believe you can also just open the script from the File -> Scripts menu.
8 months ago
On a side note, are there any JavaScript shell environments (like Bash, or the DOS batch commandprompt) you are aware of?
- Unomi -
8 months ago
I'm not aware of any JS *shells*, but there are lots of JavaScript engines that have command line interpreters, like Rhino, JavaScriptCore (WebKit's), SpiderMonkey, and V8.
8 months ago
This method is useless if you don't know the precise algorithm used to blur the text. Since you are using the same filter to blur the text this is not recovering cencored text. This is more likely "Javascript to compare and rank based on similarity".