Anda di halaman 1dari 36

LL465: Introduction to Digital Image

Processing Copyright Xin Li 1


LL465: Introduction to Digital Image
Processing Copyright Xin Li 2
LL465: Introduction to Digital Image
Processing Copyright Xin Li 3
LL465: Introduction to Digital Image
Processing Copyright Xin Li 4
Roadmap
ntroduction to image analysis (computer
vision)
ts connection with psychology and neuroscience
Why is image analysis difficult?
Theory of edge detection
Gradient operator
Advanced operators
Applications
Road/sign detection in intelligent driving systems
Pupil detection in iris recognition systems
LL465: Introduction to Digital Image
Processing Copyright Xin Li 5
Computer Vision: the Grand Challenge
Teach a computer to see is nontrivial at all
Unlike binary images, grayscale/color images
acquired by the sensor are often easy to
understand by human being but difficult for a
machine or a robot
There are lots of interesting problems in the
field of computer vision (image analysis)
mage segmentation, image understanding, face
detection/recognition, object tracking .
LL465: Introduction to Digital Image
Processing Copyright Xin Li 6
How does Human Vision System work?
Top-down school Bottom-up school
5ixels
objects
com5onents (such as
edges, lines etc.)
I see a human body
I ex5ect to see a human Iace
I ex5ect to see two eyes and a nose
Two hypothesis and nobody knows the answer yet!
LL465: Introduction to Digital Image
Processing Copyright Xin Li
n mazing Image Exam5le
Person
I see an old man with a Iancy
earring and a strange hand
Person B
I see two 5eo5le on the street
and a dog lying beside
f you try really hard, you will be able
to locate at least eight different faces
from this image
LL465: Introduction to Digital Image
Processing Copyright Xin Li 8
Gestalt 1heory ,the Berlin School,
mergence: the dog is perceived as a whole, all at once
LL465: Introduction to Digital Image
Processing Copyright Xin Li 9
#eification
LL465: Introduction to Digital Image
Processing Copyright Xin Li 10
Multistability ,or Multistable Perception,
LL465: Introduction to Digital Image
Processing Copyright Xin Li 11
Inariance
LL465: Introduction to Digital Image
Processing Copyright Xin Li 12
Application: lace Detection
http://vasc.ri.cmu.edu/demos/faceindex/
You are strongly encouraged to try the interactive demo out yourself
LL465: Introduction to Digital Image
Processing Copyright Xin Li 13
Roadmap
ntroduction to analysis of grayscale images
Why grayscale images are more difficult to
handle?
dge detection
Gradient operator
Advanced operators
mage segmentation
Basic techniques
Texture segmentation*
LL465: Introduction to Digital Image
Processing Copyright Xin Li 14
Edge Detection
Why detect edge?
Edges characterize object boundaries and are
useIul Ieatures Ior segmentation, registration
and object identiIication in scenes.
What is edge (to human vision system)?
Intuitively, edge corres5onds to singularities in the image
(i.e. where 5ixel value ex5eriences abru5t change)
o rigorous definition exists
LL465: Introduction to Digital Image
Processing Copyright Xin Li 15
radient O5erators
Motivation detect changes
change in the 5ixel value large gradient
radient
o5erator
image
Thresholding
edge
ma5
x(m,n)
g(m,n)
I(m,n)

