MORFOLOGIA MATEMÁTICA

advertisement
Morphological Image Processing
Getting acquainted with the MATLAB toolbox on Morphological Image Processing
1. Take a look on the MATLAB functions ‘imerode’, ‘imdilate’ ‘imopen’ e ‘imclose’.
2. Load the file ‘abs.mat’. Visualize the images A1, A2, A4, B1, B2 e B4. Guess the
result of
 dilating A1 with the structuring element B1
 dilating A2 with the structuring element B2
 eroding A4 with the structuring element B4
3. Load the file 'morf00.mat' that contains the figure 'A'. Visualize in a single image
window the effect of dilating, eroding, opening and closing with a structuring element
of type ‘box’ de 3 3.
4. Load the file 'letra_a.bmp' e visualize it. Apply the function ‘bwmorph’ with the
options 'thin' and 'skel' repeatedly, showing at each step the process of forming the
skeleton. Note the “spurs” that appear after a number of iterations. Reduce this spur
and visualize the result. Hint: use bwmorph with the option spur.
5. Write a Matlab script that reproduces the algorithm of binary Opening by
reconstruction presented in the classroom. Use this image to test you program.
Programming Assignment for Grading
6. Give a morphological algorithm for converting an 8-connected binary boundary to an
m-connected binary boundary. You may assume that the boundary is fully connected
and that is one pixel thick (problem 9.2 from text book). Hint: consider using hit and
miss a number of times.
7. Write a MATLAB script that reproduces the example shown in the class that
determines the connected components in the image of the chicken breast. (frango.jpg).
Hint: use the MATLAB function ‘bwlabel’ to determine the connected components,
and ‘bwarea’ to compute the area of each connected component.
8. Refer to the image A below and consider as SE a disk B with a proper radius. Sketch
what the sets would look like in the following sequence of operations:
 C=A  B
 D= C  B
 E= D  B
 F= E B
Note that this sequence of operations is simply the opening of A by B, followed by the
closing of that opening by B. You may assume that B is just large enough to enclose
each noise component. If you wish you may write a MATLAB program to validate
your answer. (problem 9.17 from text book)
RQF – September/2009
1
Morphological Image Processing
9. Load the image ‘particulas.jpg’. Write a morphological algorithm that produces from
this input image three output images containing:
 Only the particles touching the boundary of the image,
 Only overlapping particles, and
 Only non overlapping particles.
10. In regard to the image below, available at ‘I.mat’, determine the structuring elements
and the morphological operations that will produce the results shown in (a) to (d).
Note that the corner in (c) and (d) are rounded. Hint: use the MATLAB function
‘strel’ to create your structuring elements. (problem 9.5 from text book)
(a)
RQF – September/2009
(b)
(c)
2
(d)
Download