Image Processing
|
|
|
|
|
Today’s readings |
|
Forsyth & Ponce, chapters 8.1-8.2 |
|
http://www.cs.washington.edu/education/courses/490cv/02wi/readings/book-7-revised-a-indx.pdf |
|
|
|
For Monday |
|
Watt, 10.3-10.4 (handout) |
|
Cipolla and Gee (handout) |
|
supplemental: Forsyth, chapter 9 |
Announcements
|
|
|
|
HW0 due now |
|
Project 0 is out today. Li will give a help-session in the last 10
minutes of class. |
|
If you don’t have a CSE account |
|
turn in your account forms right after
class! |
|
If you want to add |
|
go ahead and register in EE400B, SLN
8590 |
|
If you don’t have access to 228 |
|
talk to me after class today |
|
|
|
All announcements are posted via the
class webpage |
|
You may also use the mailing list (cse490cv@cs)
for questions |
|
|
|
|
What’s an image?
|
|
|
|
|
We can think of an image as a function,
f, from R2 to R: |
|
gives the intensity of a
channel at position |
|
typically only defined over a
rectangle, with a finite range |
|
|
|
|
|
A color image is just three functions
pasted together |
|
We can write this as a “vector-valued”
function: |
|
|
Images as functions
What’s a digital image?
|
|
|
|
We usually operate on digital (discrete)
images: |
|
Sample the space on a regular grid |
|
Quantize each sample (round to nearest
integer) |
|
If our samples are d apart, we can
write this as: |
|
|
Image processing
|
|
|
An image processing operation defines a
new image g in terms of an existing image f. |
|
We can transform either the domain or
the range of f |
|
|
|
Range transformation |
Noise
|
|
|
|
Common types of noise: |
|
Salt and pepper noise: random black and
white pixels |
|
Impulse noise: random white pixels |
|
Gaussian noise: variations in intensity
drawn from a Gaussian (normal) distribution |
Reducing Noise
Mean filtering
|
|
|
|
Replace each pixel with an average of
the pixels in the k´k box around it |
|
|
|
3´3 case: |
Mean filtering
What about border pixels?
Effect of filter size
|
|
|
What happens if we |
|
use a larger mean filter? |
|
5´5? 7´7? |
Weighted average
filtering
Gaussian filter
Comparison of mean vs.
gaussian filter
Linear shift-invariant
filters
|
|
|
|
What happens when a filter is applied
to an impulse? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
helps explain why mean filters can give
“blocky” results |
|
|
Cross correlation
|
|
|
|
|
For a k´k filter, the equation becomes (assume k is odd): |
|
|
|
|
|
If we choose the origin of h, F, and G
to be the center, we can simplify: |
|
|
|
|
|
This filtering operation is known as a cross-correlation,
written |
|
|
|
For continuous images,
cross-correlation is defined as: |
|
|
|
|
|
Similar to convolution: |
|
|
|
|
|
Convolution flips the filter
horizontally and vertically before applying it |
|
how does convolution with a Gaussian
filter differ from cross-correlation? |
Linear shift-invariant
filters
|
|
|
|
|
Both cross-correlation and convolution
filters have the following properties |
|
linear: |
|
how about scale? Is the following true? |
|
|
|
shift-invariant: same operation applied for every x,y in f |
|
Any filter with these properties (LSI)
may be written as a cross-correlation |
|
Is this also true for convolution? |
|
|
|
Convolution has nice properties in the Fourier
Domain |
|
we won’t cover this, but see Forsyth
Chap. 8.3 for a nice discussion |
|
|
Symmetry in Convolutions
|
|
|
Convolutions have a symmetry property: |
|
|
|
Try it out: |
Median filter
|
|
|
A median filter operates over a k´k window by returning the
median pixel value in that window |
|
|
|
What advantage might a median filter
have over a mean filter? |
|
|
|
|
|
Can a median filter be implemented by a
cross-correlation? |
|
|
Slide 21
Slide 22
Image Scaling
Image sub-sampling
Even worse for synthetic
images
Sampling and the Nyquist
rate
|
|
|
|
|
Aliasing can arise when you sample a
continuous signal or image |
|
Demo applet http://www.cs.brown.edu/exploratory/research/applets/repository/nyquist/nyquist.html |
|
occurs when your sampling rate is not
high enough to capture the amount of detail in your image |
|
formally, the image contains structure
at different scales |
|
called “frequencies” in the Fourier
domain |
|
the sampling rate must be high enough
to capture the highest frequency in the image |
|
To avoid aliasing: |
|
sampling rate > 2 * max frequency in
the image |
|
i.e., need more than two samples per
period |
|
This minimum sampling rate is called
the Nyquist rate |
Subsampling with Gaussian
pre-filtering
Some times we want many
resolutions
Gaussian pyramid
construction
Image resampling
|
|
|
|
So far, we considered only power-of-two
subsampling |
|
What about arbitrary scale reduction? |
|
How can we increase the size of the
image? |
Image resampling
|
|
|
|
So far, we considered only power-of-two
subsampling |
|
What about arbitrary scale reduction? |
|
How can we increase the size of the
image? |
Image resampling
|
|
|
So what to do if we don’t know |
Image resampling
|
|
|
What does the 2D version of this hat
function look like? |
Subsampling with bilinear
pre-filtering
Things to take away from
this lecture
|
|
|
|
|
Things to take away from this lecture |
|
An image as a function |
|
Digital vs. continuous images |
|
Image transformation: range vs. domain |
|
Types of noise |
|
LSI filters |
|
cross-correlation and convolution |
|
properties of LSI filters |
|
mean, Gaussian, bilinear filters |
|
Median filtering |
|
Image scaling |
|
Image resampling |
|
Aliasing |
|
Gaussian pyramids |
|
|
|
|