Tesseract: an Open-Source Optical Character Recognition Engine
to get results similar to the older dither utility. See the Netpbm documentation for more details.
If your input images are in a format other than TIFF, you can, of course, substitute the appropriate Netpbm tool (such as jpegtopnm) in the pipeline:
$ jpegtopnm < scanned_image.jpg | \ pamthreshold -threshold=0.8 | pamtopnm | pnmtotiff > result.tif
Netpbm also includes utilities that allow you to clip out portions of an image. Note that most multicolumn formats are very consistent in positioning the columns, which means you can automate the translation of multicolumn text pretty easily as well. For example, if you have a two-column article scanned at 200dpi, you can use The GIMP to locate the x coordinates of the column boundaries. Say the first column starts at about 200 and ends at 700, and the second column starts at 800 and ends at 1200. You could add the following to your processing pipeline:
$ tifftopnm < input.tif | \ pamcut -left 150 -right 750 | ... pnmtotiff > output_left.tif $ tifftopnm < input.tif | \ pamcut -left 750 -right 1250 | ... pnmtotiff > output_right.tif
and automate the extraction of the columns. Place the combination in a shell script with some looping, and you can process a lot of pages very quickly.
Tesseract is a bare-bones OCR engine. The build process is a little quirky, and the engine needs some additional features (such as layout detection), but the core feature, text recognition, is drastically better than anything else I've tried from the Open Source community. It is reasonably easy to get excellent recognition rates using nothing more than a scanner and some image tools, such as The GIMP and Netpbm.
The Tesseract team currently is working to integrate features such as layout analysis and a GUI interface. It looks as if a commercial-quality open-source OCR solution is finally on the horizon.
Resources
Tesseract: code.google.com/p/tesseract-ocr
The GIMP: www.gimp.org
Sane: www.sane-project.org
Netpbm: netpbm.sourceforge.net
Netpbm Docs: netpbm.sourceforge.net/doc/directory.html
Anthony Kay has been a systems programmer, programming instructor, technical writer and application developer. He is currently a computer science graduate student at the University of Oregon in Eugene, Oregon.
- « first
- ‹ previous
- 1
- 2
- 3
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Designing Electronics with Linux
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Build a Skype Server for Your Home Phone System
- Validate an E-Mail Address with PHP, the Right Way
- Why Python?
- A Topic for Discussion - Open Source Feature-Richness?
- Tech Tip: Really Simple HTTP Server with Python
- Great
2 hours 18 min ago - Reply to comment | Linux Journal
2 hours 26 min ago - Understanding the Linux Kernel
4 hours 41 min ago - General
7 hours 10 min ago - Kernel Problem
17 hours 13 min ago - BASH script to log IPs on public web server
21 hours 40 min ago - DynDNS
1 day 1 hour ago - Reply to comment | Linux Journal
1 day 1 hour ago - All the articles you talked
1 day 4 hours ago - All the articles you talked
1 day 4 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
The online application Free
The online application Free OCR allows transforming the contents of an image file in a text output format. Though Microsoft Word is not supported currently.
OCR softwares are everywhere
OCR softwares are everywhere nowadays. I prefer online ones they don't need installation and most of them are free, like this one: Free OCR.
Lengthy install?
How to install? Takes about 3 seconds...
apt-get install tesseract-ocrTesseract works really well!
I've been using Tesseract
I've been using Tesseract OCR with a C# program I have made to batch OCR hundreds of documents a server we run. Considering it costs nothing, I am very impressed with the accuracy. It is far superior to GOCR which need the image to have the grey scale adjusted before anything can be done.
______________________
Submited by : Bajar Libros
Missing links to the images used in the test
I can't find the links to the images used in the test. It seems very strange to me that Ocrad was unable to recognize even a single character on some of them.
What version of Ocrad did you use? Where the characters at least 20 pixels high as requires the manual of Ocrad? If they were smaller, did you use the "--scale" option of Ocrad? Did you even RTFM?
If you want a good review of free OCR software better see this one for example.
gscan2pdf
Why not try gscan2pdf, which has support for tesseract?
http://gscan2pdf.sourceforge.net/
The OCR data is embedded into the pdf as an annotation. It can be indexed with beagle, for example, and viewed with Adobe's pdf reader. Support for annotations is coming to the free pdf readers as well, I believe.
gscan2pdf also supports unpaper, and I find it an excellent all-around tool for my scanner.
isight?
would be great if someone could code a program that could take my isight or any usb cam to directly send image to the above mentioned program and convert it into text format, so all i would have to do is hold my text book up against my webcam and get it on my computer. Cheers!
International characters?
I've using tesseract for a while and it works great, but it has a major flaw that I haven't been able to overcome, I can't make it recognize international characters (i.e. á,é,í,ó,ú,ñ,Ñ), for example, it changes ó for 6.
Is there a way to make it support other than standard ASCII characters?
:)
open source rules, seriously.
Great work, it seems like a lengthy installation however.
Lengthy Installation
You can OCR documents for free using Tesseract at A Billion Billion - Free OCR for Everyone by just uploading your TIFF files and clicking OCR. No installation this way.
Dead Link
The site at abillionbillion.com no longer exists. There is another site, free-ocr.com, that allows one to upload scanned images in a variety of graphics file formats, but it is limited to a maximum of 10 images per hour and there's an upper size limit on the images. The site is supported by ads and donations.
I'm impressed!
Wow - it did a really good job, first try out of the box. I built it without turning off TIFF support, and used tesseract-1.04b. I put it in /usr/local/bin. At first I got this:
Error: Unable to open unicharset!
This was fixed by doing this:
$ sudo ln -s /usr/local/bin/tessdata /usr/local/share/tessdata
Then it complained about not recognizing the file format (which was TIFF with no compression). I renamed the file from "text2.tiff" to "text2.tif" and then it was happy. That's just silly, if you ask me.
This is all on Ubuntu Feisty. My original scan was 300 dpi, and I ran it through the GIMP the same as in the article.
Very nice!
-Pete