digital straight segments

21
COMPUTER VISION, GRAPHICS, AND IMAGE PROCESSING36, 10-30 (1986) Digital Straight Segments SON PI~AM Department of Computer Science, California State University, Northridge, Northridge, California 91330 Received April 23, 1985; accepted May 30, 1986 It will be proved in this paper that all digital straight segments connecting two given pixels form an area whose lower bound and upper bound are also the digital straight segments. These two bounds will be simply calculated and have the following properties; one is different from the other by unity in the x or y coordinate, and their chain codes of directions reverse from each other. Hence, for practical purposes, these results are used to define general digital straight segments as the digital arcs in this area, and also used to define the convexity and concavity of digital arcs. 1986 AcademicPress, Inc. I. INTRODUCTION On a grid a set of chain pixels is called a digital arc. Chain means every pixel in the set except the endpoints has exactly two neighbors in the same set. Hence a digital arc can be represented by either the sequence of directional changes between neighboring pixels [6, 9], or the sequence of xy coordinates of the centers. A number of authors have studied criteria for a digital arc to be the digitization of a real convex arc or a real concave arc [11, 12]. In other words, they have studied the characterization of digital arcs digitized from the convex or concave real arcs. A well-known definition of the convexity of a real arc is that the real straight segment connecting two real points on the arc is under the arc. But finding a similar definition for digital convex arcs is very difficult, because there are many digital segments between two pixels. So the problem of characterization of digital convex arcs leads to the problem of characterization of digital straight lines [4, 5]. Numer- ous authors have researched this problem [1, 3, 21, 24, 25] and studied criteria of characterization. The importance of the straightness of digital arcs has been studied extensively in the works of Kim [15] and Kim and Rosenfeld [14] in 1982. So far, three characterizations are found: the first one is Freeman's criteria [8], the second one is Rosenfeld's chord property [24], and the last one is the absence of unevenness of Hung [13]. Most works based on these characterizations lead to complex algorithms [4, 5, 39]. Many other works are also related to arcs; examples include handwritten contour analysis [10], convex polygons [33-35, 38], contours [16-23], and languages on grids [4, 5, 30-32, 36-37]. In practice, digitization of straight lines might not satisfy, due to the digitization error, the criteria mentioned above. Hence, a digital arc with few errors in digitization cannot be recognized as a digital straight line. So, how do we know when a digital arc is "nearly" a digital straight arc? To answer this question, the paper will deal with all digital straight segments between two given pixels P and Q. If the area of all digital segments is achieved and calculated, then a digital arc with endpoints P, Q can be defined generally as a digital straight segment if it falls in the area. Such a general definition makes more sense if the upper bound and lower bound of the area are the digital straight segments between P and Q. Therefore, general digital straight segments might not 10 0734-189X/86 $3.00 Copyright 1986 by AcademicPress, Inc. All rights of reproduction in any form reserved.

Upload: son-pham

Post on 04-Jul-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital straight segments

COMPUTER VISION, GRAPHICS, AND IMAGE PROCESSING 36, 10-30 (1986)

Digital Straight Segments

SON PI~AM Department of Computer Science, California State University, Northridge,

Northridge, California 91330

Received April 23, 1985; accepted May 30, 1986

It will be proved in this paper that all digital straight segments connecting two given pixels form an area whose lower bound and upper bound are also the digital straight segments. These two bounds will be simply calculated and have the following properties; one is different from the other by unity in the x or y coordinate, and their chain codes of directions reverse from each other. Hence, for practical purposes, these results are used to define general digital straight segments as the digital arcs in this area, and also used to define the convexity and concavity of digital arcs. �9 1986 Academic Press, Inc.

I. INTRODUCTION

On a grid a set of chain pixels is called a digital arc. Chain means every pixel in the set except the endpoints has exactly two neighbors in the same set. Hence a digital arc can be represented by either the sequence of directional changes between neighboring pixels [6, 9], or the sequence of xy coordinates of the centers. A number of authors have studied criteria for a digital arc to be the digitization of a real convex arc or a real concave arc [11, 12]. In other words, they have studied the characterization of digital arcs digitized from the convex or concave real arcs. A well-known definition of the convexity of a real arc is that the real straight segment connecting two real points on the arc is under the arc. But finding a similar definition for digital convex arcs is very difficult, because there are many digital segments between two pixels. So the problem of characterization of digital convex arcs leads to the problem of characterization of digital straight lines [4, 5]. Numer- ous authors have researched this problem [1, 3, 21, 24, 25] and studied criteria of characterization. The importance of the straightness of digital arcs has been studied extensively in the works of Kim [15] and Kim and Rosenfeld [14] in 1982. So far, three characterizations are found: the first one is Freeman's criteria [8], the second one is Rosenfeld's chord property [24], and the last one is the absence of unevenness of Hung [13]. Most works based on these characterizations lead to complex algorithms [4, 5, 39]. Many other works are also related to arcs; examples include handwritten contour analysis [10], convex polygons [33-35, 38], contours [16-23], and languages on grids [4, 5, 30-32, 36-37]. In practice, digitization of straight lines might not satisfy, due to the digitization error, the criteria mentioned above. Hence, a digital arc with few errors in digitization cannot be recognized as a digital straight line. So, how do we know when a digital arc is "nearly" a digital straight arc? To answer this question, the paper will deal with all digital straight segments between two given pixels P and Q. If the area of all digital segments is achieved and calculated, then a digital arc with endpoints P, Q can be defined generally as a digital straight segment if it falls in the area. Such a general definition makes more sense if the upper bound and lower bound of the area are the digital straight segments between P and Q. Therefore, general digital straight segments might not

10 0734-189X/86 $3.00 Copyright �9 1986 by Academic Press, Inc. All rights of reproduction in any form reserved.

Page 2: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 11

FIG. 1.

y axis

3 \ ~ /1 " N / 0 / \ / I \

5 6 7 1 2 3 - -x axis

(a) (b)

(a) 8 neighbors and 8 directions. (b) a xy coordinate system on a grid.

satisfy all three of Freeman's criteria. Moreover, if the upper bound and lower bound of the area are determined precisely, then an algorithm for determining a digital arc to be straight can be derived easily.

A chain code is a set of pixels so that all pixels except endpoints in the set have exactly two neighbors. If the set has infinitely many elements, we call it an infinite chain code, otherwise we call it a finite chain code or a digital arc.

Mathematical Notation. Some notation is introduced for use throughout the