otherwise
th n m g
n m I

) , (
) , (
ATLAB function: > help edge
LL465: Introduction to Digital Image
Processing Copyright Xin Li 16
ommon O5erators
Exam5les . Roberts o5erator



g
g
2



) , ( ) , ( ) , (
2
2
2

n m g n m g n m g
radient o5erator
LL465: Introduction to Digital Image
Processing Copyright Xin Li 1
ommon O5erators (cont`d)
2. Prewitt o5erator 3. Sobel o5erator


2 2


2

2
vertical
horizontal
LL465: Introduction to Digital Image
Processing Copyright Xin Li 18
Exam5les
horizontal edge vertical edge
Prewitt o5erator (th48)
original image
LL465: Introduction to Digital Image
Processing Copyright Xin Li 19
EIIect oI Thresholding Parameters
threshold small
large
LL465: Introduction to Digital Image
Processing Copyright Xin Li 20
om5ass O5erators





< ) , ( max ) , ( n m g n m g
k
k

LL465: Introduction to Digital Image


Processing Copyright Xin Li 21
Exam5les
om5ass o5erator (th48)
LL465: Introduction to Digital Image
Processing Copyright Xin Li 22
a5lacian O5erators
radient o5erator Iirst-order derivative
sensitive to abru5t change, but not slow change
second-order derivative
2
2
2
2
2

1
x
1
1
N
N

N
N
]
(a5lacian o5erator)

2
2

N
N
x
1
local extreme in 1




Discrete a5lacian o5erator
a a.5

, , ,
, ,
, , ,
,

LL465: Introduction to Digital Image


Processing Copyright Xin Li 23
ero rossings
1
1
1
zero crossing
a5lacian
o5erator
image
zero-crossing
edge
ma5
x(m,n)
g(m,n)
I(m,n)
LL465: Introduction to Digital Image
Processing Copyright Xin Li 24
Exam5les
zero-crossings original image
"uestion: why is it so sensitive to noise (many false alarms)?
Answer: a sign flip from 0.01 to -0.01 is treated the same as from 100 to -100
LL465: Introduction to Digital Image
Processing Copyright Xin Li 25
Ideas to Improe Robustness
Linear filtering
Use a Gaussian filter to smooth out noise
component F Laplacian of Gaussian
$patially-adaptive (onlinear) processing
Apply different detection strategies to smooth
areas (low-variance) and non-smooth areas (high-
variance) F Robust Laplacian edge detector
Return single response to edges (not multiple
edge pixels)
Hysteresis thresholding Fanny's edge detector
LL465: Introduction to Digital Image
Processing Copyright Xin Li 26
a5lacian oI aussian
eneralized a5lacian o5erator
)
2
ex5( |
) (
) , (
2
2 2
2
2 2
9 9
n m n m
c n m h


a5lacian
o5erator
image
edge
ma5
x(m,n)
g(m,n)
I(m,n)
aussian
PF (9)
Pre-Iiltering attenuate the noise sensitivity oI the a5lacian
LL465: Introduction to Digital Image
Processing Copyright Xin Li 2
Exam5les
Better than Laplacian alone but still sensitive due to zero crossing
LL465: Introduction to Digital Image
Processing Copyright Xin Li 28
Robust a5lacian-based Edge Detector
a5lacian
o5erator
image
zero
crossing?
estimate
local variance
9
2
~th
9
2
not an
edge 5oint
No
yes
No
not an
edge 5oint
edge
5oint
LL465: Introduction to Digital Image
Processing Copyright Xin Li 29
Exam5les
ore robust but return multiple edge pixels (poor localization)
LL465: Introduction to Digital Image
Processing Copyright Xin Li 30
Canny Ldge Detector
Low error rate of detection
Well match human perception results
Good localization of edges
The distance between actual edges in an image
and the edges found by a computational algorithm
should be minimized
$ingle response
The algorithm should not return multiple edges
pixels when only a single one exists
LL465: Introduction to Digital Image
Processing Copyright Xin Li 31
Flow-chart oI anny Edge Detector*
( ,nn86)
Original image
$moothing by aussian convolution
Differential operators along x and y axis
Non-maximum suppression
Iinds 5eaks in the image gradient
Hysteresis thresholding locates edge strings
Edge ma5
LL465: Introduction to Digital Image
Processing Copyright Xin Li 32
anny Edge Detector Exam5le
original image vertical edges horizontal edges
norm oI the gradient aIter thresholding
aIter thinning
LL465: Introduction to Digital Image
Processing Copyright Xin Li 33
Marr and Hildreth`s Method*
Edge is scale-de5endent
diIIerent edge ma5 can be generated at diIIerent scale
Scale s5ace re5resentation
) ; , ( ) ; , ( ) ; , ( s x g x 1 s x 1
1ine-sc,e
im,ge
co,rse-sc,e
im,ge
G,:ssi,n kerne
with width o1 s
)
2
ex5(
2

) ; , (
2 2
s
x
s
s x g


6
LL465: Introduction to Digital Image
Processing Copyright Xin Li 34
Importance o Scale
LL465: Introduction to Digital Image
Processing Copyright Xin Li 35
Scale-S5ace Edge Detection Exam5les
Iine
coarse
Image to Sketch Online Apps
LL465: Introduction to Digital Image
Processing Copyright Xin Li 36
http://sporkforge.com/imaging/sketch.php

Anda mungkin juga menyukai