Computer Vision
• Edge/Corner Detection
Due: September 20
Code
Canny Edge Detector
- First, we construct a 2D Gaussian distribution from user specified parameters (σ,width). We take the first derivative of this with respect each axis independently. This is then convolved with the input image to produce our rough edge estimate (here σ=8, width=1.2) :
- Next, we construct a thin-lined image using the method of nonmaximum suppression. This works by visiting pixels along the direction of the gradient and keeping only those that are a maximum
- Finally, we perform a hysteresis thresholding method to intelligently cull chains of pixels that are below some thresholding. This is implemented using a stack structure that pops all neighborhood pixels of chained pixels, iterates through the stack, and rejects pixels (and therefore chains) based on user specified parameters (here those are Th=60, Tl=20). A visitation map is kept in order to more efficiently search the data
Here are some additional results
| Info |
Gradient (x) |
Gradient(y) |
Gradient (magnitude) |
Nonmaximum Supp. |
Final |
President Sarkozy
σ=8
width=1.6
Th=45
Tl=18 |
|
|
|
|
|
Mandrill
σ=8
width=1.6
Th=45
Tl=18 |
|
|
|
|
|
Urchin
σ=8
width=1.6
Th=45
Tl=18 |
|
|
|
|
|
Corner Detector
- First, we construct a 2D Gaussian distribution from user specified parameters (σ,width). We take the first derivative of this with respect each axis independently. This is then convolved with the input image to produce our rough edge estimate (here σ=8, width=2.2) :
- Next we compute the covariance matrix about each point in the image over a neighborhood size (M) specified by the user
and store their respective eigenvalues in a list if they are above a user specified threshold (500 here)
- Finally, we threshold the image by sorting the eigenvalues of the covariance matrices and inspecting each MxM neighborhood around these values in decreasing order. At each window, we keep only the maximum eigenvalue recorded and throw the rest away. A visitation map is kept in order to more efficiently search the data
| Input Image with Edges Denoted |
|
Here are some additional results (see below for final images)
Final Corner Detected Images


