Thursday, August 6, 2009

Binary Operations

It is always essential in image processing to specify the region of interest and separate it from the background. The ROI is the selected subset of samples within a given dataset [1]. It is often detached from the background through various techniques. One of these is through the use binary operations which necessitate proper thresholding. However, in the case of an image with several ROI, further processing is still needed in order to account for the overlap in the graylevel distribution between the ROI and the background. This is done by applying the different morphological operations onto the image. Practical uses of all these techniques are area estimation of cells and tracking fingerprint ridges.

In this activity, all the idea and knowledge learned in image processing are integrated to give a best estimate of the area of cells.

The figure below shows the image of scattered punched papers which resemble the cells found in a glass slide. The area estimation is done through the following procedures:

· The image is cut into 13 256 x 256 pixel overlapping subimages.

· Plot the histogram of the subimages and give the best approximation of the threshold value. For this case, the threshold is found ~0.8. This will enable the separation of the ROI from the background.

· Binarize the subimages using “im2bw” command.

· The ROI is enhanced using morphological operations. Specifically, the “opening” operator is used since it is defined as the dilation of the erosion of the images. This will remove the holes inside the cells, clean the isolated pixels and detach nearly touching cells.

· Using “bwlabel” command of Scilab, enclosed contiguous blobs on the binary images are labeled.

· Calculate the area of each blob.



Figure 1. Cropped images of the scattered punched papers.


Figure 2. Enhancement of the images using the "opening" morphological operation.
By using the "opening " operator, the cells are cleaned up in such a way that holes from the enclosures are removed and partially connected blobs are separated. Opening operator is chosen over the closing operator because it dilates the eroded cells. So if there are small interconnections between the cells, the bond is broken and the cells are detached from each other.
Note that this operator is used only after binarizing the images. Proper threshold value was chosen from the histogram of each subimage. An example of the histogram is shown below.

Figure 3. Histogram of the first subimage (uppermost left image from Fig.2)


Figure 4. The corresponding images after using "bwlabel" command.

Once the blobs for each subimages are distinguished, the "bwlabel" command labels each contiguous blob. The image in Figure 3 shows the variation in the graylevel of each blob. It is recommended to use true colors in showing the images in order to clearly see how this command works.

Figure 5. Histogram of the cell area measurements

The histogram plot shown above shows that most of the cell areas for all subimages are in the range of 440-540. The average area of the whole image based from the subimage is ~491 with a standard deviation of 41.

In this activity, I give myself a 10 for meeting the objectives. I would like to thank Winsome Rara for giving useful comments.

1 comment:

  1. To check your result, what is the size of one whole cell?

    ReplyDelete