Thursday, August 6, 2009

Activity 9 – Binary Operations

This activity uses histogram manipulation to separate ROIs in binary images and to estimate the areas of cell-like regions or blobs using closing and opening functions.

Shown below is a grayscale of the test image. This test image is then cropped into 12 parts and each subimage is binarized with proper threshold. The threshold value can be obtained using histogram function in GIMP.

Then, each binarized subimage is processed using closing and opening functions. Closing function is the erosion of a dilated image using the same structuring element and opening function is the dilation of an eroded image using the same SE. The SE used in this activity is se1 = [0 1 1 0 ;1 1 1 1;1 1 1 1;0 1 1 0]. The morphological process used is first to open the image then closed it. Opening function allows groups of blobs to be separated from other blobs and to remove smaller blobs (dots). Closing functions allows the filling of holes within blobs. Shown below is the image before morphological operation.



The next of images are obtained after morphological operations.



It can be noticed that the noise (dots) are removed and holes within blobs are filled. Also the edges of the blobs become well recognized. From these set of images, each blob is labeled using BWLABEL. This function labels every connected pixels from 0 - n blobs. Thus, to estimate the mean area of a blob, the areas are tallied and its histogram is plotted. The point where there will be the peak value corresponds to the number of individual cell with that area. This area of the cell will be the highest frequency area because it is dominant in the image.


From the histogram, I took the top two bins of highest frequency. From its range of areas, I calculated the mean and the standard deviation. I chose these top two bins because I don't have the idea what the ideal cell area is so it would be safe to choose these two bins. The range of these two bins are from 475 - 585. Thus the mean is 532.81 square px and the stddev is 18.96. Also I calculated the area of an individual cell and I obtained 536 sq px. The mean estimate is still within comparison range noting the value of the standard deviation.

I give myself 10 points for finishing and understanding the activity.

0 comments:

Post a Comment

Followers