Computer Science Department of The University of Auckland CITR at Tamaki Campus (http://www.citr.auckland.ac.nz)
CITR-TR-65 September 2000
A New Approximation Scheme for Digital Objects and Curve Length Estimations
T. Asano 1 , Y. Kawamura 1 , R Klette 2 , K. Obokata 1
Abstract
The paper introduces a new approximation scheme for planar digital curves. This scheme defines an approximating sausage ‘around’ the given digital curve, and calculates a minimum-length polygon in this approximating sausage. The length of this polygon is taken as an estimator for the length of the curve being the (unknown) preimage of the given digital curve. Assuming finer and finer grid resolution it is shown that this estimator converges to the true perimeter of an r-compact polygonal convex bounded set. This theorem provides theoretical evidence for practical convergence of the proposed method towards a ‘correct’ estimation of the length of a curve.
1 School of Information Science, JAIST Asahidai, Tatsunokuchi, 923-1292 Japan
2 Centre for Image Technology and Robotics, The University of Auckland, Tamaki Campus, Auckland,
New Zealand
Objects and Curve Length Estimations
T. Asano 1
, Y. Kawamura 1
, R. Klette 2
, andK. Obokata 1
1
Scho ol of InformationScience, JAIST
Asahidai, Tatsunokuchi,923-1292 Japan
ft-asano, kawamura, [email protected]
2
CITR, Universityof Auckland,TamakiCampus,Building731
Auckland,New Zealand
Abstract
The paper introducesa new approximationscheme for planar digital curves. Thisscheme
denes an approximatingsausage `around' the given digital curve, and calculatesa mini-
mum-length polygonin this approximating sausage. The length ofthis polygonis takenas
an estimatorfor the length of the curve beingthe (unknown)preimageof the givendigital
curve. Assuming ner and ner grid resolution it is shownthat this estimator converges
tothetrue perimeterof anr -compactpolygonalconvexboundedset. Thistheoremprovides
theoretical evidence for practical convergence of the proposed method towards a `correct'
estimation of the length of a curve.
Keywords: Digital geometry,digital curves, multigrid convergence,length estimation.
1 Introduction and PreliminaryDenitions
Curvelengthestimationinimageanalysismayb ebasedonmetho ds ensuringconvergence
of estimated values towards thetrue length assumingan increase in grid resolution. For
example, the digital straight segment approximation method (DSS metho d), see [2, 7],
and the minimum length polygon approximation method assuming one-dimensional grid
continua asb oundary sequences (GC-MLPmetho d),see [8], aremetho ds forwhich there
are convergence theorems when sp ecic convex sets are assumed to b e the given input
data, see [5, 6, 9]. This pap er studies the convergence prop erties of a new minimum
length p olygon approximation metho d based on so-called approximation sausages (AS-
MLP metho d).
Motivationsforstudying thisnew technique areasfollows: theresulting DSSapproxima-
tion p olygon dep ends up onstarting p oint and theorientation of theb oundary scan,itis
not uniquely dened, but itmayb ecalculated foranygiven digital object. Theresulting
GC-MLP approximation p olygon is uniquely dened, but it assumes a one-dimensional
grid continua as an input p olygon which is only p ossible if the given digital object do es
not havecavities of width 1 or 2. The new metho d leads to a uniquely dened p olygon,
δ
δ L (v )
L (v ) f
b i
i v i
v i+1
v i-1
Figure 1: Denition of the forward and backward approximating segments asso ciated with a
vertex v
i .
to compare exp erimental data for this new technique with others. However, we will not
rep ort on exp eriments in thispap er.
Let r b e the grid resolution dened as b eing the numb er of grid p oints p er unit. We
consider r-grid pointsg r
i;j
=(i=r;j=r )in theEuclidean plane, forintegersi;j. Anyr -grid
p oint isassumed tob e thecenter p oint of an r-squarewithr-edges of length 1=rparallel
to theco ordinateaxes, and r-vertices.
The digitization mo del for our new approximation metho d is just the same asthat con-
sidered in case of theDSS metho d, see [3, 4,5]. Thatis, let S b ea set in theEuclidean
plane, called realpreimage. ThesetC
r
(S)is theunionofallthose r -squareswhosecenter
p oint g r
i;j
is in S. The b oundary @C
r
(S) is the r-frontier of S. Note that @C
r
(S) may
consists of several non-connected curves even in the case of a b ounded convex set S. A
set S is r -compact i there is a numb er r
S
>0 such that @C
r
(S) isjust one (connected)
curve, for anyrr
0
. This denition of r -compactness hasb een intro duced in [5]in the
contextofshowing multigrid convergence ofthe DSSmetho d.
As a main result in this pap er we show that the length of the approximating p olygonal
curve generatedbythe newschemeconvergestothereal p erimeter ofagiven curvewhen
it isconvex.
2 Approximation Scheme
Given a connectedregionS in theEuclidean plane and a gridresolution r ,ther -frontier
of S is uniquely determined. We consider r -compact setsS,and grid resolutions r r
S
forsuchaset,i.e. @C
r
(S)isjustone (connected)curve. Insuch acasether -frontierofS
can b erepresentedin theform P =(v
0
;v
1
;:::;v
n 1
) in which thevertices areclo ckwise
orderedsothattheinteriorofSliestotherightoftheb oundary. Notethatallarithmetics
on vertex indicesis mo dulo n.
LetÆ b earealnumb er b etween0and 1=(2r ). ForeachvertexofP wedeneforwardand
backward shifts: The forward shift f(v
i ) of v
i
is the p oint on the edge (v
i
;v
i+1
) at the
distance Æ from v
i
. The backward shiftb(v
i
) isthat on the edge(v
i 1
;v
i
) at thedistance
Æ from v
i .
For example, in the approximation scheme as detailed b elow we will replace an edge
(v
i
;v
i+1
) by a line segment (v
i
;f(v
i+1
)) interconnecting v
i
and the forwardshift of v
i+1 ,
which is referred to as the forward approximating segment and denoted by L
f (v
i ). The
backward approximating segment (v
i
;b(v
i 1
))is dened similarly and denoted by L
b (v
i ).
Refer to Fig. 1 for illustration. Now we have three sets of edges, original edges of the
r -frontier,forwardandbackwardapproximatingsegments. Basedontheseedgeswedene
a connectedregion A (S), whichis homeomorphic totheannulus, asfollows:
P we obtain a p olygonal circuit Qin counterclo ckwiseorder. In theinitialization step of
our approximationpro cedure weconsiderP and Qastheexternaland internalb ounding
p olygonsofap olygonP
B
homeomorphictotheannulus. Itfollowsthatthisinitialp olygon
P
B
has areacontentszero,and asaset of p oints itcoincides with@C
r (S).
Nowwe`move'theexternalp olygonP `away'fromC
r
(S),andtheinternalp olygonQ`into'
C
r
(S) as sp ecied b elow. This pro cess will expand P
B
step by step into a nal p olygon
which contains@C
r
(S),andwheretheHausdordistanceb etweenP and Qb ecomes non-
zero. Forthis purp ose, we add forwardand backward approximating segments toP and
Q in order toincrease thearea contentsof thep olygon P
B .
To b e precise, for any forward or backward approximating segment L
f (v
i ) or L
b (v
i ) we
rst remove the part lying in the interior of the current p olygon P
B
and up dating the
p olygon P
B
by adding the remaining part of the segment asa new b oundary edge. The
direction of theedgeisdetermined sothattheinterior of P
B
lies totheright ofit.
Denition 2.1 The resultingpolygon P
B
is referred to as the approximating sausage of
the r -frontier and denoted by A
r (S).
The widthof such an approximating sausagedep ends on thevalue of Æ. It is easytosee
that as far as the value of Æ is at most half of the grid size, i.e., less or equal 1=(2r ),
the approximating sausageA
r
(S) is well dened, thatis, ithas no self-intersection. It is
also immediately clear from thedenitionthat theHausdordistance fromther -frontier
@C
r
(S) totheb oundary ofthe sausageA
r
(S)isat mostÆ <1=(2r ).
Wearereadytodene thenalstepin ourAS-MLPapproximationschemeforestimating
thelength ofadigital curve. Ourmetho dis similartothatoftheGC-MLPasintro duced
in [8].
Denition 2.2 Assume a regionS having a connected r -frontier. An AS-MLPcurve for
approximating the boundary of S is dened as being a shortest closed curve
r
(S) lying
entirely in the interior of the approximating sausage A
r
(S), and encircling the internal
boundary of A
r (S).
Itfollows thatsuchanAS-MLPcurve
r
(S)isuniquely dened,andthatitisap olygonal
curve dened bynitely manystraight segments. Note thatthis curve dep ends up on the
choice oftheapproximationconstantÆ. An example ofsuch ashortestclosed curve
r (S)
is given in Fig. 2.
00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000
11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111 11111111111111111111111111111111
Figure2: Constructionofapproximatingsausageandapproximationbyshortest internalpath.
hulls CH
in
of a set of interior p ointsand CH
out
of a set of exterior p ointsadjacent to interior
ones.
3 Convergence Theorem
In this section we provethe main resultof this pap er ab out themultigrid convergenceof
the AS-MLPcurve based length estimationofthe p erimeter ofa given setS.
Theorem 3.1 The length of the approximating polygonal curve
r
(S) converges to the
perimeter of a givenregion S if S is a r -compact polygonal convexbounded set.
We b egin a pro of of this theorem with an investigation of geometric prop erties of the
r -frontier of aconvexp olygonal regionS.
We rst classify r -grid p oints into interior and exterior ones dep ending on whether they
are lo cated inside of theregion S ornot. Then,CH
in
is dened tob ethe convex hull of
the set of all interior r -grid p oints. CH
out
is the convex hull of theset of those exterior
r -grid p ointsadjacenthorizontallyorverticallytointeriorones. SeeFig.3forillustration.
Lemma 3.2 The dierencebetweenthe lengths of CH
in
and CH
out
isexactly 4 p
2=r .
Now,we areready to prove the following lemma which will b e of crucial imp ortance for
proving theconvergencetheorem.
Lemma 3.3 Given an r -compact polygonal convex bounded set S, the approximating
polygonal curve
r
(S) is contained in the region bounded by CH
in
and CH
out .
Pro of We rst note that any convex vertex of the r -frontier is lo cated b etween CH
in
andCH
out
. Anysuchvertexischaracterizedbyaninteriorr -gridp ointpandtwoexterior
r -grid p ointshorizontallyandvertically adjacenttop. Then,thep olygonaledgeofCH
out
cannotcomeclosertoCH
in
b eyondtheedgeb etweenthetwoexteriorp oints,whichpasses
through the convex corner vertex. Thus, such a convex corner vertex is always lo cated
b etweenCH
in
andCH
out
. Thisguaranteesthattheapproximatingp olygonalcurve
r (S)
cannot gob eyond CH
out .
Ontheother hand,aconcavevertexcan b einside CH
in
. However,sucha concave corner
is excluded from the approximating sausage A
r
(S). Supp ose that the horizontal r -edge
incident toaconcave cornervertexp isintersectedbya p olygonedgeof CH andhence
in r
asso ciated withthe p olygon edge is parallel to theedge. Since
r
(S) is a shortest closed
circuit in A
r
(S), it never comes into the concave part by crossing the approximating
segment. Therefore, theshortestpathcannot crossanyp olygonal edgeof CH
in
. QED
LetCH b etheconvexhullofthesetofverticesoftheapproximatingp olygonalcurve
( S).
The convex hull CH isalso b ounded byCH
in
and CH
out
. Obviously, thevertices of CH
areallintersectionsofapproximatingsegments. Furthermore,exteriorintersectionsdonot
contributetoCH,whereexternal(internal, resp.) intersectionsarethose on theexternal
(internal, resp.) b oundary of the approximating sausage. Therefore, we can evaluate the
p erimeter of CH. How far an internal intersection from the b oundary of CH
in
? the
longer an approximating segment, the closer its asso ciated intersection to the inner hull
CH
in
. Thus, it is farthest at a corner dened by two unit edges. Thus, the maximum
distance from CH
in
toCH isb ounded by p
2=6,which implies thatthep erimeter of CH
is b ounded by p
2=3.
Lemma 3.4 Let CH bethe convex hull of all internal intersectiondened above. Then,
the approximating polygonalcurve
r
(S)liesbetweenthetwo convex hullsCH
in
and CH.
The maximum gap between CH
in
and CH is bounded by p
2=6, and for their perimeter
we have
Perimeter(CH)Perimeter(CH
in )+4
p
2=r: (1)
So,iftheapproximatingp olygonalcurve
r
(S)isconvex,thenwearedone. Unfortunately,
itisnotalwaysconvex. Intheremainingpartofthissectionweevaluatethelargestp ossible
dierence on lengthsb etween
r
(S) andCH.
Lemma 3.5 The approximating polygonal curve
r
(S) is concave when two consecutive
long edgesof lengthsd
i 1 and d
i
with interveningunit edge satisfy d
i
>3d
i 1 +1.
Bycarefulcalculation wendthatthedierence Æforeachconcavepartdepicted inFig.4
where d
i
=q;d
i 1
=p isexpressed by
Æ = P1P2+P2P3 P1P3
= s
q
r (4q 1) +
p
r (4p 1)
2
+
2q 1
r (4q 1)
2p
r (4p 1)
2
+ s
2q(2q 1)
r (4q 1)
q
r (4q 1)
2
+
2q 1
r (4q 1)
2q 1
r (4q 1)
2
s
2q(2q 1)
r (4q 1) +
p
r (4p 1)
2
+
2q 1
r (4q 1)
2p
r (4p 1)
2
It is veried that Æ ismonotonically decreasing with p whilemonotonically increasing for
q. Then, we have a b ound Æ < 0:0234=r . Also we can see that such concave parts can
happ en atmost 8times.
Theorem 3.6 S isa bounded, convex polygonal set. Then, there exists a grid resolution
r
0
suchthatforallrr
0
itholdsthatanyAS-MLPapproximationofther -frontier@C
r (S)
is connectedpolygonwith perimeter l
r and
jPerimeter(S) l
r j(4
p
2+80:0234)=r=5:844=r: (2)
P2
P3 p
q
P1
p
O q
P1 P2
P3
Figure 4: Aconcave part.
4 Conclusions
We have presented a new scheme for approximating a digital curve and compared its
p erformance withtheexisting metho ds,DSSand MLP.We proved thatthelength of the
approximating p olygonal curve generated bythe scheme converges tothe real p erimeter
of a given curve when it is convex. The error b ound for our scheme is ab out 5:844=r ,
which isb etween DSSand MLP.Thenew metho dhasb een testedforseveralexamplesof
digitized curves following [4]. However, exp erimental results will b e rep orted in another
pap er duetospace limitations in this publication.
References
[1] T.Buelow,R.Klette: Rubb er bandalgorithmforestimatingthelength of digitized
space-curves. Accepted forICPR'2000,Barcelona, Septemb er 2000.
[2] A.H ubler, R.Klette, K.Voss: Determination of the convex hull of a nite set of
planar p oints within linear time.EIK 17(1981)121{139.
[3] R.Klette, V.Kovalevsky, B.Yip: On the length estimationof digital curves. Pro c.
VisionGeometry VIII,SPIE Volume 3811,Denver, July (1999)117{129.
[4] R.Klette and Ben Yip: The length of digital curves. Machine GRAPHICS & VI-
SION9(2000)toapp ear.
[5] R.Klette,J.
Zunic: Multigrid ConvergenceofCalculatedFeaturesin ImageAnal-
ysis.AcceptedforJournal of Mathematical Imagingand Vision.
[6] V.Kovalevsky, S.Fuchs: Theoretical and exp erimental analysis of the accuracy of
p erimeter estimates. in: RobustComputer Vision(W.Forstner,S.Ruwiedel, eds.),
Wichmann,Karlsruhe (1992)218{242.
[7] A.Rosenfeld: Digitalstraightlinesegments.IEEETrans.Comp.C-28(1974)1264{
1269.
[8] F.Slob o da, B.Za
tko,P.Ferianc: Minimum p erimeter p olygon and its application.
in: Theoretical Foundations of Computer Visi/-on (R.Klette, W.G.Kropatsch,
eds.),MathematicalResearch 69,Akademie Verlag, Berlin(1992)59-70.
[9] F.Slob o da, B.Za
tko, J.Sto er: On approximation of planar one-dimensional con-
tinua. in: Advances in Digital and Computational Geometry, (R.Klette, A.Rosen-
feldand F. Slob o da, eds.)Springer, Singap ore (1998)113{160.