Tuesday, December 7, 2010

Document Scan and OCR - On a Phone!!!

Those who have come across my rants blog might have noticed that I like to snap amusing images and post those on my blog.  More often than not they end up looking something like this:


I just came across an application called "frontview" and the idea is that it can "unskew" pictures and basically make the camera work more like a scanner.  To test this out I snapped a picture of a book page from my Kindle:


After I snapped the picture, I started up frontview and selected the picture.  Frontview immediately detected the part of the picture like this:


Click scan and then rotating the result and it looked like this:


Here's the resulting image:


That is not too bad actually.  The final experiment was to see what Google OCR could get out of that.  A while back I created a pixelpipe service that upload to Google, so uploading the image from the phone was a "two click" process:


And:


My first attempt failed miserably.  Apparently Google did not appreciate the black border that was left in the image.  As a test I tried to remove the "border" so the image looked like this:


It is the same image as before - just cropped a bit.  This time the result was far more convincing.



That is pretty awesome really.  As far as I can see it made one mistake only.