CS 7321 Winter 1998

Character Recognition Problem

Solutions by Ying


How I solved it

I think I pretty much did it very manually.. not physically coloring in those pixels, but - pretty much, created some of the structuring elements which I think that would work better for this particular image.

First I thresholded the image so that its pretty decent and not too thin. I didn't want to smooth it out using some of the morphing functions because it seems like there is not enought pixels for this image to do so. (and the result looked a little bit funny as well - maybe I didn't find the right ones). And, if I thicken the image, the holes in 'e' or 'a' gets closed. Basically, I crop a few samples from the image, cleaned it a little bit, and bwmorph it to get the thined version, then erode the image with the structural element. From that, I will know the point at which the image match, thus proceed to color it.

For some of the characters, I tried the suggestion from the class to help me eliminate some of the unwanted matches. That is, to remove out parts that the erosion will get picked up (such as i within an l).


Assumption and Weaknesses:

There is many assumptions that I made for this program. For one thing, I am given the orientation of my image, so that I didn't have to worry about rotating my structuring element, or in the case of the rotated image, the maximum amount of degrees to check. I guess, the way that I made the program work was pretty much a taylored solution. Thus, if the program is to work for other similar images, it might not work as well. Things like a given clean image was assumed - therefore there was no noise removal.

Overall, I think my program is really weak. In that, I pretty much hand picked the structual element that matches exactly to this particular image (therefore the particular threshold). But, to an extent, I think that for image of constant font, and scale, and orientation, perhaps this might work well.


Possible Future Work:

can't think well right now - but - definitly should figure out a way to make it a little more automatic, and less adjustment on the programmer's part.. I think, I probably have forgotten something important.


Original thresholded image
All using the same threshold value: index > 170
& Resulted image

Image 1

Image 1


Image 2

Image 2


Image 3

Image 2



A Closer look at the rotation...
Image a_rotate
Image e_rotate
Image i_rotate
Image o_rotate
Image u_rotate

Source Code: