Example 05 - Morphological Operation

advertisement
Sample Question 1
(a)
Morphological filtering is a technique that we perform to an image that has undergone the
process of segmentation. What is the purpose of applying morphological filtering?
[2 points]
(b)
Answer:
To simplify a segmented image so that the process of searching for objects of interest can
be easier.
Perform suitable morphological operation to Image I using the given structuring element
such that it simplifies the segmented object labeled as ‘1’.
0
0
0
0
I 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
1
0
1
0
0
0
0
1
1
1
1
1
0
0
0
0
1
1
0
0
1
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 1 0 
StructuringElement  1 x 1
0 1 0
[8 points]
Answer:
There are holes in the segmented object. Perform CLOSING to close the holes.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0
0 1 1 1 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
Result after dilation
0 0 0 0 0
0 0 0 0 0
0 1 1 1 0
0 1 1 1 1
0 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
Result after erosion
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Sample Question 2
You are given a binary image S (figure 5), which is the result of gray-level segmentation on
image I (figure 4)as shown below. The object pixels in image S are labeled as ‘1’.
Gray-level
Segmentation
Figure 4: Image I
(c)
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
Figure 5: Image S
How many object do you observe visually in image I? If you apply Labeling Algorithm
on image S, how many objects will be detected?
[1 marks]
Answer:
Observe visually - 1object, Labeling algorithm - 5 objects.
(d)
Ideally, the number of object detected by computer should be the same as those detected
visually. Based on your observation on image S, do you think Morphological filtering can
help towards getting the ideal result? Justify your answer.
[3 marks]
Answer:
 Yes. In image S, it is observed that the 4 small objects (surrounding the main
square object) are basically noise.
 In order to get ideal result, all the small objects should be removed before
performing the Labeling Algorithm.
 In this situation, Morphological filtering is useful because it is designed to
remove small objects and close small holes.
(e)
If you were to perform Morphological filtering to achieve the ideal result described in
part (b), what type of operation you would choose and, how the structuring element
should look like? Justify your answer.
[4 marks]
Answer:
Opening (erosion followed by dilation) will be chosen because it is designed to remove
small objects
1 1 1
Structuring element should look like the main object 1 x 1 such that objects of different


1 1 1
structure will be removed and the eroded main-object will be restored back according its
original structure.
(f)
Perform Morphological filtering on image I based on your answer in part (c)
[4 marks]
Answer:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
Result after erosion
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 1 1 1 0
0 1 1 1 0
0 1 1 1 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
Result after dilation
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Sample Question 3
(a)
There are three main classes of segmentation techniques used to find regions that
represent objects or meaningful parts of objects. Name TWO (2) of them.
[2 marks]
Any two of the following: 1. region growing & shrinking, 2. clustering, 3. boundary
detection
(b)
Perform morphological operation OPENING to Image I using the given structuring
element. The segmented object is labeled as ‘1’.
0
0
0
0
I 0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1 1 1
StructuringElement  1 x 1


1 1 1
[8 marks]
Answer:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 1 1 0
0 0 1 1 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
Result after erosion
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
(c)
0
0
0
0
0
0
0
0
0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 0 0 0 0
0 0 0 0 0
Result after dilation
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Based on the result obtained in (b), gives ONE (1) scenario where you may want to apply
the OPENING operation (Give your own example).
[4 marks]
Answer:
When the segmented image has many small objects. For example, in optical character
recognition, the segmented image usually contains one large object (character) and many
small objects (noise)
Download