Thursday, August 7, 2008

General Comments on the handwritten text activity (morphological operations) AP 186

I was delighted to find several of you succeeding in getting the outlines of the handwriting right. I noticed several common mistakes though:

1. Morphological operations work on white blobs. Most of you had the background on white and the handwriting in black. Such image must be bit-inverted (0 becomes 1, 1 becomes 0). So even if you did opening and closing with the intent of fixing the handwriting, the operations opened and closed the background.

2. The choice of structuring element is critical. Most of you simply used a 2x2 struct element even if this was not appropriate. Some of you wisely chose a 4x1 element since most handwriting have vertical elements. I would suggest that if the handwriting is slanted, use a slanted structuring element as well.

Finally, a tip. If the processed handwriting is fat, you might want to use thin to make it one pixel thick.

No comments: