Lect02 ImageProcessingReview
Lect02 ImageProcessingReview
CP – 7003
Lecture # 02
Spring 2013
Today
► Point vs Neighborhood Operations
► Filtering
► Morphology
► Edge Detection
Readings
Book: Digital Image Processing, Gonzalez & Woods
► Intro: Ch. 3, 9, 10
Digital Camera
255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 20 0 255 255 255 255 255 255 255
=
255 255 75 95 95 75 255 255 255 255 255 255
255 255 96 127 145 175 255 255 255 255 255 255
255 255 127 145 175 175 175 255 255 255 255 255
255 255 127 145 200 200 175 175 95 255 255 255
255 255 127 145 200 200 175 175 95 47 255 255
255 255 127 145 145 175 127 127 95 47 255 255
255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255
snoop
3D view
Nonlinear
Nonlinear Raise
Raise
Invert
Invert Lighten
Lighten Raise
Raise Contrast
Contrast Contrast
Contrast
Nonlinear
Nonlinear Raise
Raise
Invert
Invert Lighten
Lighten Raise
Raise Contrast
Contrast Contrast
Contrast
10 5 3
4 5 1 7
1 1 7
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 10 20 30 30 30 20 10
0 0 0 90 90 90 90 90 0 0 0 20 40 60 60 60 40 20
0 0 0 90 90 90 90 90 0 0 0 30 60 90 90 90 60 30
*
1 1 1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
90
90
90
90
0
90
90
90
90
90
90
90
90
90
90
0
0
0
0
0
0
= 0
0
0
30
30
20
50
50
30
80
80
50
80
80
50
90
90
60
60
60
40
30
30
20
0 0 0 0 0 0 0 0 0 0 10 20 30 30 30 30 20 10
0 0 90 0 0 0 0 0 0 0 10 10 10 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0
* 0
0
1
0
0
0
=
Original Identical image
0 0 0
* 1
0
0
0
0
0
=
Original Shifted left
By 1 pixel
1 1 1
* 1
1
1
1
1
1
=
Original Blur (with a mean filter)
-
0 0 0 1 1 1
* 0
0
2
0
0
0
1
1
1
1
1
1
=
Sharpening filter
Original (accentuates edges)
* =
Convolving two times with Gaussian kernel of
width = convolving once with kernel of
width
Computer Vision Lecture # 2 27
Source: K. Grauman
Sharpening
– =
original smoothed (5x5) detail
+α =
original detail sharpened
Computer Vision Lecture # 2 29
Source: S. Lazebnik
Sharpen filter
blurred
image unit impulse
image
(identity)
unfiltered
filtered
depth discontinuity
illumination discontinuity
edges correspond to
Computer Vision
Source: L. Lazebnik Lecture # 2 extrema of derivative35
Image derivatives
• How can we differentiate a digital image
F[x,y]?
– Option 1: reconstruct a continuous image, f, then
compute the derivative
– Option 2: take discrete derivative (finite
difference)
How would you implement this as a linear filter?
: 1 -1 : -1
1
f*h
Source: S. Seitz
Sobel operator: example
gradient magnitude
Computer Vision Lecture # 2 44
Finding edges
thresholding
Computer Vision Lecture # 2 45
Non-maximum supression
thresholding
Computer Vision Lecture # 2 47
Finding edges
thinning
Computer Vision
(non-maximum suppression)
Lecture # 2 48
Canny edge detector
MATLAB: edge(image,‘canny’)
3. Non-maximum suppression