openSUSE-12.1 to openSUSE Leap-15.2 with gImageReader and Tesseract
by
, 27-Nov-2011 at 07:42 (13658 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
- 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
I note a packaged version of tesseract-3.00-4.1 is available from here for openSUSE-12.1: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.
and a tesseract-3.00-5.1 is available from here for openSUSE-12.1:Code:http://download.opensuse.org/repositories/openSUSE:/Factory:/Contrib/openSUSE_12.1
gImageReaderCode:http://download.opensuse.org/repositories/home:/deltafox/openSUSE_12.1
For a graphic front end to tesseract, I like to use the python package gImageReader. I have read:
I note a packaged version of python-gimagereader-0.9-2.1 for openSUSE-12.1 is available here: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.
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:/deltafox/openSUSE_12.1
Spell check dictionariesCode:http://download.opensuse.org/repositories/home:/malcolmlewis:/Python/openSUSE_12.1
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/ deltafoxwhich 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 myspell-french myspell-german aspell aspell-de aspell-en aspell-fr ispell-french ispell-german aspell-spell
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.Code:zypper in tesseract tesseract-traineddata-deu tesseract-traineddata-eng tesseract-traineddata-fra python-gimagereader python-imaging
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.Code:zypper rr deltafox
I then typed the command:
and the application ran.Code:gimagereader
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.