Thursday, August 6, 2009

Activity 9 Binary Operations

In image processing it is often more efficient if we are able to separate our region of interest (ROI) from the rest of the image. The simplest way of doing this is by binarizing the image using a threshold. But even in binarized images having multiple ROIs offers some problems in the analysis. Overlaps among ROIs or noise introduced by insufficient thresholding would hinder the analysis of the image. Such problems can be addressed using different morphological operators, such us those we explored in the previous activity. The opening operator can be used to separate ROIs that overlap while the closing operator is used to fill in holes within the ROI. In this activity we make us of different morphological operations in improving an image of multiple disks/circles for area estimation.

To do the opening operation we first erode the image then dilate it. This would have an effect of separating objects that were initially adjacent or slightly overlapping. On the other hand the closing operation first erodes the image then dilates its. The effect of this operation would be to fill in holes of solid objects.


Figure 1. Original gray-scale image of disks.

Our image is a gray-scale ensemble of circular disks with some that are overlapping (figure 1). In this activity we aim to estimate the area of a single disk by taking the mean and standard deviation of the measured areas. Our first step is to cut the image into smaller images to make it more manageable for Scilab. We cut the image in way such that the slices overlap, this increases our sampling and prevents loss of information. Next we binarize each slice to exclude the background and highlight the disks. Then we do opening and closing operations to separate overlapping disks and also remove the noise left after binarizing. The structuring element I used is also a circle but is much smaller compared to those in the image. Finally for each slice we label each white area using the function bwlabel() and then measure its area and store the information. The results for each step we did are shown in figure 2.


Figure 2. From left to right: a slice of the image, a binarized version of the slice,
image after morphological operations, and the gray-scale labeled slice.

After we have completed the area measurements we now express our results in the form of a histogram (figure 3 left). Looking at the histogram we see that there are area measurements that are extremely large or small. Intuitively we know that this are not correct measurements and are mainly due to disks that were not properly separated or those that were cut in when we sliced the image. These measurements are outliers and we can discard them when we calculate the mean and standard deviation of the area. Another histogram is shown on the right side of figure 3 excluding these outliers.


Figure 3. (Left) Histogram of all the measured areas and
(Right) histogram of the measured areas excluding the outliers.

We know calculate the mean and the standard deviation of the measured areas excluding the outliers. Doing so we obtain a value of 501.8585 for the mean and 70.24116 for the standard deviation. These values are well within the expected value since the disks from the raw image have a radius ranging from 12 to 14 pixels. The mean area is the best estimate we obtained for the area of the disks whereas the standard deviation provides the range at which we can consider the areas equal or the objects the same. That is the area of the disks is 501.8585 ± 70.24116.

I will give myself a 10 in this activity. It was difficult but I think the results I obtained were accurate enough.

No comments:

Post a Comment