Starting from:
$35

$29

Project 1: Canny Edge Detection Solution

Instructions




 
This is an individual project. ’Individual’ means each student must hand in their own answers, and each student must write their own code in the homework. It is admissible for students to collaborate in solving problems. To help you actually learn the material, what you write down must be your own work, not copied from any other individual. You must also list the names of students (maximum two) you collaborated with.




 
You must submit your code online on Canvas. We recommend that you can include a README.txt file to help us execute your code correctly. Please place your code and result images into the top level of a single folder named <Pennkey_Project1.zip




 
This handout provides two versions of the code: MATLAB and Python. You are free to select either one of them for this project. A test script will be provided shortly which will call your functions to ensure that they will run inside the grading script.




 
Start early! If you get stuck, please post your questions on Piazza or come to office hours!




Overview




The project focuses on understanding image convolution and edge detection. The final goal of this project is to compute the Canny Edges for any RGB image.




The main code structure is provided in cannyEdge.m or cannyEdge.py file:




E = cannyEdge(I)




 
(INPUT) I: H x W x 3 matrix representing the RGB image, where H, W are the height and width of the input image respectfully.




 
(OUTPUT) E: H x W binary matrix representing the canny edge map, where a ’1’ is an Edge position while a ’0’ is a Non-Edge pixel.




Your task is to implement three basic functions findDerivatives.m/py, nonMaxSup.m/py and edgeLink.m/py which correspond to the steps described in the lecture notes:




 
Apply Gaussian smoothing and compute local edge gradient magnitude as well as orientation.




 
Seek local maximum edge pixel in corresponding orientation.




 
Continue search in the edge orientation of detected edge points.




1 Gradient Computation




Goal Implement Gaussian smoothing, compute magnitude and orientation of derivatives for the image.




[Mag, Magx, Magy, Ori] = findDerivaties(I_gray)




• (INPUT) I_gray: H x W matrix representing the grayscale image.







 
Collect all your source code files and test images into a folder named as <Pennkey_Project1. Zip this folder and submit it to Canvas. Any break in this rule will lead to a failure in the test script. Only submit codes pertaining to your language of implementation. For example: If you choose to do the project in Python, do not submit the MATLAB folder containing the MATLAB starter codes.

More products