Lecture 9-10
Lecture 9-10
Linearity ….
• Additivity :
H ( f 1 + f 2 ) = H ( f 1 ) + H ( f 2 ) (distributive law)
Result of filtering the impulse signal (image) F with the arbitrary kernel H?
Filtering an impulse signal
Filtering an impulse signal
Filtering an impulse signal
Filtering an impulse signal
Filtering an impulse signal
Assuming center
coordinate is "reference point".
Correlation vs Convolution
We had this problem, of when we put in through a correlation, we got back out
sort of this flip thing.
Convolution
Shift invariant:
c H
Separability
r
c H
G = H * F = (C * R) * F = C * (R * F)
• So we do two convolutions but each is W*N*N. So this is useful
if W is big enough such that 2 • W • N2 << W2 • N2
• Used to be very important. Still, if W=31, save a factor of 15.
Boundary issues
• Remember that when we are the blurring, we replace the pixel value
by the local average. That's fine when the noise is modest and tends
to add to zero over a neighborhood. But if there are a few totally
random values thrown in, we need another approach.
• As many of you know the way to deal with such ugly perturbation is
to use what's called a median filter.
Median filter
No new pixel
values introduced.
Removes spikes:
good for impulse,
salt & pepper noise.
Linear?
Salt and Median
pepper filtered
noise
Signal
Filter
1D (nx)correlation
Signal
Filter
Normalized
cross-correlation
Matlab cross-correlation doc
Matlab cross-correlation doc
Matlab cross-correlation doc
Template matching Filters as templates
A toy example
Template (mask)
Scene
K. Grauman
Template matching
Template (mask)
Detected template
Template matching
Scene
Template
K. Grauman
Where's Waldo?
Template
Detected Template
Where's Waldo?
Template
Scene K. Grauman
Template matching
Match can be meaningful, if scale, orientation, and
general appearance is right.
Detected template