Advanced Edge Detectors
Computer Vision
- Prof. ¡Flávio ¡Cardeal ¡– ¡DECOM ¡/ ¡CEFET-‑MG ¡
cardeal@decom.cefetmg.br ¡ ¡
Computer Vision Advanced Edge Detectors Prof. Flvio Cardeal - - PowerPoint PPT Presentation
Computer Vision Advanced Edge Detectors Prof. Flvio Cardeal DECOM / CEFET-MG cardeal@decom.cefetmg.br Abstract This lecture discusses advanced edge detectors that combine multiple approaches
cardeal@decom.cefetmg.br ¡ ¡
2 ¡
3 ¡
4 ¡
Note that for calculating the Laplacian of a Gauss-filtered image, we only have to perform one convolution with . ∇2Gσ
kernel as shown below:
we can calculate its exact Laplacian. How?
5 ¡
∇2Gσ
6 ¡
∂Gσ ∂x (x,y) = − x 2πσ 4 e−(x2+y2)/2σ 2
= = Gσ(x,y) = 1 2πσ 2 exp
2σ 2
πs · e− x2
2σ 2 · e− y2 2σ 2
the LoG as follows:
In fact, it is an “inverted Mexican hat”. The zero- crossings define the edges.
7 ¡
∇2Gσ(x,y) = 1 2πσ 4 x2 + y2 − 2σ 2 σ 2
8 ¡ Source: ¡R. ¡KleKe ¡
filter kernel for an appropriate value of .
for the given class of input images, and an appropriate value of follows from this.
9 ¡
(2k +1)×(2k +1) k k σ k
have both zero-crossings in the x axis as the roots
10 ¡
x1 = −σ 2 x2 = 2σ 2
∇2Gσ (x, y) = 0
y = 0 x2 = +σ 2 w w = x1 − x2 = 2σ 2
11 ¡ Source: ¡R. ¡KleKe ¡
by samples, it is proposed to use a window size
12 ¡
3w×3w = 6σ 2 ×6σ 2 2k + 1 × 2k + 1 = ceil6 √ 2σ × ceil6 √ 2σ
Smallest integer equal to or larger than the argument
image data.
Gauss function does not make much sense.
thus 3 = 8.485) will be of size 9 x 9 (i.e., = 4).
13 ¡
σ σ <1
σ ≥1
σ =1 k w
14 ¡
σ = 0.5 σ =1 σ = 2 σ = 4 σ = 8 σ =16
Source: ¡R. ¡KleKe ¡
Consider again this Gaussian scale space with six layers.
15 ¡
σ = 0.5 σ =1 σ = 2 σ = 4 σ = 8 σ =16
Source: ¡R. ¡KleKe ¡
So, here we have the resulting images after computing the Laplacians of those six layers.
by the scale , the used standard deviation in the Gauss function.
at an initial scale and using subsequent scales for and .
16 ¡
σ σ an ⋅σ a >1 n = 0,1,...,m
common approximation of the LoG operator, justified by reduced run time.
centered (i.e. zero-mean) Gauss function :
17 ¡
Gσ
Gσ(x,y) = 1 2πσ 2 exp
2σ 2
scaling factor as follows:
image and an even more blurred copy of .
18 ¡
σ a >1
Dσ,a(x,y) = L(x,y,σ) − L(x,y,aσ)
I I
are detected at zero-crossings.
with as a recommended parameter.
19 ¡
∇2Gσ(x,y) ≈ Gaσ (x,y) − Gσ(x,y) (a − 1)σ 2
a =1.6
scale space.
layers in the DoG scale space.
20 ¡
σ Dσ,a a =1.6
21 ¡
σ = 0.5
Source: ¡R. ¡KleKe ¡
LoG
σ = 0.5
DoG
a =1.6
22 ¡
σ = 0.5
Source: ¡R. ¡KleKe ¡
LoG
σ = 0.5
DoG
a = (1.6)3
23 ¡
σ = 0.5
Source: ¡R. ¡KleKe ¡
LoG
σ = 0.5
DoG
a = (1.6)5
derived from calculated data, to be used for deciding about the existence of a particular feature.
the feature detector reasonably well, then this should correspond to high values of the measure.
24 ¡
applying a confidence measure based on the assumption of the validity of the step-edge model.
25 ¡
at a pixel location , those parameters are:
magnitude distribution.
26 ¡
g(p) = ∇I(x, y) p = (x, y)
g(p) = g(p) 2 θ(p) η(p) ρk
window centered at the current pixel location in input image .
matrix of weights, obtained as the product of two vectors and .
27 ¡
W = sd
Τ
A (2k +1)×(2k +1) p I (2k +1)×(2k +1) d =[d1,...,d2k+1] s =[s1,...,s2k+1]
and ;
, …, .
.
28 ¡
d d d1 +... d2k+1 =1 d1 = −d2k+1 s s1 +... s2k+1 =1 d2 = −d2k dk+1 = 0 s s1 = s2k+1 ≤... ≤ s2 = s2k ≤.... ≤ sk+1
5 matrix :
29 ¡
d s
d =[−0.125, -0.25, 0, 0.25, 0.125]Τ
W
s =[0.0625, 0.25, 0.375, 0.25, 0.0625]Τ
W = sdΤ =
" # $ $ $ $ $ $ % & ' ' ' ' ' '
we obtain the first two parameters used in the algorithm:
30 ¡
ai A
d1 = Tr(WA) = Tr
2k+1
si
1 + d2 2
θ(p) = arctan d1 d2
a template of an ideal step edge having the gradient direction .
confidence measure.
31 ¡
θ(p) Aideal (2k +1)×(2k +1)
η(p) = Tr(Aideal
Τ
A)
Aideal
that , with in case of a perfect match with the ideal step edge.
distinct (rounded) gradient-magnitudes in image , with cumulative distribution values (probabilities):
32 ¡
η(p) =1 A 0 ≤η(p) ≤1
ρk = Prob g ≤ gk
Aideal I g1 <... < gk <... < gN
for 1 ≤ k ≤ N. F magnitude
real to its edge magnitude ; then we have the percentile .
and a confidence between 0 and 1.
33 ¡
I gk g(p) ρ(p) = ρk p ρ(p) η(p)
a 2D - diagram for image .
34 ¡
ρη ρ(p) η(p) I I
We consider curves in the space given in implicit form. For example, this can be just a vertical line passing the square, or an elliptical arc.
ρη
Source: ¡R. ¡KleKe ¡
gradient direction and their and values by interpolation values at adjacent pixel locations.
35 ¡
A 3 x 3 neighborhood of pixel location and virtual neighbors and in estimated gradient direction.
p
p q1 q2 ρ(p) η(p)
q1 q2
X in space a maximum if both virtual neighbors and have a negative sign for X.
curve X and the remaining pixels are the candidates for the edge map.
36 ¡
p ρη q1 q2
decide in a process based on previously obtained results.
thresholding is based on two curves L and H in the space, called the two hysteresis thresholds.
37 ¡
ρη
38 ¡ Source: ¡R. ¡KleKe ¡
.
thresholding process; it is applied recursively.
39 ¡
p ρ(p) η(p)
L(ρ,η) > 0 H(ρ,η) ≥ 0 L(ρ,η)⋅ H(ρ,η) < 0
40 ¡
Larger filter kernel Smaller filter kernel
4- and 8-Adjacency for Binary Images. Topologically Sound Pixel Adjacency. Border Tracing.
Section 3.1 of textbook.
41 ¡