In this activity, we make use of the image below:
And determine the average size of the punched holes. First, we segment the image into a number of parts, which in my case was 9, and we set aside one of those images. I used the image below:
The image is used to determine the saturation level appropriate for the whole image in order to binarize the image and to be able to apply the closing operator. The closing operator works by first eroding the image, then dilating it with a structural element. The structural element I used was
which was a binarized cropped image of a punched hole from the image. This allowed the punched holes to somehow “normalize” to their proper size especially if the image does not seem to form a circle, and if possible, allow sufficiently close holes to separate themselves from each other. It was found that the image had an an average hole size of 512, and thus the code is now useable for the other cropped images. By using bwlabel to label the circles, the area of each circle in an image can be computed. The obtained values are tabulated below:
The histogram is plotted below:
The extremely large values can be attributed to the large accumulation of holes which unfortunately was not resolved by the closing operator. It is difficult to resolve overlapping holes since they sometimes do not exhibit a clear border. By limiting the allowable areas to 400 < x < 600 which is the realistic range of areas for a hole, the average was found to be 504 (503.904762).
I will give myself a grade of 9/10 for being able to completely accomplish all the tasks in this exercise. The reduced grade is for the somewhat large area values resulting from my processing, which I feel could be much better. Again, I would like to thank Earl for the discussions and Gilbert for his help in making a histogram for the areas.
Activity 19: Restoration of blurred image
15 years ago
No comments:
Post a Comment