Welcome!

Linux Containers Authors: Elizabeth White, Liz McMillan, Yeshim Deniz, Zakia Bouachraoui, Pat Romanski

Related Topics: Linux Containers

Linux Containers: Article

Two OCR packages for Linux compared

Joe Barr looks at two applications that could make document-management a snap for SOHOs

(LinuxWorld) — Linux is everywhere you look, from mainframes to handhelds to servers to desktops. One place where its growth has been something less-than-spectacular is in SOHO (small office/home office) use. Now that full-featured office suites are available for Linux, more SOHOs than ever are beginning to migrate from Windows to Linux. However, SOHO users often require more than just an office suite; they need accounting software for the books and payroll, they need fax capabilities (see Resources for these sorts of things), and sometimes they need something a bit more exotic. Like OCR (Optical Character Recognition), for example.

In the legal and medical fields, document management is a very big deal. In modern office environments, OCR often plays a key role in solving that problem. Because OCR for Linux is one area I don't hear or read a lot about, I decided to do some digging and see what I could find. This week, I'll tell you about two solutions I found: one from the free-software camp and one proprietary application.

Kooka & Gocr

Let's start with free. The free-software solution is actually a combination of two projects: Kooka and Gocr. Kooka is a KDE application that's part of the kdegraphics package. It provides a front end for SANE-access to your scanner, and it calls Gocr for its OCR engine.

Those of you unfamiliar with the recent advances in compatibility between KDE and GNOME apps — and between competing distributions, as well — might think that getting Kooka and Gocr cooperating on my Red Hat 8.0 GNOME desktop would be a chore. Not so. It was as easy as falling off a log file.

First I ran up2date kooka. A little later on, I would have to run up2date kdebase as well, but I didn't know that yet. It's required in order to dump Gocr's ASCII-text output into Kate, a KDE text-editor.

When I tried up2date gocr, it wasn't found. No problem. I downloaded an RPM binary for Mandrake Cooker from rpmfind.net and installed it manually with rpm -Uvh gocr-0.37-2mdk.i586.rpm.

The up2date kooka process took care of everything, including adding Kooka to the Red Hat menu. I found Kooka under Extras -> Graphics, described simply as "Scan & OCR Program." Because my HP 5200C scanner had previously been configured for SANE, I was ready to go immediately.

I placed a recent mailing from ATT in the scanner and set up the scanner in Lineart mode with a resolution of 300dpi. Then I clicked the "Preview Scan" button. The HP 5200C woke up from its long slumber, whirred and clicked a bit, then made a fast pass under the letter. The preview window showed that it was seeing the letter and had it properly aligned. Next, I clicked the "Final Scan" button. When the final scan was complete, I saved the scanned image in PNG format. At this point, Kooka looked as you see in the image below:

Kooka Scan/OCR
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

From the toolbar across the top of the Kooka GUI, I clicked on the "OCR Image" icon. This brought up a sub-window explaining that Kooka calls Gocr for OCR. The window also allows you to modify the path to the Gocr executable and to adjust gray level, dust size and space width. I left them all at their default values and clicked on the Start OCR button. It took about 13 seconds to OCR the image, then a two-paned window appeared. Neither pane seemed to have much readable text in it. A button on the window offered to load the output in Kate (the aforementioned editor), so I clicked it. That produced the window you see below. As you can see, several characters were either not recognized or not recognized correctly, but I would judge the quality of the OCR as decent to good, especially from a relatively low-resolution image.

Kate edit of OCR'd image
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

OCR Shop

Now let's look at OCR Shop from Vividata. I filled out a brief registration form and agreed to the license terms to download a free 30-day evaluation copy of OCR Shop and have a license key e-mailed to me. I also downloaded a copy of the OCR Shop user manual in PDF format.

Just like the free-software solution, OCR Shop can handle both the scanning and the OCR. Unfortunately, my scanner was not one of those supported. No problem. I simply used the image file created and saved by Kooka. When the downloads were finished, I untarred the OCR Shop download and entered the vivadata_linux_4.61 directory created by tar. As root, I entered ./installer. Then I copied and pasted the license-key information from the e-mail into the appropriate windowpane when asked for it. At that point, I was good to go.

