Saturday, August 6, 2011

Activity 10 - Binary Operations


In this activity, we were taught to use opening and closing operations in binary. These operations are simple. Closing operation is simply taking erosion of the dilation of the image. In this case, the object of interest becomes the dark part while the white part is the background. Opposite of closing operation is the opening operation wherein the object becomes the white and the background is the dark part. Figure 1 shows this difference between the two.
Figure 1. Closing and Opening operation
That was not the only activity that was given to us. It is to estimate the area of the circles in figure 2(a). Figure 2(b) is the cropped version of figure 2(a). The cropped version coincide in the 2nd & 3rd, 5th & 6th, 8th & 9th, and 11th & 12th image. In this part, the use of closing or opening operation were used to isolate the circles seen in the image.
Figure 2. (a)Original image and (b) cropped image using paint.

Figure 3 shows the cropped images that were cleaned with the use of opening operation. It can be observed that some circles are not of the same size as the others. This is due to the conversion used in im2bw function.
Figure 3. Cleaned cropped image with the use of opening operator
Table 1 shows the estimate area of the circles. In counting the number of pixels of the circles, the function bwlabel was used. This function simply tag the objects with increasing numbers. If the objects have similar sizes, they have the same tag.

Table 1.Estimated area of a circle
Area (in pixel)        445      
Finally, the last part of the activity is to detect the enlarged circles seen in figure 4(a). The processed image with the use of opening operator is seen in figure 4(b). In detecting the enlarged circle, the same method were used as above and the area were obtained in pixel. It can be observed that the area of the enlarged circles are smaller than that of the overlapping circles and larger than that of a single circle. Then the final image as shown by figure 5(b) is the five enlarged circles that are seen in the original image.
Figure 4. (a) Original image and (b) processed image with the use of opening operator

Figure 5. (a) Original image and (b) extraction of the enlarged circles


I guess this is all. This is due last Thursday, 4 August 2011. I am late, I know. This is due to my laptop who is slowly dying. I can't work with it anymore. Anyway, I will give myself a score of 8 because of my late submission and my mistake in making the other sub-images a clean image. There are images that did not locate any circles. The mistake I made was the threshold used for subimage 1 was carried out to the rest of the subimages, which is wrong.

Thank you for your time.

No comments:

Post a Comment