OCR for iPhone source

ocr_gobbledygookThe source code for the Tesseract OCR for iPhone project has been published. It’s really simple – more of a skeleton, proof-of-concept project than anything else. Still, though, it’s neat to have nearly point-and-shoot text conversion in your pocket.

The project page is: Pocket OCR

The source code is available at github: http://github.com/rcarlsen/Pocket-OCR

There is certainly a lot of improvement to be made. Automatic color correction. Page layout recognition. Perspective correction…the list could go on. The code is there, so…fork away!

(the thumbnail is a bit tongue-in-cheek…but honest. good conversion requires a good source image: well-lit, macro, focused and tightly cropped seems best)





9 responses to “OCR for iPhone source”

  1. OCR Software Avatar

    This is slick. I have seen some really cool apps where you can take a picture of a business cards, and autofill contact info. The uses are endless when OCR is integrated with the image capabilities of the phones.

  2. Michael Stewart Avatar
    Michael Stewart

    i had to use git://github.com/rcarlsen/Pocket-OCR to clone.

  3. […] Update #2: Source code for demo project released. […]

  4. rajee Avatar

    I new in iphone development, I have got some of the symbols when i use this OCR from github, i didnt get the correct values… Any suggestions.
    Rajesh Yandamuri

  5. Robert Avatar

    Can you elaborate? Are you saying that the app and tesseract library are running, but that the quality of the OCR results is poor?

    Perhaps checking in on the tesseract dev group at google would provide some info on getting better results. In PocketOCR you should scale the image to crop out as much of the non-text area as possible and ensure that there is good, even lighting on a solid (light?) background.

  6. ryen Avatar

    Sorry if this has been mentioned, but don’t we need the header files for tesseract, specifically baseapi.h ? Or is your xcode project looking in a place that I may not have on my system ?

    I’ve just downloaded the latest from github, no altercations, and get “BaseApi.h No such file or directory” build error. NOTE: I have added the binary tesseract ( .a files) to the project.

    Thanks in advance.

  7. ryen Avatar

    I just had to edit the header search path under the build settings, to the directory where I downloaded the tesseract source.

    Thanks for all the help, learned alot from this great information.

  8. Ammad Avatar

    Hellow i am also using this OCR can i use this OCR can i use this OCR for paid application for apple store ?

  9. Robert Avatar

    The short answer is that you may use the app (and underlying TesseractOCR library) in any way permitted by the licensing terms. The shorter answer is “yes” provided you release the modified source code under licensing terms compatible with the GPLv3. However, I would not use PocketOCR in a commercial project without work. There are likely inefficiencies in how it processes the image and probably some leaks. It was really a proof-of-concept app, and one of my first iOS apps…not that pretty. It should also provide additional features to make it worth downloading and using.

    If you’re only using the compiled Tesseract OCR static libs in a commercial app then you’ll have to review those terms; I believe that it’s licensed under Apache 2.0, which is a fairly permissive license.

    Here’s a good place to start reading: http://opensource.org/licenses/index.html

Leave a Reply