Tuesday, January 10, 2012

OCR on the Android: Google Goggles, Google Docs, Mobile OCR Free, Evernote

If you're an avid note-taker when you read, you know how useful OCR (optical character recognition) is. On the desktop side of things, Adobe Acrobat works brilliantly, though there are many cheap/free alternatives. If you're reading a printed book or magazine and want to grab a paragraph to add to your notes, you can always scan it and use powerful desktop OCR -- but what a pain! How nice if you could just snap the excerpt you wanted with your smartphone and boom, have the text (not some big photo of it!) ready to paste into a document or an e-mail. I tried a few programs & below are the results, worst (for OCR) to best.

Not actually OCR: Google Goggles, Evernote

I don't understand the fuss about Google Goggles as an OCR tool: it doesn't work well as one. Its OCR is so-so, but the real deal-killer is that, when Goggles recognizes the source of some text (e.g. the book it comes from), it doesn't OCR the text you're trying to capture; instead, it redirects you to that book's page on Google Books. Goggles is OK for running web searches on things you can snap pictures of, but it's not an OCR program. Evernote isn't either. While it will allegedly OCR text in photos you put into an Evernote note, you can't really get AT that text. It's used for making text in images searchable, and works only on images you copy to Evernote's server -- i.e. not on local notebooks.

Not-bad OCR: Google Docs

Google Docs is a true OCR solution. You install the Google Docs app on your phone, and it includes an option that lets you create a new online doc from a photo, automatically OCR-ing text that's in the photo. Its recognition accuracy is so-so. Below is what Google Docs did with a photo of a block of text from Sam Harris' 2010 book The Moral Landscape; I highlighted the OCR errors in red.

The framework of a moral landscape guarantees that many people will have flawed conceptions of morality, just as many people have Hgwcd conceptions of physics. Some people think "physics" includes (or validates) practices like astrology, voodoo, and homeopathy. These people arc, by all appearances, simply wrong about physics. ln the United States. a majority ofpeoplc (57 percent) believe that preventing homosexuals from marrying is a "moral" imperative." However. if this belief rests on a flawed sense of how we can maximize our well-being, such people may simply be wrong about morality. And the Fact tha: millions of pcoplc use the term "morality" as ai synonym For religious dogmatism, racism, sexism. or other failures of insight and compassion should not oblige us to merely accept their terminology until the end of time.

Near-perfect OCR: Mobile OCR Free

Mobile OCR Free is available here on the Android Market. A $5 paid version adds more languages and removes a splash screen. It had by far the best accuracy of any OCR program for the Android -- near-perfect. It has a bare-bones interface. The app has no built-in camera, so you can't de-skew or crop an image in it; you have to do that in your camera/gallery program, which isn't too hard. Like Google Docs, the app requires a network connection; it uses powerful servers on the web, and not your phone's puny processor, to do the OCR. Its OCR accuracy is much better than that of Google Docs, and it kicks back your result in a much simpler and more usable form: a plain block of text with a "copy text to clipboard" button, letting you paste it wherever you want. Here's how Mobile OCR Free handled the exact same text photo from that Sam Harris book (with the one error highlighted):

The framework of a moral landscape guarantees that many people
will have flawed conceptions of morality, just as many people have
flawed conceptions of physics. Some people think "physics" includes (or
validates) practices like astrology, voodoo, and homeopathy. These peo-
ple are, by all appearances, simply wrong about physics. In the United
States, a majority of people (57 percent) believe that preventing homo-
sexuals from marrying is a "moral" imperative. * However, if this belief
rests on a flawed sense of how we can maximize our well-being, such
people may
simplv be wrong about morality. And the fact that millions
of people use the term "morality" as a synonym for religious dogma-
tism, racism, sexism, or other failures of insight and compassion should
not oblige us to merely accept their terminology until the end of time.


The photo these two programs were OCR-ing from was nothing special: medium resolution, so-so contrast, slightly uneven lighting and a decent bit of skew/warp. Here 'tis:



2 comments:

Patrick Denker said...

Addendum: too funny! Shmoggles. If you snap that same passage from Sam Harris's book with Google Goggles, trying to OCR it, guess what web page it instead sends you to? This one. Sorry, Sam!

Anonymous said...

I came across your article while searching for an Android OCR. I agree about Google and Evernote, where OCR is an auxiliary feature. But Mobile OCR Free somehow has poor reviews on the Android Market. I came across another Android App with much higher reviews - ScanThing (https://market.android.com/details?id=com.scanthing.android&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5zY2FudGhpbmcuYW5kcm9pZCJd). It also uses off-phone OCR technology by OCR-IT (www.ocr-it.com) and produces very good accuracy. Has great reviews.