**NOTE** January 2022 - Changes to Gstreamer and Pipewire packages from PackmanPlease read the following thread about the current changes
oldcpu's meandering thoughts on Computers, GNU/Linux and openSUSE
by , 27-Nov-2011 at 07:42 (17341 Views)
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
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:
Code:
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:
Code:
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:
Code:
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:
Code:
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) :
Code:
zypper ar http://download.opensuse.org/repositories/home:/deltafox/openSUSE_12.1/ deltafox
Code:
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.
Code:
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.
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:
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
Here is an example of the spell check correction in progress
Here is a look at the language selections
I use this program fairly often.
|