On openSUSE-12.1 for scanning and OCR I have installed Tesseract-ocr and gImageReader . I like the capability to be able to conduct OCR of French, German and English languages, especially since I am an expatriate living abroad.
I blogged about this before with openSUSE-11.4, and posted about it wrt openSUSE-11.3 and 11.4 in these threads
- openSUSE forums: OCR and Linux and
- obtained help in this thread openSUSE forum help thread: How does one meet a python2-devel dependency requirement on openSUSE-11.3? and
- this blog article (further down in the blog) Blog openSUSE forums: new 64-bit openSUSE-11.4 KDE installation on my main PC (Core i7-920)
This time I thought I would re-organize my notes/post, and make it easier for one to see exactly what commands I sent in order to do this installation.
openSUSE-12.1
Program comments
Tesseract
The ‘core’ program behind the OCR software that I use is Tesseract-ocr, where Tesseract is
Tesseract is a commercial quality OCR engine originally developed at HP between 1985 and 1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was open-sourced by HP and UNLV in 2005. From 2007 it is developed by Google.
I note a packaged version of tesseract-3.00-4.1 is available from here for openSUSE-12.1:
http://download.opensuse.org/repositories/openSUSE:/Factory:/Contrib/openSUSE_12.1
and a tesseract-3.00-5.1 is available from here for openSUSE-12.1:
http://download.opensuse.org/repositories/home:/deltafox/openSUSE_12.1
gImageReader
For a graphic front end to tesseract, I like to use the python package gImageReader. I have read:
gImageReader is a simple PyGtk front-end to tesseract.
Main features:
- Allows the user to select the part of the image they want to be recognized or directly recognize the entire image.
- Supports PDF documents.
- Allows the user to acquire images from scanning devices.
- Recognized text displayed directly next to the image.
- Basic editing of output text, including search/replace and removing line breaks on selected text.
- Spellcheck enabled for the selected language in the output textfield if corresponding dictionary installed (requires GTKSpell).
- User is prompted to install missing spellcheck languages (requires PackageKit or apt-file).
- Easily switch between multiple open files.
- Attempts to automatically detect all necessary programs, otherwise shows a configuration prompt to the user.
I note a packaged version of python-gimagereader-0.9-2.1 for openSUSE-12.1 is available here:
http://download.opensuse.org/repositories/home:/deltafox/openSUSE_12.1
and a very slightly older packaged version of python-gimagereader-0.9-1.1 for openSUSE-12.1 is available here:
http://download.opensuse.org/repositories/home:/malcolmlewis:/Python/openSUSE_12.1
**Spell check dictionaries **
In addition various spell check dictionaries are very helpful when running tesseract and gimagereader, to assist in repairing words where the optical character recognition was not ideal. I confess its never been clear to me as to what spell check dictionaries are necessary. I note GTKspell is needed, and I have read reference to ispell, aspell and myspell being needed.
I noted prior to install tesseract and gimagereader, by default on my KDE desktop I had hunspell, hunspell-tools, libaspell15, myspell-american, and ispell installed. YaST also has many additional spell check dictionaries, so I saw no need to add any extra repositories to help install desired packages here (other than the basic OSS repository).
**Commands Used to Install **
In the end I sent the following commands with root permissions (deciding to try deltafox’s repository) :
zypper ar http://download.opensuse.org/repositories/home:/deltafox/openSUSE_12.1/ deltafox
zypper in myspell-french myspell-german aspell aspell-de aspell-en aspell-fr ispell-french ispell-german aspell-spell
which picked up as dependencies igerman98-doc, librcc0, librcd0, and rcc-runtime. I was careful not to install aspell-ispell as that conflicts with ispell.
zypper in tesseract tesseract-traineddata-deu tesseract-traineddata-eng tesseract-traineddata-fra python-gimagereader python-imaging
I noted python-imaging picked up the dependencies python-tk, tix, and tk. And I noted that python-gimagereader picked up the dependencies libbonobo, libbonoboui, libgnome, libgnomecanvas-2.0, libgnomeui, libgtkspell0, python-bonobo, python-egg, python-enchant, python-gnome-extras, python-gnomecanvas, python-gtkspell, python-imaging-sane, python-orbit, python-popular.
I had seen reference to other GNU/Linux distributions install leptonica, but as far as I can determine, neither lpetonica-tools nor liblept2 (both packaged for openSUSE) are needed.
I then removed the additional repository that I needed for much of the above.
zypper rr deltafox
This is my standard practise. I keep my respositories, lean and mean, and as soon as the install was complete I removed this respository.
I then typed the command:
gimagereader
and the application ran.
Some Images
Here is an example of the gimagereader GUI, with a French document OCR in progress, where the dictionaries have detected some misspellings
http://thumbnails52.imagebam.com/16155/ef70b1161548780.jpg](ImageBam)
Here is an example of the spell check correction in progress
http://thumbnails27.imagebam.com/16155/a89503161548782.jpg](http://www.imagebam.com/image/a89503161548782)
Here is a look at the language selections
http://thumbnails24.imagebam.com/16155/6d191a161548784.jpg](http://www.imagebam.com/image/6d191a161548784)
I use this program fairly often.