Edge detection Flashcards
What is an edge in Computer Vision?
A place in the image where the pixel value changes sharply and has discontinuities
Name two derivative filters
Prewitt ([1, 0, -1], [1, 0, -1], [1, 0, -1]) and
Sobel ([1, 0, -1], [2, 0, -2], [1, 0, -1]).
How do you calculate the gradient direction?
arctan(g_y, g_x)
Explain the Sobel filter as 2 1D filters
[1,2,1], smoothing and [1, 0, -1], derivative.
Why do we use the derivate of Gaussians
To remove noise before derivation and detect structures at different scales.
How does sigma affect the results when we take the derivative of Gaussians?
Larger sigma removes more noise and detects larger structures.
What is the formula for the Laplacian?
Lap = d^2f/d^2x + d^2f/d^2y
Why do we use the Guassian before laplacian (LoG)
The Laplacian is even more sensitive to noise than the derivatives.
What is the “Mexican hat” function
A flipped LOG (negative LoG)
Name the three conditions Canny proposed for a good edge detector
1) Good detection; should detect all edges
2) Good localization; should detect edges where they are
3) A single response, should only detect edges where they are
Describe Canny’s algorithm for edge detection
1) Gaussian filtering
2) Calculate gradient magnitude and direction
3) Perform non-maximum repression
4) Perform hysteresis thresholding
What its NMR, non-maximum repression in Canny’s?
For each pixel, we set the pixel to zero if it isn’t the maxima along the gradient direction in a neighborhood.
What its hysteresis thresholding in Canny’s?
Use two thresholds. The pixels above the upper threshold are always considered edges, pixels below the lower threshold are never considered edges.
Pixels between the thresholds are considered edges if they are connected to an edge.
How does the choice of sigma affect the found edges in Canny’s?
Small sima will detect small structures, large sigma will detect larger structures.
How can NMS be used in object detection?
If object regions have significant overlap only the strongest response is kept.