Interest Point Detectors & RANSAC
Instructor - Simon Lucey
16-423 - Designing Computer Vision Apps
Interest Point Detectors & RANSAC Instructor - Simon Lucey - - PowerPoint PPT Presentation
Interest Point Detectors & RANSAC Instructor - Simon Lucey 16-423 - Designing Computer Vision Apps Today Image Gradients. Interest Point Detectors Matching Regions. RANSAC. I I ( x, y ) I ( x + 1 , y + 1) Simoncelli
Instructor - Simon Lucey
16-423 - Designing Computer Vision Apps
Today
I(x, y) I(x + 1, y + 1) I
Simoncelli & Olshausen 2001
I(x, y) I I(x + 8, y + 8)
Simoncelli & Olshausen 2001
I(x, y) I I(x + 16, y + 16)
Simoncelli & Olshausen 2001
I(x, y) I I(x + 50, y + 50)
Simoncelli & Olshausen 2001
I(x, y) I I(x + 50, y + 50)
Simoncelli & Olshausen 2001
Pixel Coherence
within natural images are heavily correlated with one another within a local neighborhood (e.g., +/- 5 pixels).
5
N
3 4 3 2 ? 5 5 4 2
3
Pixel Coherence
within natural images are heavily correlated with one another within a local neighborhood (e.g., +/- 5 pixels).
5
N
3 4 3 2 ? 5 5 4 2
3
“Typically assume that pixels within +/- 3, 5 or 7 pixels are highly correlated.”
IGxH x
Estimating Gradients
6
continuous signal,
(Black)
IGxH x
Estimating Gradients
7
continuous signal,
IGxH x
(Black)
appearance at and ?
I(x0 + ∆x)
Estimating Gradients
8
(Black)
∆x
IGxH x
IFxH x
x0
I(x0)
I(x0 + ∆x) I(x0)
Estimating Gradients
9
(Black)
IGxH x
IFxH x
x0
I(x0 + ∆x) I(x0)
I(x0 + ∆x) ≈ I(x0) + ∂I(x0) ∂x
T
∆x
Estimating Gradients
9
(Black)
IGxH x
IFxH x
x0
I(x0 + ∆x) I(x0)
I(x0 + ∆x) ≈ I(x0) + ∂I(x0) ∂x
T
∆x
∂I(x0) ∂x
through the use of edge filters. (e.g., Sobel, Prewitt).
∗ ∗
Gradients through Filters
10
“Horizontal” “Vertical”
∂I(x) ∂x = [Ix(x), Iy(x)]T
Iy Ix I
through the use of edge filters. (e.g., Sobel, Prewitt).
∗ ∗
Gradients through Filters
10
“Horizontal” “Vertical”
∂I(x) ∂x = [Ix(x), Iy(x)]T
Iy Ix I
“Often have to apply a smoothing filter as well.”
Today
Interest Point Detectors
Interest Point Detectors
the line moved along itself?).
A(∆x, ∆y) = X
(xk,yk)∈N (x,y)
||I(xk, yk) − I(xk + ∆x, yk + ∆y)||2 N (∆x, ∆y)
Interest Point Detectors
14
N(x)
Interest Point Detectors
15
“in vector form” “local neighborhood”
A(∆x) = X
xk∈N (x)
||I(xk) − I(xk + ∆x)||2
A(∆x)
5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 5 10 15 20 25Interest Point Detectors
16
A(∆x) = X
xk∈N (x)
||I(xk) − I(xk + ∆x)||2
A(∆x)
5 10 15 20 25 5 10 15 20 25 5 10 15 20 25 5 10 15 20 25Interest Point Detectors
16
A(∆x) = X
xk∈N (x)
||I(xk) − I(xk + ∆x)||2
Harris Detector
17
≈ X
i∈N
||I(xi) − I(xi) − ∂I(xi) ∂x
T
∆x||2 ≈ ∆xT H∆x H = X
i∈N
∂I(xi) ∂x ∂I(xi) ∂x
T
Harris Detector
A(∆x) = X
xk∈N (x)
||I(xk) − I(xk + ∆x)||2
Harris Corner Detector
Make decision based on image structure tensor
H = X
i∈N
∂I(xi) ∂x ∂I(xi) ∂x
T
Harris Detector
20
Effects of Scale
– Plotting intensity as a function of position gives a signal
Source: S. Seitz
Effects of Scale
– Plotting intensity as a function of position gives a signal
Source: S. Seitz
Search Multiple Scales
f
Source: S. Seitz
Search Multiple Scales
f g
Source: S. Seitz
Search Multiple Scales
f g f * g
Source: S. Seitz
Search Multiple Scales
f g f * g
Source: S. Seitz
Search Multiple Scales
f g f * g
Source: S. Seitz
SIFT Detector
Coarse to Fine
24
SIFT Detector
Identified Corners Remove those
Remove those where contrast is low
Today
them.
Matching Regions
27
image 1 image 2
SSD : sum of square difference Small difference values similar patches
X
[∆x,∆y]T ∈N
||I1(x1 + ∆x, y1 + ∆y) − I2(x2 + ∆x, y2 + ∆y)||2
2
(x1, y1) (x2, y2)
Problems with SSD
sensitive to both,
use descriptors.
28
Planar Affine Patch Assumption
29
“View 1” “View 2”
covariant regions (Schmid et al. 2004).
Rotation Invariance
– extract gradient orientation – histogram over gradient orientation – peak in this histogram
SIFT Descriptor
More on this in future lectures.
Why Pool?
Why Pool?
Why Pool?
“average”
Why Pool?
“histogram” “pooling” “blurring”
Why Pool?
“histogram” “pooling” “blurring”
MATLAB Example
>> h = fspecial(‘gaussian’,[25,25],3); >> resp = imfilter(im, h);
h resp
MATLAB Example
>> h = fspecial(‘gaussian’,[25,25],3); >> resp = imfilter(im, h);
h resp
Other Descriptors
proposed.
Other Descriptors
proposed.
Today
Robust Estimation
not robust to outliers
line to be quite wrong.
under these circumstances is to use RANSAC – “Random sampling by consensus”
RANSAC
RANSAC
Fitting a homography with RANSAC
Original images Initial matches Inliers from RANSAC
Things to try in iOS - GPUImage
See - https://github.com/BradLarson/GPUImage for more details.
More to read…
SURF”, ICCV 2011.