|
| 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 and linking, boundary following, and corner detection. There are often problems with the output of edge detectors that can be addressed with these techniques. |
| Problem 1:
Type of Edges. Give a few examples of each of these types of edges in the Images A and B.
![]()
|
|
Problem 2: 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: Cubic Image Approximation Edge Detection. Implement an edge detection using a Cubic Image Approximation (refer to the hand out of Image Approximation page 165). 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
|
| Problem 4:
Edge Linkging. 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 5: Boundary Edge Following. 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 6:
Corner Detection. 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. Test on Images A and B. |