# Lab - Edge Detection

Computer Vision (CSCI 4220U)

Faculty of Science, UOIT

http://vclab.science.uoit.ca

The goal of this exercise is for you to use the Open CV's built-in Canny Edge Detector to identify pixels that correspond to edges observed in the image.

Secondly, you are asked to color each edge pixel based upon the orientation of the edge passing through it. You can use the color wheel shown below to color the edge pixels.

Recall that it is possible to identify the orientation of an edge based upon $$\frac{\partial I}{\partial x}$$ and $$\frac{\partial I}{\partial y}$$.

You can define the orientation of an edge (passing through a pixel) using the normal vector of that edge. Specifically the orientation can be defined using the angle between the normal and the horizontal as seen below.

So according to the color wheel above, if a horizontal edge passing through a pixel then that pixel will color either Yellow or Purple depending if the normal makes a 90 degrees with horizontal or 270 degrees with the horizontal.

Below you see an image that shows edges colored based upon their orientation. However, this image doesn't use the color scheme proposed here.