Wednesday, November 19, 2014

Pixel poems, Mark Twain, and cracking CAPTCHAs

For the impatient nerds among you, here is how you can crack any CAPTCHA:

Take that facial recognition software (the one that makes a 3D image out of a 2D) or another program which converts 2D to 3D, run it over a CAPTCHA. Tweak as necessary.

Working on text encryption for grandma has been a meditative experience. Yes, coding can be highly meditative. Though anybody under 30 may be running too much testosterone to have made the experience. Ask your lady coders for advice.

The encryption tool, which we call a scrambling tool to avoid the impression we know what we are doing, now supported images as a source for values we run over text. 

Check it out at http://www.unchartedcharters.com/.

Just for the heck of it, we took a piece of scrambled text and turned it into a very basic image, which gave us this:

 Not much of a looker, agreed, but when the soothing effect of typing stuff like for (int x=0; x < width; x++) kicked in, some avenues of further exploration opened up.

Art:
The grey image above makes no effort to do anything with colors. In addition, it is encrypted, which takes all the pixel values towards the higher end, obliterating almost any contrast in the process.
But, with a little bit of effort, we should be able to turn a regular text into appealing visual art.
We'll do this for Mark Twain first. The old print writer (Java pays homage to him by having a PrintWriter class) would appreciate.

Pattern recognition:
Once we have a Mark Twain text turned into a nice, colorful image, we'll do some more of the same to figure out the next challenge. Can we use images created out of text to identify an author?
Sure, there are the usual string based programs out there, which do a decent job. However, strings tend to be sort of a bitch. They have become so much easier over the years, yet, a lot still goes wrong.
So, why not turn texts into a format that all the swanky programming languages handle without breaking over the wrong number of double or single quotes?

Image processing and recognition coding is a blast compared to even a few years ago.

Again, let your facial recognition software do the recognizing of the style of an author...as represented by red, green, and blue pixels.

More Art:
Time to translate emoji to text and see what we get. Apart from lots of uninterrupted "words" like "aaaaaaaaaaaaaaaaaaaaaaaa" or similar.

Who knows, maybe assigning colors to text will even give us a hint why some people like some authors better - emotionally speaking.
 


No comments:

Post a Comment