Image Processing Reference
In-Depth Information
a straight edge may halt at this point. Consideration of the exponentially
averaged response, therefore, increases the chance of including a point with
weak response in the current straight edge.
Eq. 4.16 has a notable advantage in its implementation: its denominator
can be expressed as
1− 1
2 9
X
X
X
1
2 i
1
2 9
1
2 i =
1
2 i =
1− 1
2 9
·2 ≈ 2.
i=0
i=0
i=0
Thus, computation of R E at the current point p reduces to
R E = 1
2
R P + 1
1
1
2 R (−1)
2 2 R (−2)
2 8 R (−8)
+
+ ... +
(4.17)
E
E
E
Further, since the responses {R (−i E : i = 1,2,...,8} at the ith previous points
are already computed before reaching the current point p, these responses are
used to compute R E as per Eq. 4.17 in a simpler way. Only one right shift and
one additive operation in the integer domain are required for this. We store
1
2 8 R (−9 E ) at the previous step—computed from the
previous responses—in a variable E. At p, we first add R P with E to compute
R P + E and then apply a right shift to R P + E to compute the current value
of R E (= 2 (R P + E)), which is reassigned to E. 3 This updated value of E is
carried forward to the next step to compute R (+1)
2 (R (−1)
+ 2 R (−2)
1
+ ... +
E
E
E in a similar way.
For multiple maximum responses exceeding T, the next direction is chosen
in a way so that the properties R1 and R2 are ensured. For example, if p lies
on a straight edge having 1 and 0 as the respective singular and non-singular
codes, and there are two maxima with chain codes 0 and 7 , then we choose 0
as it satisfies R1. If no response at any direction exceeds T, then we stop at p
and search for a new start point.
4.4.3 Checking the Straightness
To check the straightness of an edge, we verify whether the properties R1
and R2 are true for the chain code of every new entry. Further, since R2 is
inherently stringent on deciding the straightness of a curve (run-lengths of
the non-singular code can differ at most by unity), we allow a relaxation on
R2 by considering an integer interval [p,q] as the range of run-length of the
non-singular code n in a straight edge. The limits of the run-length interval
are
1,(1−α)l
p = max
(4.18)
q = (1 + α)l
3 Since E = 2 R (−1)
2 2 R (−2)
2 9 R (−9)
1
1
, we get R E = 2 (R P +E) on neglecting
+
+ ... +
E
E
E
2 9 R (−9)
2 10 R (−9)
1
2
1
1
1
2 E, and so the updated value of E for the
the smallest term
·
=
in
E
E
1
2 (R P + E).
next step is
Search WWH ::




Custom Search