Starting OCR Shop (by entering /usr/vividata/bin/ocrshop) produced the main window you see below. It's small, compact, and loaded with things to tune and tweak. The options window covers everything from language to user dictionaries to proofing-editor setup. Speaking of editors, I added a new one to the default list, eschewing both vi and emacs so that I could use gedit, which is the one I usually write with. You can also choose recognition options and select the format (from a very long list of word-processing file types) in which you want the output produced. Vividata's Web site, however, points out that the Linux version of OCR Shop is limited to ASCII-formatting of output. It allows you to select other formats, but this just names the file with an .ami extension and adds strange statements to the text.

OCR Shop main menu
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

To start OCR on the previously scanned image, I clicked "Auto Recognize" and selected "File" as the input source, "Whole Page" as the area to recognize, entered the file name (kscan_0001.png) as the document name and then clicked "Start Recognition." That produced a file-selection window dialog. I located and selected the PNG image created by Kooka, then I highlighted it in the selected file-pane and clicked OK. I'm not sure why I needed to enter the file name and select it; perhaps I did something wrong along the way. In any case, clicking OK resulted in the gedit window containing the OCR output that you see below.

OCR Shop proof-editing
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

The recognition was done so much more quickly with OCR Shop than with Kooka/Gocr that I initially thought I had broken something. In well under two seconds, the image had been fully scanned, the output had been formatted and the proofing editor had started with the output in place. My guess is that the actual recognition was done in one second. I was very impressed.

After inspecting the output from OCR Shop, I was even more impressed. Gocr had not recognized symbols such as the dollar sign, percent sign and asterisk; made a couple of errors in spacing between words; and misrecognized very similar characters, such as reading the lower-case letter "L" as a capital "I". However, I could find nothing incorrect in OCR Shop's output. Not a single error.

Don't get me wrong; I'm a big fan of open source and believe that, in the end, it will become the dominant genre in many areas (read: operating systems, for sure). I am not bad-mouthing Gocr in the least when I point out that OCR Shop is clearly superior in terms of speed and accuracy.

The choice is yours

Of these two choices, which one would be right for your OCR needs? Depending on who you are and how you'd use the software, the answer differs.

Kooka/Gocr is the choice for me; harsh economic reality makes it so. If it weren't for free software, I would have no OCR capability at all. While Vividata's OCR Shop is clearly the performance winner, it is pricey. Corporate pricing for the desktop version starts at $1,495. If you want an annual maintenance contract with that license, that's another $299. OCR Shop is based on ScanSoft's award-winning OmniPage engine. A quick check on the ScanSoft Web site shows OmniPage Pro (for Windows) on sale for $599. For serious use where accuracy is paramount, then OCR Shop is the clear choice.

I spoke briefly with Radcliffe Goddard, national sales director for Vividata, to see what I could learn about the future of OCR Shop for Linux. Although she did not have the actual numbers at hand, she did say that most Vividata customers are running Linux. They are hard at work on new development work in OCR, though the direction seems to be towards industrial-strength server applications rather than the desktop usage expected in the SOHO market. OCR Shop XTR, for example, is available only in a CLI configuration, and it offers even greater power and more of everything.

OCR is definitely an area in which I have a lot to learn. Have I missed other OCR solutions available for Linux? I'm aware of CLARA, but what else is out there? Which way would you go if your choice was limited to the two solutions covered here today? Let me know in the forum or by e-mail if you prefer.

More Stories By Joe Barr

Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.

Comments (3) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
LjL 03/26/04 01:26:50 PM EST

There is ocrad: http://www.gnu.org/software/ocrad/ocrad.html

dkite 10/05/03 10:50:35 AM EDT

http://www.suse.de/us/company/press/press_releases/archive03/82.html says that suse linux includes a commercial ocr, kadmos. I believe that it uses kooka, with kadmos backend.

Haven't tried it. There was a licensing change in kooka a while back to allow this.

Derek

gilkyboy 10/04/03 04:44:06 PM EDT

One error: en joying. it added an extra space.

IoT & Smart Cities Stories
Early Bird Registration Discount Expires on August 31, 2018 Conference Registration Link ▸ HERE. Pick from all 200 sessions in all 10 tracks, plus 22 Keynotes & General Sessions! Lunch is served two days. EXPIRES AUGUST 31, 2018. Ticket prices: ($1,295-Aug 31) ($1,495-Oct 31) ($1,995-Nov 12) ($2,500-Walk-in)
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...