Image Processing Reference
In-Depth Information
grdy(edg,con) := for s1 0..rows(con)
s mod(s1,rows(con))
xmin (con s ) 0
ymin (con s ) 1
forces balance[(con s ) 0 ,(con s ) 1 ,edg,s,con]
Emin (con s ) Econt(xmin,ymin,s,con)
Emin Emin+(con s ) 3 ·Ecur(xmin,ymin,s,con)
Emin Emin+(con ) (edg )
← ⋅
for x (con s ) 0 -1..(con s ) 0 +1
for y (con s ) 1 -1..(con s ) 1 +1
if check(x,y,edg 0 )
xx x-(con s ) 0 +1
yy y-(con s ) 1 +1
Ej (con s ) 2 ·(forces 0 , 0 ) yy , xx
Ej Ej+(con ) (forces )
s4
0 (con ) (con )
s1
s0
← ⋅
Ej Ej+(con ) (edg )
s 3
0,1 yy,xx
s4
0 y,x
if Ej<Emin
Emin
Ej
xmin
x
ymin
y
xmin
ymin
(con )
(con )
(con )
con
s
s2
s3
s4
con
Code 6.4
The Greedy algorithm
continue evolving the snake until it becomes static, when the number of contour points
moved in a single iteration are below the third threshold value. This can lead to instability
since it can lead to a situation where contour points merely oscillate between two solutions
and the process would appear not to converge. Again, this has not been implemented here.
The effect of varying α and β is shown in Figure 6.5 and Figure 6.6 . Setting α to zero
removes influence of spacing on the contour points' arrangement. In this manner, the
points will become unevenly spaced, Figure 6.5 (b), and eventually can be placed on top of
each other. Reducing the control by spacing can be desirable for features that have high
localised curvature. Low values of α
can allow for bunching of points in such regions,
giving a better feature description.
Setting β to zero removes influence of curvature on the contour points' arrangement,
allowing corners to form in the contour, as illustrated in Figure 6.6 . This is manifest in the
first iteration, Figure 6.6 (b), and since with β set to zero for the whole contour, each
contour point can become a corner with high curvature, Figure 6.6 (c), leading to the rather
ridiculous result in Figure 6.6 (d). Reducing the control by curvature can clearly be desirable
for features that have high localised curvature. This illustrates the mutual dependence
between α
and β
, since low values of α
can accompany low values of β
in regions of high
Search WWH ::




Custom Search