Resize 4x4 -> 7x7
Resize 4x4 -> 7x7
Resize 4x4 -> 7x7
Resize 4x4 -> 7x7
Different methods
For shrinking interpolation bad, averaging good
X
“interpolation”
averaging
Convolution: Weighted sum over pixels
Filters
Cross-Correlation vs Convolution
Cross-Correlation vs Convolution
Do this in HW!
Cross-Correlation vs Convolution
These are nicer mathematically
So what can we do with these convolutions anyway?
Mathematically: all the nice things
So what can we do with these convolutions anyway?
This means some convolutions decompose:
So what can we do with these convolutions anyway?
So what can we do with these convolutions anyway?
All of computer vision
is convolutions
(basically)
So what can we do with these convolutions anyway?
All of computer vision
is convolutions
(basically)
What’s an edge?
What’s an edge?
Finding edges
Image derivatives
Image derivatives
Image derivatives
Image derivatives
Images are noisy!
But we already know how to smooth
* =
But we already know how to smooth
* =
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Smooth first, then derivative
Sobel filter! Smooth & derivative
Image derivatives
Finding edges
Finding edges
2nd derivative!
Laplacian (2nd derivative)!
Laplacians
Laplacians
Laplacians
Laplacians
Laplacians
Laplacians
Laplacians
Laplacians also sensitive to noise
Another edge detector:
Difference of Gaussian (DoG)
Difference of Gaussian (DoG)
σ = 2
σ = 1
Difference of Gaussian (DoG)
DoG (1 - 0)
DoG (2 - 1)
DoG (3 - 2)
DoG (4 - 3)
Another approach: gradient magnitude
Another approach: gradient magnitude
Another approach: gradient magnitude
What we really want: line drawing
Canny Edge Detection
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Algorithm:
Smooth image
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Gradient magnitude and direction
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Non-maximum suppression
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
Non-maximum suppression
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Threshold edges
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Connect ‘em up!
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Canny Edge Detection
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
Algorithm:
Canny Edge Detection
http://bigwww.epfl.ch/demo/ip/demos/edgeDetector/
What else is there?
So what can we do with these convolutions anyway?
Features!
What makes a good feature?
How close are two patches?
How can we find unique patches?
How can we find unique patches?
How can we find unique patches?
How can we find unique patches?
How can we find unique patches?
*
How can we find unique patches?
Self-difference
Sky: low everywhere
Self-difference
Edge: low along edge
Self-difference
Corner: mostly high
Self-difference
Sky: low everywhere
Edge: low along edge
Corner: mostly high
Self-difference is still expensive
Approximate self-difference
Approximate self-difference
Structure matrix
Estimating smallest eigen value
Harris Corner Detector