Welcome!

Linux Containers Authors: Liz McMillan, Yeshim Deniz, Elizabeth White, Mehdi Daoudi, XebiaLabs Blog

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.

@ThingsExpo Stories
SYS-CON Events announced today that Massive Networks will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Massive Networks mission is simple. To help your business operate seamlessly with fast, reliable, and secure internet and network solutions. Improve your customer's experience with outstanding connections to your cloud.
SYS-CON Events announced today that CAST Software will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution and join Akvelon expert and IoT industry leader, Sergey Grebnov, in his session at @ThingsExpo, for an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.
Because IoT devices are deployed in mission-critical environments more than ever before, it’s increasingly imperative they be truly smart. IoT sensors simply stockpiling data isn’t useful. IoT must be artificially and naturally intelligent in order to provide more value In his session at @ThingsExpo, John Crupi, Vice President and Engineering System Architect at Greenwave Systems, will discuss how IoT artificial intelligence (AI) can be carried out via edge analytics and machine learning techn...
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
In his session at @ThingsExpo, Arvind Radhakrishnen discussed how IoT offers new business models in banking and financial services organizations with the capability to revolutionize products, payments, channels, business processes and asset management built on strong architectural foundation. The following topics were covered: How IoT stands to impact various business parameters including customer experience, cost and risk management within BFS organizations.
SYS-CON Events announced today that CA Technologies has been named "Platinum Sponsor" of SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business - from apparel to energy - is being rewritten by software. From planning to development to management to security, CA creates software that fuels transformation for companies in the applic...
SYS-CON Events announced today that Pulzze Systems will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Pulzze Systems Inc, provides the software product "The Interactor" that uniquely simplifies building IoT, Web and Smart Enterprise Solutions. It is a Silicon Valley startup funded by US government agencies, NSF and DHS to bring innovative solutions to market.
From 2013, NTT Communications has been providing cPaaS service, SkyWay. Its customer’s expectations for leveraging WebRTC technology are not only typical real-time communication use cases such as Web conference, remote education, but also IoT use cases such as remote camera monitoring, smart-glass, and robotic. Because of this, NTT Communications has numerous IoT business use-cases that its customers are developing on top of PaaS. WebRTC will lead IoT businesses to be more innovative and address...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, will introduce two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a...
When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
SYS-CON Events announced today that CA Technologies has been named “Platinum Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business – from apparel to energy – is being rewritten by software. From planning to development to management to security, CA creates software that fuels transformation for companies in the applic...
In his session at @ThingsExpo, Dr. Robert Cohen, an economist and senior fellow at the Economic Strategy Institute, presented the findings of a series of six detailed case studies of how large corporations are implementing IoT. The session explored how IoT has improved their economic performance, had major impacts on business models and resulted in impressive ROIs. The companies covered span manufacturing and services firms. He also explored servicification, how manufacturing firms shift from se...
SYS-CON Events announced today that Elastifile will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Elastifile Cloud File System (ECFS) is software-defined data infrastructure designed for seamless and efficient management of dynamic workloads across heterogeneous environments. Elastifile provides the architecture needed to optimize your hybrid cloud environment, by facilitating efficient...
SYS-CON Events announced today that Golden Gate University will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Since 1901, non-profit Golden Gate University (GGU) has been helping adults achieve their professional goals by providing high quality, practice-based undergraduate and graduate educational programs in law, taxation, business and related professions. Many of its courses are taug...
Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...
When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
WebRTC is the future of browser-to-browser communications, and continues to make inroads into the traditional, difficult, plug-in web communications world. The 6th WebRTC Summit continues our tradition of delivering the latest and greatest presentations within the world of WebRTC. Topics include voice calling, video chat, P2P file sharing, and use cases that have already leveraged the power and convenience of WebRTC.
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics ...
SYS-CON Events announced today that Secure Channels, a cybersecurity firm, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Secure Channels, Inc. offers several products and solutions to its many clients, helping them protect critical data from being compromised and access to computer networks from the unauthorized. The company develops comprehensive data encryption security strategie...