|
| NOTE: Problems should be done in MATLAB. Type up your
solutions for each one including: (1) The answer to any questions posed,
(2) any resulting images (include in document), and (3) the name of any
functions you used.
Zip or tar your document with your source code (m-files) into a file called [Lastname_FirstInitial_Lab5.zip/tar] and email it to mcchang@lems.brown.edu with the subject "EN161 Lab5". |
| Overview:
This lab will introduce you to various methods of edge detection. You should use matlabs edge detection program for Problem 2 and write your own edge detector algorithms for problems 3 and 4. |
Data:
|
| Problem 1:
Give a few examples of each of these types of edges in the images A and B.
![]() |
| Problem 2:
Run matlabs edge (edge) detection function over Image A and Image B. Use:
Specifically look for the success of each algorithm with respect to corners, curved edges, noise inclusion/exclusion, etc. Which of the edge types above are most easily detected; which are more difficult. Provide specific examples and images to illustrate your findings. |
| Problem 3:
In this problem you will explore a very simple edge detector. a. Load imageA and smooth it with a Gaussian filter to eliminate noise.
[dy,dx]=gradient(A); c. Look at the magnitude of the gradient image using imshow,
M=sqrt(dx^2+dy^2)
1. Visit every edge pixel in the binary image.
For each one, look at the gradient direction at that point (dy,dx) and
round it to the nearest of the 8 pixel directions.
Submit the thinned and unthinned images. Also try it on image B. |
| Problem 4:
Implement an edge detecting program using a Cubic Image Approximation (from page 165 of edge detection handout given out in class). I have provided the masks k1-k10 in the matlab file k_coef.mat, download it into a matlab directory and type load k_coef to load the masks into your workspace. I recommend using filter2 to apply the masks (don't forget to scale them by the value given below each mask). Hints: You will want to filter the image first to eliminate noise. Also, if your edges are too thick, try reducing the pixel radius. Also, when checking to make sure the first derivative is not zero, you will probably want to say something like: d > gamma
Try it out on Images A and B. Show the resulting edge images.
|