Thursday, September 23, 2010

A9 - Morphological Operations

Triangle(left) Square(right)






Square Annulus(left) Cross(right)






For this activity, I give myself a grade of 15 for correctly predicting the results of the morphological operation.

A8 - Enhancement in the Frequency Domain

Convolution Theorem

The following are the Fourier Transforms of different images.

Two dots:


Two circles with increasing radius:


Two squares with increasing length:


A gaussian:


For this activity, I give myself a grade of 5 for trying and for learning the lesson as a concept.

A10 - Binary Operations

The aim in this exercise is to simulate the process in medical imaging wherein the size of normal cells are measured using image processing and this is used to differentiate cancer cells which are bigger.

The first step was to cut up the image into blocks. Two are shown here as examples.


Regions of interest (ROIs) can be segmented from the background by binarizing. This is done by getting the optimum threshold which in this case is 0.8.


The image is then further cleaned using a closing operator (which is a dilation followed by an erosion) and an opening operator to separate blobs (an erosion followed by a dilation).


Then to remove the areas which are too big and too small, I set a window between 500-600 pixels that will be accepted as a blob.


The best estimate for the cell area is then found to be 536.85714 +/- 14.675915.

Using this window, we are then able to filter out the normal sized cells in the image below at the left.


For this activity, I give myself a grade of 15 for doing my best, putting an overlap in the images, and learning how to use block processing.

A11 - Playing Notes by Image Processing

The image below is the score of twinkle Twinkle Little Star.


Using correlation of an image of a quarter note and the score, we can get an image where the quarter notes light up.


Using a threshold wherein only the values between 0.9-1 light up, we get the locations of the quarter notes only, without the half notes or the G-clef or the staff.


Using the same method with an image of a half note instead, the desired results are not obtained because the quarter notes light up strongly, even more so than the actual half notes themselves. I attribute this to the similarity of the shapes of these two notes.


For this activity, I give myself a grade of 5 for not being able to differentiate the half notes and progress to the other stages of the activity.

A12 - Color Camera Processing

White balancing ensures that the colors in a digital image are properly rendered. The following images depict the same scene imaged using different white balancing conditions. The worst rendering is that which assumes a Tungsten light source.




In this activity, two methods for white balancing the image with the Tungsten setting are tested, the first is the White Patch Algorithm where the R, G, and B values of a white patch in this image is used as a factor to divide the respective channels. the result is shown below in the left. We observe that the colors are now correctly rendered. The image on the right on the other hand is white balanced using the Gray World Algorithm that doe not need a white patch in the image because the factor used to divide is instead the average value of in the three channels. We see that the image has colors that are saturated and the image is too bright.



We now compare the methods with an image of different red objects.



We see that the white patch algorithm (left) renders the colors correctly whereas the gray world algorithm results to an image which is too bright. (right)



I think that the better method to use is the white patch algorithm because it renders the colors correctly and without saturation.

For this activity, I give myself a grade of 10 for being able to implement the activity correctly. I would also like to acknowledge BA Racoma for letting me borrow his pictures since my camera has no white balance settings.