Introduction to Computer Vision 2013
Assignment 2: Canny edge detector
Due date: October 31st 2013
The goal of the assignment is to implement "Canny edge detector", i.e. the classical computer vision method for extracting high-contrast image edges (see related material in Lecture 3 slides)
Detailed instructions:
-
Download image lena.jpg and another test image of your choice to be used for demonstrating results in this assignment.
-
For the test image I compute image gradients Ix,Iy using Gaussian derivative filters. Use the separability of the Guassian filter and its derivatives to compute image derivatives using 1-dimensional filters. Try a few different values of standard deviation for the Gaussian filter. Compute image gradient magnitude from Ix,Iy and threshold the result to construct an edge mask. Hints: you may find useful the following Matlab functions: 'imfilter', 'filter2', 'conv2' (use e.g. 'help imfilter' to look up the functionality) . The result of this step can look similar to the images below:
-
Implement non-maximum suppression by deciding whether a point is a local maximum of the interpolated gradient magnitude in the direction of the gradient. Show the local maxima without thresholding and with the threshold used in step (2). Hint: The result of non-maximum suppression without thresholding can look similar to the following:
-
Implement thresholding by hysteresis, by (a) marking as edge point the local maxima with gradient magnitude above some high threshold H, and (b) iteratively marking their neighbors as edge points if they are local maxima with gradient magnitude above some low threshold L<H. Show the results for values of H equal to that used in steps (2) and (3) and some appropriate values of L.
-
Write a report briefly explaining what you did and illustrating results of each steps on two (or more) images and for a few different parameter settings.
What to hand in
You should prepare a (very brief) report describing your work including the outputs of steps 1., 2., 3. and 4.
Instructions for formatting and handing-in assignments:
-
At the top of the first page of your report include (i) your name, (ii) date, (iii) the assignment number and (iv) the assignment title.
-
The report should be a single pdf file and should be named using the following format: A#_lastname_firstname.pdf, where you replace # with the assignment number and “firstname” and “lastname” with your name, e.g. A2_Ponce_Jean.pdf.
-
Zip your code into a single zip file using the same naming convention as above, e.g. A2_Ponce_Jean.zip. We do not intend to run your code, but we may look at it and try to run it if your results look wrong.
Send the pdf file of your report and the zipped code in two separate files to Jean Ponce <Jean.Ponce@ens.fr>.
Helpful resources