Do-it-yourself OCR with Perl modules

ONE IN A MILLION

Article from Issue 79/2007
Author(s):

SecurID tokens use an authentication system by RSA Security to give the user a valid key for logging onto the target system. A home-grown optical character recognition tool in Perl monitors the key generator.

My colleague Fergus recently noticed that his SecurID token displayed “000000,” and he posted a photo of this on Flickr. These keyfob tokens by SecurID output a different 6-digit number every 60 seconds. If the odds for any numeric sequence appearing are equal, the chance of getting to see “000000” is one in a million. It’s like winning the lottery! This lucky shot made me curious to find out what my keyfob displayed while I wasn’t looking. It is fairly easy to digitize the output with a webcam or a scanner, and optical character recognition (OCR) would give me the digits hidden in the pixel-based output. But because OCR vendors have more or less patented this area to death, there is little in the line of functional free software.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perl: Google Drive

    Armed with a Chinese guillotine and a scanner with an automatic document feeder, Mike Schilli gives his books some special treatment, courtesy of Google Drive, which offers 5GB of storage space – room enough to start an online PDF collection.

  • Perl: Retouching Photos

    In many cases, whole series of digital images need the same kind of modifications, which forces the photo-grapher to repeat the same steps time and time again in GIMP. Have you ever considered retouching in Perl?

  • Perl: Photos Effects

    With the GIMP image editing program, and a little help from Perl, you can enhance your digital photos and transform a modern image into a nostalgic turn-of-the-century shot.

  • Perl: Dropbox

    The proprietary Dropbox service has become a popular way to exchange large files. The Dropbox web API also supports scripts, like the one in this article that picks up files from behind a firewall.

  • Perl: Controlling a Webcam

    Webcams are useful for monitoring. Using CPAN modules and custom-made C code, Perl scripts can automatically adjust the exposure and fish the most interesting images out of a video camera’s data stream.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News