the remainder of the integer g divided by the integer c. It is also called g modulo c.

abs_(x): the absolute value of the number x. /-1, 12 , . . - , / c - i : a sequence.. , l o, 11, . . . , I t_ 1, l o, 1 t . . . . . 1c_1,. . . (the bars indi-

cate the repetition of numbers between bars). (g, c) = 1: two integers g and c are relatively prime.

I x ]: the greatest integer less than or equal to the number x. [ x ]: the smallest integer greater than or equal to the number x.

Preoious Work. A pixel on a grid has 8 neighbors: 2 horizontal, 2 vertical, and 4 diagonal. These 8 neighbors are denoted from 0 to 7 counterclockwise. Henceforth we have also 8 directions from one pixel to its 8 neighbors. The numbers 0 to 7 can also be used for directions. (See Fig. la).

Coordinates of Pixels. A n x - - y coordinate system can be used on the grid to locate the positions of pixels. The origin of the system is placed at the center of a pixel, and moreover all centers of pixels have integer coordinates. (See Fig. lb).

Henceforth, a chain code can be represented by one of the fol lowingtwo sequences:

(a) It can be represented by coordinates of centers of the pixels. (This represen- tation can be used for any set of pixels and is not restricted only to the chain code).

(b) It can be represented by a sequence of directions from pixels to their neighbors. In this representation, if the picture is to be recovered from the chain code, one pixel should be known as a starting point.

Freeman [7] suggested three criteria for a chain code (represented by a set of directions) to be a digital straight line:

(1) At most two basic directions are presented and these can differ by unity modulo 8.

