Thursday, August 6, 2009

Activity 10: Preprocessing text

In this activity we set out to clean up a scanned document to make it ready for handwriting recognition. Our main goals were to remove unecessary details, i.e. table lines, and to binarize the result. I first rotated the image such that the horizontal lines were parallel to the x axis. I did this by making sure that the maxima of the FFT of the image formed a perfectly vertical line. I then removed the horizontal lines via a vertical mask over the FFT. I then binarized the image using the im2bw function and a threshold of .38.

As an additional objective, we also sought to detect all occurences of the word "description". I did this using the correlation technique we used in activity 5.

RESULTS



Original image / horizontal lines removed / b&w



Basis for correlation



Result of correlation

The removal of the horizontal lines was quite successful. Even though the regularity of the removal is apparent (sinusoidal erasure), it works when we convert the image to B&W. As for the correlation, it works quite well as long as you take only the maxima into account.

For this activity I give myself an 8/10 since I wasn't able to take advantage of morphological operations in binarizing the image.

No comments:

Post a Comment