Project 1: Edge and corner detector

CS 4501 -- Introduction to Computer Vision

Due: Thurs, Feb 16 (11:59 PM)

We recommend using Python for the assignments in this course, because it has high-level libraries for reading images and common array and linear algebra routines. If you are not interested in Python, we recommend Matlab for similar reasons.

We suggest to first get some familiarity with Python or MATLAB by doing some simple task like reading in an image, brightening it by a factor of two, and then showing the brightened image (alternatively, to practice manipulating the different color components, you could set the green and blue channels to zero, and then display the image, to see an only-red version of the image). We also suggest to start by installing Anaconda Python, which has most of the libraries preinstalled.

A few tutorials:

Assignment Overview


Left: an input image. Center: result of Canny edge detection. Right: Result of corner detection.

Your goal for this assignment is to implement a Canny edge detector, and a Harris corner detector, as shown above. For this assignment, and the other assignments, please submit code that you have individually authored. (However, for the final project, you can work in groups).

Clarification Regarding Submission: Make sure to submit an actual Python source code file (a .py file that can be run from the command-line, with a command such as python canny.py). Although you may find it helpful to "experiment" with pieces of Python code in the interactive Python shell (the result of typing 'python' at the command-line), or the Jupyter notebooks, we would like to see a finished Python program that can be run stand-alone in your submission.

Canny edge detector (65%)

Implement the Canny edge detection algorithm, as described in class, and on the Wikipedia article. This consists of four phases: Please run your edge detector on the flower image above, and an image of your choice from Flickr. Experiment with the choice of thresholds T_low and T_high to obtain an edge image that corresponds to human intuition for what are edges. You should find that any strong edge forms a connected (linked) chain of pixels in the output. As a sanity test, you could also use an input containing a few geometric shapes such as white circles and squares on a black background.

Corner detector (35%)

Implement the Harris corner detector, as described in class and on Wikipedia. This has the following steps: Please run your corner detector on the flower image above, and on an image of your choice from Flickr. Experiment with the choice of thresholds to obtain a reasonable number of corners, between say 10 and 100.

Policies

Feel free to collaborate on solving the problem but write your code individually.

Submission

Submit your assignment in a zip file named yourname_project1.zip. Please include your source code as .py files, the input images and results of Canny edge detection, and the input images and results of Harris corner detection. Please also include a readme describing how to run your edge and your corner detector from the command-line.

Finally submit your zip to UVA Collab.