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.

Activity 12: Color image segmentation

For this activity we try to distinguish ROI's based on their color hues. By changing our color coordinates such that we separate value into an independent variable, we are left with a 2D color map that disregards brightness. With value aside we may now distinguish objects based on color alone.

We achieved the actual differentiation via 2 ways: parametric and non-parametric. In the parametric method, we assume that the color distribution of our object is a Gaussian curve. It is parametric in that we may adjust the standard deviation of the spread to be more or less tolerant. In the non-parametric method, we use the objects actual color distribution and we use the resulting curve for back projection.

RESULTS

Original Image




http://www.missouriplants.com/Yellowopp/Helianthus_divaricatus_flowers.jpg

Parametric approach



Non-parametric approach



It seems that the assumption of a Gaussian distribution of colors results in the manifestation of the white noise on the ROI. This is probably a reflection of the normal distribution of noise on the original image. When we remove this assumption, we get a much more solid and accurate ROI since we use prior knowledge of the objects color distribution. I also observed in my peer's (Sison) work that this method is much more effective in differentiating adjacent colors (e.g. orange and red).

I give myself a 10/10 because I was able to execute the procedure completely and efficiently.