entire paper. Ig[c:

Page 3: Digital straight segments

12 SON PHAM

(2) One of these values always singly occur.

(3) Successive occurrences of the principal direction occurring singly are as uniformly spaced as possible.

We observe that if a chain code satisfies these three criteria above, then its finite subchain code might not satisfy criteria 3.

Several authors [1, 2, 3, 7, 23, 39] provided algorithms to digitize a drawn real line to obtain digital straight lines. Since each real line can be drawn if the slope is given, then many algorithms attempt to find the digital straight lines if rational slopes are given.

Later Rosenfeld [24-29] introduced the chord property and proved that a digital arc (finite chain code) having the chord property is a digital straight line segment. In this case the chord property implies the first two of Freeman's criteria. This result can be extended to the infinite chain codes, and the chord property is equivalent to Freeman's three criteria [24, 39]. The chord property is defined as follows:

Let ~ be a finite digital arc. Let P, Q be two pixels in this arc. Let PQ denote the real straight segment between the centers of P and Q. We say that PQ lies near ~ if, for any real point (x, y) of PQ, there exits a pixel in ~ with center (i, j ) in ~ such that

max(abs(i - x) , a b s ( j - y ) ) < 1. We say that ~" has the chord property if, for every P, Q in ~, the straight segment PQ lies near ~'.

Recent Results. The Chain Code Formulas. The chain codes of directions of digital straight lines with slope g/c , (g , c) = 1 can be obtained by the following formulas. We note that the formulas are slightly different on 8 regions of slopes, and these chain codes satisfy the three criteria of Freeman.

Region 0 (0-45~ periodic sequence: 1o, I t . . . . . Ic_1, where a i -- Ig" ilc; i = 0,1 . . . . . (c - 1); l i = (a i - ai+ x + g)/c;

Region 1 (45-90~ periodic sequence: (l o + 1),(l t + 1) . . . . ,(lg_ 1 + 1 ) ,

where (lo, 11 . . . . . Is_t) is the chain code of the line with slope (g - c)/g. (See Region 0.)

Region 2 (90-135~ periodic sequence: (3 - lo),(3 - 11) . . . . ,(3 - lg_t), where (l o, 11,. . . , Is_l) is the chain code of the line with slope (g - c)/g. (See Region 0.)

Region 3 (135-180~ periodic sequence: (4 - lo) , (4 - ll) . . . . . (4 - /c-l), where (1 o, ll, . . . . lc_1) is the chain code of the line with slope g/c. (See Region 0.)

Region 4 (180-225~ periodic sequence: (4 + 10),(4 + lt) . . . . ,(4 + lc_t), where (l o, I t , . . . , 1c_1) is the chain code of the line with slope (g) /c . (See Region 0.)

Region 5 (225-270~ periodic sequence: (5 + 1o),(5 + ll) . . . . ,(5 + l~_1), where (l o, l t . . . . , ls_t) is the chain code of the line with slope (g - c)/g. (See Region 0.)

Region 6 (270-315~ periodic sequence: (7 - 10), (7 - l l ) , . . . , ( 7 - / g - l ) ,

where (10, 1 t . . . . . /g- l ) is the chain code of the line with slope (g - c)/g. (See Region 0.)

Region 7 (315-360~ periodic sequence: (8 - lo), (8 - ll) . . . . , (8 - lc_l), where (/0, / 1 . . . . . lc_l) is the chain code of the line with slope g/c. (See Region 0.)

Page 4: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 13

Results o f this Paper. Given two pixels P and Q whose centers are denoted respectively by (x~, y~) and (xQ, yq). The slope of the real straight line passing through these two centers is g / c where g = abs(yQ - Y e ) and c = abs(xQ - Xp). Since the chain code of directions from P to Q is slightly different depending on the position of P and Q (see Recent Results), we assume throughout this paper that P is the origin (0, 0) and Q is in region 0. The results for Regions 1-7 are similar and will not be reported here in order to avoid the technical complexity of this paper.

With two given pixels P and Q above, how many digital straight segments are there to connect P to Q? In order to answer this question, shift and reverse operators are introduced.

The segment l o, l 1 . . . l c_ 1 is a periodic sequence of the digital straight line of slope g /c . It can be viewed geometrically as a path to connect a pixel to another pixel which has distant c pixels horizontally and g pixels vertically. Therefore, shift or reverse operators can be used to obtain other digital straight segments from P to Q. Let 1 = (l o, l I . . . . . / c - 1 ) , then shift and reverse operators are defined as follows:

shift(/o, l l , . . . , lc_l) -- ll, 12, . . . , lc_l, 10;

reverse(/0, ll . . . . . lc_1) = lc_1, 1c_2, . . . , ll, lo.

If the shift operator is used multiple times, then there is a set of c different digital segments from P to Q: 1, shift(l), shift2(l) . . . . . shiftc-l(l). The superscript indicates the number of times the shift operator is applied. Similarly, the shift operator can be applied multiple times on reverse(l) to get a set of c different digital segments: reverse(l), shift(reverse(l)),. . . , shiftc-l(reverse(l)). The two above set are the same, i.e., reverse(l) is shiftk(l) for some k.

So far there are c different digital straight segments being generated. Are there any other digital straight segments from P to Q? It is rather difficult to find all digital straight segments, because as a conceptual definition of digital straight segments, they are digital arcs from P to Q of digital straight lines passing through P and Q. Therefore, we consider the set of these c different digital straight segments which form an area between P and Q.

It is proved that this area has an upper bound and a lower bound as digital straight segments from P to Q. Moreover, any straight line passing through P and Q will have their line segments between P and Q in the area. For practical purposes, the lower bound is l and the upper bound is calculated from the lower bound by one of the following two methods: (a) the upper bound is different from lower bound by unity in some sense of y coordinates and (b) the upper bound chain code can be obtained from the lower bound chain code by the reversed operator.

II. ILLUSTRATION

Given two pixels with centers P = (0,0) and Q = (12, 5). All digital straight segments connecting P to Q will be illustrated in here. One of these segments is calculated as follows:

ai = 15ih2 and l i = (a i - ai+ 1 + g ) / c for i = 0,1 . . . . . 11.

Page 5: Digital straight segments

14 SON PHAM

TABLE 1

i 0 1 2 3 4 5 6 7 8 9 10 11 12

a i 0 5 10 3 8 1 6 11 4 9 2 7

I i 0 0 1 0 1 0 0 1 0 1 0 1

Yi 0 0 0 1 1 2 2 2 3 3 4 4 5

t T endpoint endpoint

Note. First row: the integer x coordinates; second row: the cyclic group of modulo 12; third row: the periodic sequence of directions; fourth row: the integer y coordinates.

Each direction /~ will connect two pixels whose centers are (i, y~) and (i + 1, Yi+I) where

Yo = 0 (an endpoint), i--1

y i = ~ , l j for i = 1,2 . . . . . 11, j=O

Y12 = 5 (an endpoint).

So we have the summary in Table 1. We call c- x ( l i ) i = o the sequence of directions connecting P to Q. We call (Yi)~l the

corresponding sequence of y levels. The shift operator will generate the other 11 digital straight segments from P to Q depending the number of shifts. These digital straight segments are listed below with their corresponding y levels. (See Table 2).

The reversed operator will generate 12 digital straight segments by reversing the 12 previous sequences listed above. For example, lo , l 1 �9 �9 �9 l c _ 2 l c _ 1 w i l l be reversed

TABLE 2

12 Digital Straight ~gmentsConnecfing P to Q Generatedby theShifts

# of shifts Digital straight segment The corresponding y levels

0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 * 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 5 2 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 5 5 3 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 2 2 3 3 4 4 4 5 4 1 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 2 2 3 3 4 4 4 5 5 5 0 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 6 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 5 7 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 5 5 t 8 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 2 2 2 3 3 4 4 4 5 9 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 2 2 2 3 3 4 4 4 5 5

10 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 2 2 3 3 3 4 4 5 11 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 2 2 3 3 3 4 4 5 5

Note. *: the minimum of all y levels; t: the maximum of all y levels.

Page 6: Digital straight segments

DIGITAL STRAIGHT SEGMENTS

TABLE 3

12 Digital Straight Segments Connecting P to Q

# of Reversed digital y level of the reversed shifts straight segment digital straight line

15

0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 5 5 * 1 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 5 2 0 0 1 0 1 0 1 0 0 1 0 1 0 0 0 1 1 2 2 3 3 3 4 4 5 3 1 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 2 2 3 3 4 4 4 4 5 4 0 1 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 2 2 3 3 4 4 4 5 5 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 5 5 6 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 5 7 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 2 2 2 3 3 4 4 5 8 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 2 2 3 3 3 4 4 5 5 9 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 1 2 2 3 3 3 4 4 5

10 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 2 2 2 3 3 4 4 4 5 5 11 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 1 2 2 2 3 3 4 4 4 5

to be lc_l lc_ 2 . . . 111 o. The new 12 reversed sequences are also digital segments connecting P to Q. They are listed below with their corresponding y levels. (See Table 3.)

They are reversing segments of the 12 segments in Table 2. We notice that Tables 2 and 3 have the same digital straight segments. In Table 2, the minimum of y levels is at the beginning of the table, while in Table 3, the maximum is. Figure 2 will show two segments rain I and max l.

III. DIGITAL STRAIGHT SEGMENTS: SHIFT AND REVERSED OPERATORS

Given P = (Xe, yp) and Q = (Xo, yo). The slope g / c of the real line passing these two real points are calculated by g = abs(y o - Ye) and c = abs(x o - xe). We assume without loss of generality that P = (0, 0) and (g, c) = 1, We also refer to pixels by their centers, for example, the pixel P means the pixel with center P.

Consider the sequence l = (l 0, l 1 . . . . . l c _ l ) calculated by the formulas:

a i = Ig" ilc, l i = ( a i -- a i+ 1 + g ) / / c f o r i = 0 , . . . , c -- 1.

5

4

3

2

1

_ / , o

__/ / - - -

J 1 2

max,. J / - /

/ " ' " / . r min~ /

f

/ - / . _ / /

/ f-

3 4 5 6 7 8 9 10 11 12

FIG. 2. Area of digital straight segments from P = (0, 0) to Q ~ (12, 5). It is bounded by two digital s t r a i g h t s e g m e n t s m . i n a n d m a x : m i n l = ( 0 0 1 0 1 0 0 1 0 1 0 1 ) ; m a x l = ( 1 0 1 0 1 0 0 1 0 1 0 0 ) .

Page 7: Digital straight segments

16 SON PHAM

So, we have the following results repor ted in [40]:

THEOREM (see proof in [40]). The sequence l = ( l o, I 1 . . . . . lc_l) is a digital straight line with slope g / c . There are g direction l ' s and ( c - g) direction O's in the period l o, l 1 . . . . . lc- i.

As a result of this theorem, we can conclude that l = (l o, 11,---, lc-1) connects P to Q, because Q has a distance f rom P of g pixels vertically and c pixels horizontal ly.

Shif t and Reversed Operators. We define the shift opera to r as a funct ion on the Car tes ian p roduc t

D x D • ... •

c tithes

where D = ( 0 , 1 , . . . , 7} is the set of 8 directions. We also denote s" as a composi te func t ion of s applied n times, for all positive integers n . The nota t ion s o is cons idered as the identi ty function. Here are some examples

s~ ll . . . . , / c - t ) = (lo, l l , - . . , l~-1),

s l ( lo , l t , - . . , / c - t ) = ( l l , 12 . . . . . lc-1, lo).

�9 We define the reversed operator r on the same Cartesian product D • D • . . . • D (mult iphed c times). For example,

r ( lo , It . . . . . / c - i ) = ( / c - i , lc-2 . . . . . ll, lo).

The following are the properties of s and r:

(1) s and r are two bijections on D • D • . . . • D,

(2) r 2 __ s~ (identity),

(3) r ( s k) = sC-k(r) , for all intege r k.

Y-leoel Function. For each digital straight segment in Region 0, the directions can only be 0 or I (as we ment ioned above, we restrict our discussion to this region only because the discussions are similar for the other regions). Hence, the coordi- nates of the pixels forming a digital straight segment can be constructed as partial sums of the sequence of directions. For example, the digital straight segment l -- ( l o, l 1 . . . . . / c - i ) has the coordinates (i, Yi); i = 1 ,2 . . . . . c - 1, where

i--1

y,=Elj. j = 0

For completeness, let Yo = 0 and Yc = g. Henceforth, for i = 0,1 . . . . . c - 1; l i will connec t the center (i, y~) to the center (i + 1, Yi+t). We call (Y~)~=o the correspond- ing sequence of y levels, and denote it level (1).

Page 8: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 17

Some properties of y levels are listed as follows: For every two digital straight segments 1, 1' connecting P to Q in Region 0, we have:

(1) their corresponding sequences of y levels are increasing,

(2) 1 ~ l ' iff their corresponding sequences of y levels are different.

The y-level function is very convenient to define the positional order of the chain segments:

l < l ' (it is said that I is below 1') iff level(l) < level(l ') .

This order will be used to define the upper bound and lower bound of the area of all digital straight segments from P to Q, and it will be used widely in the later proofs.

Now we prove the following proposition which describes the relationships amongst 1, s, and r.

PROPOSITION 1. We have the following properties:

(1) 1, s ( l ) , s2(l) . . . . , sC- l ( l ) are all different;

(2) r ( l ) , r ( s ( l ) ) , r (s2( l ) ) . . . . . r ( sC- l ( l ) ) are all different;

(3) two sets in (1) and (2) are the same, i.e.,

(s (t)lk=0,1 . . . . . c - I} = { r ( s J ( l ) ) ~ ' = O , 1 . . . . . c - 1}.

Proof. Result (2) can be derived from result (1). So, we prove only results (1) and (3).

Proof of Result (1). We have

j - 1 j - 1 ai + g a o -- a j + j �9 g E l i = E -- a i+ l =

i = 0 i=O C C

We extend the definition of a i for i < c to the case where 1 > c. That is, ai = Ig �9 ilc for all integer i. Therefore, a i = ai+kc for all integer k and c. We have

j--i j - I ,_,Y' .,,,[s~'tl~l ' = ,.Y' ai+ k a i+k+ 1 + g = a k -- a j+k + j . g

i=0 i=0 c c

We will prove s k ( l ) ~ sk'(l) for all k :g k' , by showing their corresponding se- quences of y levels are different. Applying the above equations for k and k' , we have

j - 1

,.r L,,,rsk l , -- ak - a j + , + j . g i=O C

j - -1

,.i,v' = - aj+ , + j . g i=O c

Page 9: Digital straight segments

18 SON PHAM

The p roof of result (1) is then reduced to finding an integer j so that

a k - aj+ k ~ a k, - aj+ k,

or (by definit ion of a ' s )

Ig" k l ~ - Ig" k'l ~ ] g ( J + k ) l ~ - I g ( j + k') 1~. (1)

N o w we find an integer j to satisfy this inequality. We have Ig " k i t ~ Ig " k'l~ as a result of (g , c) = 1. So, we can assume without loss of generality that

Ig" klc < Ig " k'l~.

Therefore , a constant M, less than c, can be found such that

Ig" kl~ + M < c < Ig" k'l~ + M.

Since a~'s, with i = 0 , 1 , . . . , c - 1, generate the set {0,1 . . . . . c - 1}, i.e., { I g ' J l c IJ = 0 . 1 , . . . , c - 1} = {0, 1 . . . . . c - 1}, therefore we can select an integer J0 so that

M = Ig 'Jolc-

We have

IIg" kl~ + J 0 " g]~ = Ig" kl~ + I J " g l c - c

IIg" k'lc + J o " g[~ = Ig" k'l~ + l J " gl~

and their difference is

Jig" k i t + Jo " g l c - [ I g " k'l + Jo" glc = Ig " k l ~ - Ig" k'l - c.

This implies inequali ty (1) is valid for this J0. Q.E.D.

Proof of Resuh (3). To prove result (3), i.e., to prove (l , s( l) , s2( l ) . . . . , s c - l ( l ) } = { r ( l ) , r[s(l)] . . . . ,r[sC-l(l)]}, we need to prove only r ( l ) = sg(l) , for some integer k. So, we prove the following proposit ion.

PROPOSITION 2. There exists an integer k so that r ( l ) = sk( l) .

Proof. We have by definitions of l, r, and s,

j - -1 j --1

y , [ r ( / ) ] i = E l c _ l _ i = a c _ j - a r + j g _ a r i = 0 i=0 C C

j--1 j--1 ak + j g

E [sl"(l)]i = E 11,+i = - al"j i=0 i=0 C

Hence , the prob lem is reduced to finding an integer k, independent of j , so that ar = a k - ak+ j, for all j = 0,1 . . . . , c - 1. It is equivalent to prove with j =

Page 10: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 19

1 . . . . . c - 1 (case j = 0 is evident),

Ig( c - g) I~ = Ig" kl~ - I g ( k +J ) I~ - (2)

We prove this equat ion as follows: since (g, c) = 1, therefore all a~'s; i = 0, 1 . . . . . c - 1 are all different and form the set {0, 1 . . . . . c - 1}. Hence, there exists an in teger k 0 so that

ako = C-- 1, i.e., [ g . ( k o ) l ~ = c - 1.

This k o is the candidate for Eq. (2). Indeed, with ko, the r ight-hand side of Eq. (2) is calculated as

Ig" (k0)[c-Ig" (ko + J ) l c = c - 1 - I ( c - 1) + g "Jlc-

Because Ig "Jl~ > 0, for all j = 1,2 . . . . . c - 1, therefore

](c - 1) + g "Jlc = (c - 1) + Ig "Jl~ - c = - 1 + Ig "Jl~.

Hence

[ g . ( k o ) l c - [ g . ( k 0 + j ) [ = c - 1 - ( - l + [ g - j [ c ) = C - [ g . j [ c

which is equal to the left-hand side of (2). Q.E.D.

IV. LOWER BOUND AND UPPER BOUND DIGITAL STRAIGHT SEGMENTS

In the previous sections, we constructed c different digital straight segments f rom the pixel P = (0,0) to the pixel Q -- (c, g), where (g, c) = 1. These c segments are shif ted f rom each other and one of them is l = ( l o, l 1 . . . . . l c_1) which is given by

the formulas l i = (a~ - a~+ 1 + g ) / c , with a~ = [g �9 i[c, for i = 0, 1 . . . . , c - 1. Also each segment corresponds to a sequence of y levels which are y coordinates of the centers of pixels in the segment. Let min y and max y be respectively the minimum and m a x i m u m of all these c corresponding sequences of y levels, i.e.,

(min Y ) i = m i n i m u m { ( s k ( 1 ) ) i [ k = 0 , 1 , . . . , c - 1}

(max Y ) i = m a x i m u m { ( s k ( l ) ) i [ k = 0 ,1 . . . . . c -- 1}

m i n y < l e v e l ( s k ( l ) ) < m a x y for all k.

We will prove in this section that min y and max y are also two corresponding sequences of l and r ( l ) , respectively. In other words, we have the following proper ty :

l < _ s k ( l ) < r ( l ) for all k = 0,1 . . . . , c - 1 .

Moreover , min y and max y are different by unity except for the endpoints, i.e.,

(max y)o = (min y)o = 0,

(max y)~ = (min y)~ + 1 for all i = 1 ,2 . . . . . c - 1 ,

(max y ) c = (min Y ) c = g.

Page 11: Digital straight segments

2 0 SON P H A M

PROPOSITION 3. We have the following order

l < s k ( l ) f o r a l l k = 0 , 1 . . . . . c - 1 .

(This proposition hence implies that l = rain l.)

Proof. For all j = 0 , 1 , . . . , c - 1 the sum of the first j terms (from index 0 to index j - 1) of the code is calculated as follows:

j - 1 j= l __ + g = a o aj + j . g (3) E l i = E ai a i+l iffiO iffiO C C

Similarly, the new code being shifted k times (any integer k) from the code will have the sum of the first j terms (from index 0 to index j - 1) being calculated as follows:

j - 1

E [ s ( k ) ( l ) ] i = E li+k i f 0

jffi l ..[_g -- E ai+k-- ai+k+l (4)

i=O C

a k - aj+ k + j �9 g

c

To prove min I = l, it is sufficient to show that l is lower than any of its shiftings, i.e., to show the value in (3) is less than the one in (4) for all j and k. Simply it is equivalent to show

aj + a k < a j+ k for all j and k.

We prove this inequality as follows: by the definition of a ' s we have aj = Ig "Jlc and a k = Ig " kit. Therefore there exists m and n so that

g . j = aj + mc and g . k = a k + n �9 c.

Hence, g ( j + k ) = (aj + ak) + ( m + n)c. Therefore,

aj+ k = l g ( j + k ) l c = laj + aklc<_ aj + a k. Q.E.D.

PROPOSITION 4. max ! = r( l ) .

Proof. The proof is similar to the one to prove min l = l. We can calculate the following equalities:

c - 1

E l,-- c ( 5 ) iffi0

j--1 j--1 a o -- a j + j �9 g E [ r ( l ) l , - - - c - E l , = c - (6) iffiO iffiO c

j--1 j - 1 a k -- ak+ j - t - j �9 g E ( s < k ) ) r ( l ) ) , = r - - E l ,+k = c -- ( 7 ) i~O iffi0 c

Page 12: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 21

To prove max l = r( l) , it is sufficient to show that r ( l ) is greater than any of its shiftings because { s i ( l ) l i = 0 . . . . } = ( r ( s i ) l i = 0 . . . . }, i.e., to show the value in (6) is less than in (7) for all j , k. Again, the problem is reduced to proving aj + a~ >

a j+ k for all j , k which was proved int he proof of nan l = l. Q.E.D.

PROPOSITION 5.

[level(max 1)] j -x = [level(min 1)] j -1 + 1 for all j = 1,2 . . . . . c - 1 and

[level(max l)1 c-x = [level(nan/)1 ~-1 (case j = c).

Proof. We have for all j = 1, 2 . . . . . c - 1

j--1 j--1 ( m a x / ) / = ~ [ r ( l ) ] i = a c - j - a c + j ' g

i=0 i~0 c

j - I j - 1 a o - a j + j . g E (nan t) , = E ti = i=0 i=0 c

ac_ j + j " g

The difference of the two above is (a~_j - a j ) / c . To prove the equality we need to show that

a c _ j + a j = c for a l l j = l , 2 , . . . , c - 1 .

Indeed, if we let u = Ig" J l c then for any j = 1, 2 . . . . . c - 1, we have g . j = u + mc for some m. Hence, g . c - g - j = - u + (g - m)c. Therefore [gc - g j[ ~ = (c - u

or a c - j + a j = c. For the special case j = 0 or j = c we have

ac_ j + aj = a c + a o = O. Q.E.D.

V. AREA OF ALL DIGITAL STRAIGHT SEGMENTS

In this section, we will prove that the area of all digital straight segments from P to Q is bounded by two digital straight segments min l and max I (i.e., between l and r ( l ) ) . In other words, we will prove that for any digital straight line passing through P and Q, and denote its segment from P to Q by l ' , then the following orders are valid:

1 < l" < r ( l ) .

In order to prove this property, we will show that

(a) First, the real line segment P Q is completely inside the area bounded by min l and max I.

(b) Second, there is no other straight line segment from P to Q having at least one pixel outside the area. In other words, we will show that, as a result of (a) and the chord property, a straight segment from P to Q having one of its pixels outside the area will not have the chord property.

Page 13: Digital straight segments

22 SON PHAM

THEOREM 1. We have the following properties:

(1) There are no center points of rain l and max l on PQ, i.e.,

j - 1 j - 1 El i E (r(l)), i=0 g i=o g

- - ~ - and ~ - j c j c

for a l l j = 1, 2 , . . . , c - 1.

(2) The real straight segment PG is above min l, i.e., the real straight segment PQ is above the real broken segment formed by connecting the centers:

(0 ,0 ) , j , I i = 1 . . . . c - 1 , and ( g , c ) .

(3) The real straight line PQ is below max l, i.e., the real straight segment PQ is below the broken real segment formed by connecting the centers:

(o,o), J, E [ . . . . i~o r j = 1, .. c - 1 and ( c , g )

Proof of Property (1). Suppose there is an integer j , ( j > 2) so that

i ~ 0 1 = g / c .

Therefore, b y the definition of li 's we have

- a j + j . g g

j . e e or - a j + j - g = g - j .

Hence aj = 0, i.e., j -- 0 or c. therefore, a contradict ion occurs. We conclude that there are no center points of min I on PQ. Similarly, there are no center points of max / on PQ, and the proof is similar to the one above. Indeed, suppose there is an integer j ( j < c) such that

[ r ( l ) ] , =

H e n c e ac_ j - a c + j . g / j . c = g / c or ac_ j = 0. Hence, c - j = 0 or c, i.e., j = 0 or j = c. Therefore a contradict ion occurs.

Proof of Property (2). We will show that every real point R = (x R, YR) on the real straight segment P---Q, the value YR is greater that y~, where (XR, y~) is on the

Page 14: Digital straight segments

D I G I T A L S T R A I G H T S E G M E N T S 23

/ P

the upper bound / a

$ / / / / the lower bound

FIG. 3. The lower bound ; the upper b o u n d ; the Bresenham's . . . . . . . .

broken segment formed by connecting the centers

(0, 0), j , I i = 1 . . . . . c - 1 and (c, g ) . i =

(See Fig. 3 for more details). It is equivalent to prove that for the point R with x R = 1,2 . . . . . c - 1

Y~o/j > l, . (8)

The reason that we can reduce to the R ' s with integer coordinates x R because in general two points R, S are under R', S ' in the sense that xR = xR,, Xs = Xs,, YR < YR', and Ys < Ys', then the segment R S is under R'S'.

N o w we prove the inequality (8): for j -- 1, 2 . . . . , c - 1, we consider the center

and the point ( j , YR),

we have

j - 1 - -a j + j �9 g

~_~ li = i = 0 c

and since R is on PQ, then YR/J = g/c. Hence YR = g . j / c which makes the inequality (8) hold. Q.E.D.

Proof of Property (3). Similarly, to prove PQ is under max l, we consider the center points of max l, (11 /

j , ~ ( m a x / ) , , j = 1 , 2 , . . . , c - 1, j = 0

and the real point R = ( j , YR) on PQ, and we need to prove

j - 1

s ( m a x / ) / > Y R . i = 0

Page 15: Digital straight segments

24 SON PHAM

Indeed,

j x

E ( m a x l ) i = I i + 1 = i=0

c - a j + j . g j . g > - - = YR. Q.E.D.

c c

No Digital Straight Segment Outside the Area

We will prove in this section that there are no digital straight segments which fall outside the area bounded by min l and max l.

THEOREM 2. All digital straight segments from P to Q are in the area bounded by min l and max l.

Proof. Let LINE be a digital straight line passing through the pixels P and Q (i.e., the LINE contains P and Q). Therefore, LINE satisfies Rosenfeld's chord property. Consider the segment of LINE between P and Q. We want to prove that this segment is inside the area mentioned above. We will prove it by a contradiction.

Assume that this digital straight segment is not inside the area, then there is a pixel, say S = (x s, Ys) of this segment and outside the area. We have two cases: S is under re_in l and S is above max 1. We prove the case S is under min l; the proof of the other case will be omitted because of the similarity.

Case S Is under mini. We will show that LINE does not satisfy the chord property for a contradiction. More precisely we will show the point R -- (xR, YR) with x R = x s on the real straight segment PQ has a distance to LINE greater than 1, i.e., we will show that for all points (i, j ) of LINE

m a x ( a b s ( i - x R ) , a b s ( j - xR) } > 1.

(The quality on the left-hand side of inequality is the distance between (i, j ) and R = (x R, YR))- Since LINE can only have two directions 0 and 1, so the next pixel after S cannot be above the pixel S ' = (x s + 1, Ys + 1). Since S is under min l hence S ' cannot be above rain l. (It is possible that S ' is on min l.)

Similarly, the pixel before S, cannot be above S " = (x s - 1, Ys) we need only to prove

(1) d i s t ( R , S ) > 1

(2) dist(R, S ' ) > 1

(3) dist(R, S " ) > 1.

Indeed, because S is strictly under rain and PQ is strictly above min therefore abs(ys - YR) > 1. Hence dist(R, S) > 1. Since S " and S have the same y coordi- nates, dist(R, S " ) is greater than or equal to 1. Similarly R and S have the same x coordinates and x s, = x x + 1 therefore dist(R, S ' ) > 1. Q.E.D.

VI. CONVEX ARCS AND CONCAVE ARCS

In the previous sections, we prove that given two pixels with centers P = (xe , Ye) and Q = (xQ, yQ), the area containing all digital straight segments from P and Q can be determined by its lowerbound and upperbound. These two bounds are also

Page 16: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 25

digital straight segments from P to Q. The lower bound is proved to be

t = (10 . . . . . t o _ l ) ,

where l i = (a i - ai+ x + g ) / c ; ai = I J " ilc; g = abs(yo - Yp), c = abs(x o - The upperbound is r ( l ) = (lc_ 1 . . . . lo).

These two bounds can also be represented by their xy coordinates of pixels:

x~,).

(( ), ) l :(0,0), j , l i = 1,2 . . . . . c - 1 , (c, g)

r(l):(O,O), j , l i + l ) j = l , 2 . . . . , c - 1 , ( c , g ) . i=

The reason for the bound l (resp. r ( l ) ) to be called lower bound (resp. upper bound) is it has the smallest (resp. largest) y coordinates among all digital straight segments from P to Q. We call (~i=0J-1 li ' j = 1, 2, . . ., c - 1) the corresponding sequence of y coordinates of the digital straight segment and denote it by level (l).

The reason for the bound l (resp. r ( l ) to be called lower bound (resp. upper bound) is that it has the smallest (resp. largest) corresponding sequence of y coordinates among all digital segments from P to Q., i.e., for all digital straight segments from P to Q we have

level (1) < level (1') < level (r (1)).

So, we can define the order relationships among all digital straight segments from P to Q as follows:

l ' < l " iff level ( l ' ) < level ( l " )

for all digital straight segments l ' and l". Up to this section, we refer to a digital straight segment from P to Q as a

segment between P and Q of a digital straight line which satisfies three Freeman's criteria or Rosenfeld's chord property. It is clear that in the area bounded by I and r ( l ) , there are many digital arcs from P to Q without the Rosenfeld's chord property of the three Freeman's criteria. So, we redefine the digital straight segment from P to Q as follows.

GENERAL DEFINITION OF DIGITAL STRAIGHT SEGMENT. A digital arc f rom P to O is a digital straight segment if it is inside the area bounded by l and r(l), i.e., let ( j , yj) be a pixel-ccnter point of this digital arc, then

( , ~ 0 l` < yj < l, + 1 .

(We note that the digital arc in this definition might have many pixels of the same x coordinates). With the previous definition, a digital straight arc does not neces- sarily satisfy Rosenfeld's chord property or all the three Freeman's criteria. But it

Page 17: Digital straight segments

26 SON PHAM

lies between two bounds satisfying this chord property or these criteria. For a practical purpose, a digital arc lying between two bounds can be detected, hence it can also be represented by either the lower bound or the upper bound.

The lower-bound and upper-bound digital straight segments are useful in defining convex and concave arcs .

DEFINITION OF CONVEX AND CONCAVE ARCS. G i v e n a digital arc ~:

(a) It is called digital convex arc if

Ij, Q < PQ for every P, Q in ~, and for some l,

where P Q denotes a sub-arc of ~ from P to Q, and lpe denotes the lowerbound digital straight segment from P to Q.

(b) It is called digital concave arc if

P"-Q<r( leQ ) for every P, Q in ~,

where r(lpQ) denotes the upper-bound digital straight segment from P to Q.

APPENDIX: IMPLEMENTATION: NEW ALGORITHM AND BRESENHAM'S ALGORITHM

In this section, a new algorithm for digital straight segments will be introduced. It is well suited to implementation in hardware or on simple microprocessors because it avoids multiplications and divisions. First, a new algorithm will be introduced, and then compared with the Bresenham's algorithm.

NEW ALGORITHM. Given two pixels with centers P = (0, 0) and Q = (c, g), the lower-bound digital straight segment (li)~21o connecting P to Q is given by the formulas:

ai = Ig" il~ and l~ = (a~ - a~+ 1 + g ) / c for i = 0 . . . . , c - 1.

If an algorithm is based strictly on these above formulas, it will require the modulo operator and division operator. To avoid these operators, we use the following results to produce an algorithm, requiring neither divisions nor multiplications:

(1) For i = 0, 1 . . . . . c - 1,

(2)

a~ - a~+ 1 = - g (Case 1)

or a~ - ai+ 1 = c - g. (Case 2)

a o = 0,

al = la0 + glc

( a i + g

ai+l = [ai + g[c = ai + g - c i f a i + g < c

i f a i + g > _ c

(Case 1)

(Case 2)

(3) Case 1 produces Direction 0 Case 2 produces Direction I

Page 18: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 27

(* all variables are integers *) a -'= 0; y : = 0 ; x - '= 0; f o r i : = t o c d o

b e g i n

i f a + g < c then anext := a + g else anext := a + g - c;

i f a - anext = - g then begin write('direction0'); y := y; e n d

e l s e begin write( 'directionl '); y := y + 1; end; a := anext; x .'= x + 1; plot(x, y);

end;

The above algorithm can also be reduced by merging two if statements and omit t ing the variables a and a next.

(* all variables are integers *) x .'= 0; y : = 0 ; e : = c - g ; f o r i : = l t o c d o

begin i f e > O

t h e n e : = e - g

else begin e : = e + c - g ; y : = y + l

end; x : = x + l ; plot(x, y) ;

end;

Bm~SENHAM'S ALGOmTrlM. The Bresenham's algorithm constructs a digital seg- ment of the centers to PQ in the following sense. For all centers of the same x coordinates, the one closest to the real line PQ will be selected (see Fig. 3). To express it mathematically, we let R = (i, YR), with an integer x coordinate i, be a point on the real line P-Q, then

YR g g - or YR -- - " i .

i c c

The selected center (i, J0) is the one among the centers {(i, J)lJ = O, +1 . . . . } and closest to R. That means

or

lJo - yRI -< lJ - y~l

I J o - ( g / c ) " ~1 <-12 - ( g / c ) " ~1

for all j -- O, + 1 , . . . .

Page 19: Digital straight segments

28 SON PHAM

The following is Bresenham's algorithm to construct these above closest centers:

(* e is real; all other variables are integers *) x := 0; y := 0; e := (g /c) ; for i : = l t o c d o

begin if e > 0.5

then begin y := y + 1; e .'= e - 1 + (g/c); end else e := e + (g/c);

x : = x + l ; plot(x, y);

end;

To avoid multiplications and divisions by multiplying e by 2"c, the above algorithm can be modified to be as follows:

(* all variables are integers including e *) x : = 0 ; y : = 0 ; e : = g + g - c ; for i : = l t o c d o

begin i f e > l

then begin y : = y + l ; e : = g + g - c + c ; e n d else e : = e + g + g ;

x : = x + l ; plot(x, y);

end;

Discussion. (1) The new algorithm can be interpreted as to find the highest centers under the real line segment ~ in the following sense: for all centers under PQ and of the same x coordinates, the one with the largest y coordinate will be selected (see Fig. 4). We express this mathematically as follows: let R = (i, YR), with an integer i, be a real point on the real segment PQ, then a center to be selected is

(i, [YR]) or ( i , t ( g / c ) " i l ) . (A.1)

These centers will form the lower bound of all digital straight segments from P to Q. Similarly, the centers

( i, [( g /c ) . i]), for all integers i, such that xe <_ i < xe , (A.2)

will form the upper bound of all digital straight segments.

(2) In contrast with the new algorithm, the Bresenham's algorithm will select the closest centers to PQ. In other words, in every pair of the centers in (A.1) and (A.2), a closest center will be the one with less truncation, i.e., we select

(i, [ ( g / c ) . i]) if ( g / c ) �9 i - [ ( g / c ) �9 i] < 0.5.

If the condition does not satisfy, we select the other center.

(3) The centers in Bresenham's algorithm will also form a digital straight segment. This segment is a lower bound up to a number of shifts. The number of

Page 20: Digital straight segments

DIGITAL STRAIGHT SEGMENTS 29

shifts varies depending on the positions of P and Q (more precisely, it depends on the slope of the line connecting P to Q). These results are not proved in this paper.

ACKNOWLEDGMENTS

This work has been done during my tenure at the University of California at Berkeley, EE/CS Department, with Professor Ramamoorthy, and the University of Southwestern Louisiana, Center for Advanced Computer Studies, with Professor Rao. I thank them for their support. I thank Professor Hon Li of the Department of Computer Science, Concordia University for introducing this topic. I would like to acknowledge the anonymous referees for the constructive comments. I thank Cathy Pomier for the high-quality job of typing and retyping the manuscript. Finally, I thank Hoa, Mai Lan, and Minh Thu for their encouragement.

REFERENCES 1. C. Areelli and A. Massarotti, Regular arcs in digital contours, Comput. Graphics Images Process. 4,

1975, 339-360; Erratum, Comput. Graphics lmages Process. 5, 1976, 280. 2. F. L. Bongiovanni and A. Zorat, The discrete equation of the straight line, IEEE Trans. Comput.

C-24, 1976, 310-313. 3. J. E. Bresenham, Algorithm for computer control of a digital plotter, IBM Systems J. 4, 1965, 25-30. 4. R. Brons, Linguistic methods for the description of a straight line on a grid, Comput. Graphics Image

Process. 3, 1974, 48-62. 5. S. K. Chang, Picture processing grammar and its applications, Inform. Sci. 3, 1971, 121-148. 6. J. D. Foley and A. Van Dam, Fundamentals of Interactive Computer Graphics, Addison-Wesley,

Reading, Mass., 1982. 7. H. Freeman, Computer processing of line-drawing image, Comput. Surveys 6, 1974, 57-97. 8. H. Freeman, On the digital computer dassilication of geometric line patterns, Proc. Natl. Electron.

Conf. 15, 1962, 312-324. 9. H. Freeman, A scheme for the efficient encoding of graphical data for communication and

information processing, Proc. 16th Int. Congress on Electronics, Rome, 1969, pp. 341-348. 10. E. C. Greanias et al., The recognition of handwritten numerals by contour analysis, IBM J. Res.

Dev. 7, 1963, 14-21. 11. B. J. Hansen, Recognizing Convex Blobs by Computer, M.S. thesis, School of Engineering, University

of California, Irvine, 1969. 12. L. Hodes, Discrete approximation of continuous convex blobs, SIAM J. Appl. Math. 19, 1970,

477-485. 13. S. H. Y. Hung, On the straightness of digital arcs, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-7,

No. 2, 1985, 203-215. 14. C. E. Kim and A. Rosenfeld, Digital straight lines and convexity of digital regions, IEEE Trans.

Pattern Anal. Mach. Intell. PAMI-4, 1982, 149-153. 15. C. E. Kim~ On cellular straight line segments, Comput. Graphics Image Process. 18, 1982, 369-381. 16. G. U. Montanari, A note on minimal length polygonal approximation to a digitized contour, Comm.

Assoc. Comput. Mach. 13, 1970, 41-47. 17. G. U. Montanafi, On limit properties in digitization schemes, J. Assoc. Comput. Mach. 17, 1970,

348-360. 18. S. Morse, A mathematical model for the analysis of contour-line data, J. Assoc. Comput. Mach. 15,

1968, 205-220. 19. T. Pavlidis, Structural Pattern Recognition, Springer-Verlag, New York, 1977. 20. M. L. V. Pitterway, Algorithm for drawing ellipses or hyperbolae with a digital plotter, Computer J.

10, 1967, 282-288. 21. J. L. Pfaltz and A. Rosenfeld, Computer representation of planar regions by their skeletons, Comm.

Assoc. Comput. Mach. 10, 1967, 119-125. 22. U. Ramer, An interactive procedure for the polygonal approximation of plane curves, Comput.

Graphics Image Process. 1, 1972, 244-256. 23. G. B. Reggiori, Digital Computer Transformation for Irregular Line Drawings, Technical Report

403-22, New York University, 1972.

Page 21: Digital straight segments

30 SON PHAM

24. A, Rosenfeld, Digital straight line segments, IEEE Trans. Comput. C-23, 1974, 1264-1269. 25. A. Rosenfeld, Picture Processing by Computer, Academic Press, New York, 1969. 26. A, Rosenfeld, Connectivity in digital pictures, J. Assoc. Comput. Mach. 17, 1970, 146-160. 27. A, Rosenfeld, Arcs and curves in digital pictures, J. Assoc. Comput. Mach. 20, 1973, 81-87. 28. A. Rosenfeld and J. L. Pfaltz, Sequential operations in digital picture processing," ,1". Assoc. Comput.

Mach. 13, 1966, 471-494. 29. A. Rosenfeld, Distance functions on digital pictures, Pattern Recoguit. 1, 1968, 33-61. 30. J. Rothstein and C. Weiman, Parallel and sequential specification of a context sensitive language for

straight line grids, Comput. Graphics Image Process. 5, 1976, 106-124. 31. D. Rutovitz, An algorithm for in-line generation of a convex cover, Comput. Graphics Image Process.

4, 1975, 74-78. 32. A. C. Shaw, Parsing of graph-representable pictures, J. Assoc. Comput. Mach. 17, No. 3, 1970,

453-481. 33. J. Sklansky, Measuring Concavity on a Rectangular Mossiac, School of Engineering, Univ. of

California, Irvine, Technical Report TP-71-4, Sept. 1971. 34. J. Sklansky, Recognition of convex blobs, Pattern Recognit. 2, 1970, 3-10. 35. J. Sldansky, R. L. Chazin, and B. J. Hansen, Minimum-perimeter polygons of digitized silhouettes,

IEEE Trans. Comput. C-21, 1972, 260-268. 36. P. H. Swain and K. S. Fu, Stochastic programmed grammars for syntactic pattern recognition,

Pattern Recognit. 4, No. 1, 1972, 83-101. 37. M. Symons, New self-organizing pattern recognition system," IEE Conf. Publ., London, Eng., July

1968, pp. 11-20. 38. I. M. Yaglom and V. G. Boltyansld, Convex Figures, Holt, Rhinehart & Winston, New York, 1961. 39. L. D. Wu, On the chain code of a line, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-4, No. 3,

1982, 347-353. 40. S. Pham, Digital straight lines, IEEE Trans. Pattern Anal. Mach. Intell., in press.