mikerr
Posts: 2828
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

OCR - turning your photo into text

Fri May 31, 2013 12:08 am

I thought I'd throw a quick HOWTO for converting a page of a book into text -Optical Character Recognition (OCR)

Code: Select all

sudo apt-get install tesseract-ocr
Take a photo of your page:

Code: Select all

raspistill -o page.jpg
Convert it to text (OCR):

Code: Select all

tesseract page.jpg pagetext
This can take the Pi anything from 1 to 10 minutes depending on the image...

Then you have a text file called pagetext.txt

Code: Select all

cat pagetext.txt
Last edited by mikerr on Thu Apr 17, 2014 10:36 am, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: OCR - turning your photo into text

Fri May 31, 2013 10:58 am

OCR is one of the few things where linux is a decade behind professional solutions on Windows computers (one of the very few reasons why I'm still using them). tesseract is working in a way, but at least for my demands not really usable.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

parham bahramsari
Posts: 16
Joined: Sat Apr 26, 2014 11:49 am

Re: OCR - turning your photo into text

Tue May 13, 2014 3:09 am

hi just a question can I use "tesseract" from c++ as well ?

ayushboss
Posts: 1
Joined: Thu Dec 10, 2015 3:29 am

Re: OCR - turning your photo into text

Thu Dec 10, 2015 3:33 am

When I use these commands, I get some random characters instead. How can I fix this?

Return to “Camera board”