Hey there!

My outlet to all things related to physics. Enjoy!

Friday, October 14, 2011

A12 – Preprocessing Text

Given a scanned image of a document containing handwritten or printed elements, one can actually apply image processing techniques to extract these desired elements. Specifically, documents with almost unrecognizable letters or words can be processed to make them understandable. In this blog I will be discussing some of the techniques I used in order to process one specific document with both handwritten and printed elements.

Figure 1. Scanned image of a document with handwritten and
printed elements.

Shown in Figure 1 is a demonstration equipment receipt or a demo checklist. I applied image processing techniques to a portion of this document. I started out by selecting an area where both handwritten and printed texts are present. Knowing that the image is tilted, I then used the Fourier Transform of the image to determine its tilt angle. Using some help from Adobe Photoshop CS 3 we can get the difference between the angle made by the vertical axis with respect to the horizontal axis and the angle made by the Fourier Transform with respect to the horizontal axis as well. Figure 2 can help clarify this.


Figure 2. (a) An enhanced image of the Fourier Transform of Figure 2.
(b) The tilt angle of the image.
Using this method, the tilt angle of the image was found to be 1.3 degrees. To "correct" this, we used the Scilab function mogrify. Upon executing this, we obtained the following result:

Figure 3. (a) Grayscale image of the document portion (Note that the tilt is
 not yet corrected.).  (b) " Corrected" image.
Now that we have corrected the tilt, the next thing that we are going to do is to remove the horizontal lines in. In doing this, we are able to isolate the words, thus, helping us understand what is written.




No comments:

Post a Comment