Thursday, August 6, 2009

Activity 9: Binary Operation

For this activity, we are given an image consisting of circular objects which may be thought of as cells. The objective is to find the average area of the cell. One approach is to count it manually. This is feasible for small image but definitely a problem for real world data processing. The best way is to program it, however one problem of this approach is that binarized image may not be clean. The presence of those tiny white dots may lead to incorrect area estimation.


Figure 1. Image to be processed.

To solve this issue, I used the morphological operation called opening with a small circle (with radius less than the radius of the cells) as structuring element. This is just erosion followed by dilation. The figure below shows how opening and its counterpart closing works. (Image taken from http://ikpe1101.ikp.kfa-juelich.de/briefbook_data_analysis/node178.html)


Figure 2. Demonstration of the opening and closing operation.

Below are the sub-images of figure 1 each having a dimension 256x256.




Figure 3. Sub-images from figure 1.

The sub-images in figure 3 are binarized so that opening can be applied. After bwlabel was used to tag each blob. Finally, the area of each blob are tallied.




Figure 4. Sub-images after labeling. For visual clarity, jet colormap is used.

The result of the histogram is as follows.


Figure 5. Histogram of area of the blobs.

Upon removal of the outliers (i.e. area>600 and area<300), a value of 487 for the mean area was computed with standard deviation of 59. The histogram in figure 5 corresponds to this result.

For this activity, I'll give myself a 10 for completing the activity and producing satisfactory result.

1 comment: