Character Recognition Systems

Mohamed Cheriet, Nawwaf Kharma, Cheng-Lin Liu, Ching Suen

Mentioned 2

More on

Mentioned in questions and answers.

I've been trying to learn about Neural Networks for a while now, and I can understand some basic tutorials online. Now i want to develop online handwritten recognition using Neural Network. So i haven't any idea where to start? And i need a very good instruction. In finally i'm java programmer.

What do you suggest I do?

Peter Norvig's Artificial Intelligence: A Modern Approach is a good book on general AI and explains a lot about the basics, and there is a section on Back Propagation neural networks.

To train your neural network you'll need datasets.

There's THE MNIST DATABASE of handwritten digits, or the Pen-Based Recognition of Handwritten Digits Data Set at the UCI Machine Learning Repository

The UCI ML repository has lots of great datasets, many of which would be good to train neural networks. Even if you don't know what they're about you can grab some and see if your ML system can do the classification tasks. Look at Classification tasks with a large number of attributes and instances, although you can try smaller ones too when you start out.

By the way, there are a lot more techniques besides neural networks, including Support Vector Machines, which are popular.

Smart Cropping for Scanned Docs

Recently I took over a preservation project of old books/manuscripts. They are huge in quantity, almost 10,000 pages. I had to scan them manually with a portable scanner as they were not in a condition to be scanned in an automated book scanner.

The real problem shows up when I start editing them in Photoshop. Note that all of them are basically documents (in JPG format) and that there are absolutely no images in those documents. They are in a different language (Oriya) for which I am sure there won't be any OCR software available in near future. (If there is please let me know.)

To make those images (docs) look clean and elegant I have to crop them, position them, increase contrast a bit, clean unnecessary spots with eraser, et cetera. I was able to automate most of these processes in Photoshop, but cropping is the point where I am getting stuck. I can't automate cropping as the software can't recon the presence of text or content in a certain area of that img (doc); it just applies the value given to it for cropping.

I want a solution to automate this cropping process. I have figured out an idea for this, I don't know if it's practical enough to implement and as far as I know there's no software present in market that does this kind of thing.

The possible solution to this: This might be possible if a tool can recognize the presence of text in an image (that's not very critical as all of them are normal document images, no images in them, no patterns just plain rectangles) and crop it out right from the border of those text from each side so it can output a document image without any margin. After this rest of the tasks can be automated using Photoshop such as adding white spaces for margin, tweaking with the contrast and color make it more readable etc.

Here is an album link to the gallery. I can post more sample images if it would be useful - just let me know.

Here is one example from the bigger sample of images available through above link:

one example of a bigger set...

One technique to segment text from the background is the Stroke Width Transform. You'll find several posts here on Stack Overflow about it, including this one:

Stroke Width Transform (SWT) implementation (Java, C#...)

If the text shown in the Wikipedia page is representative of written Oriya, then I'm confident that the SWT (or your customized version of it) will perform well. You may still have to do some manual tweaking after you review an image, but an SWT-based method should do a lot of the work for you.

Although the SWT may not identify every single stroke, it should give you a good estimate of the dimensions of the space occupied by strokes (and characters). The simplest method

A newish algorithm that might work for you is "content-aware resizing" algorithms such as "seam carving," which automatically removes paths of pixels of low information content (e.g. background pixels). Here's a video about seam carving:

There's a seam carving plugin ("liquid resizing") for GIMP:

This blog post reports a plugin for Photoshop:

For an overview of OCR techniques, I recommend the book Character Recogntion Systems by Cheriet, Kharma, Liu, and Suen. The references in that book could keep you busy for quite some time.

Finally, consider joining the Optical Character Recognition group on LinkedIn to post more specific questions. There are academics, researchers, and engineers in the industry who can answer questions in great detail, and you might also be able to make contact via email with researchers in India who are developing OCR for languages similar to Oriya, though they may not have published the software yet.