|
| 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_Lab6.zip/tar] and email it to mcchang@lems.brown.edu with the subject "EN161 Lab6". |
| Overview:
This lab addresses some of the finer points of edge detection. There are often problems with the output of edge detectors that can be addressed with these techniques. |
Data:
|
| Problem 1:
Perform dual threshold edge linking using your edge detector from lab 5. a. At the stage in which you threshold the gradient magnitude image,
create two images, one using a high threshold Th and another using
a low threshold Tl.
The effect should be to fill in gaps in contours that are created by setting the threshold too high. Test on Images A and B. |
| Problem 2:
In this problem you will implement a boundary following algorithm. a. Once again start with the gradient of an image (magnitide and direction).
Test on Images A and B.
|
| Problem 3:
One major problem with edge detectors is that they don't handle corners very well. We can detect corners in an image using the following algorithm: a. Smooth the image and take the gradient (Ax,Ay).
[ Sum(Ax^2) Sum(AxAy) ]
Where the sums are taken over a square neighborhood of size 2*N+1, i.e. sum(sum(Ax(i-N:i+N,j-N:j+N).^2)) c. The eigenvalues of this matrix represent the magnitude of the two gradient directions. If both are large, then it is likely a corner. Threshold the smaller eigenvalue and store the value and location in a list. In MATLAB: eigenvalues = eig(M); d. Take the final list and sort it. Starting from the top,
eliminate all points below that ocupy the same neighborhood. This
will ensure detection of the local maximum.
Use this method to fill in the missing corners of an edge image by checking
the ends of edge segments for a nearby corner and linking them. Submit
the images before and after this correction.
|