Vous êtes sur la page 1sur 8

269

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

Correspondence
square can be doubled compared to that of Freeman's chain code
without changing the maximum quantization error. This makes
longer chain segments available for encoding line drawings.
Furthermore, a specific labeling rule of quantization points is
TOSHI MINAMI AND KATSUYUKI SHINOHARA
adopted. As a result of this labeling, some codes occur more frequently than other remainder codes and Huffman coding can be
Abstract-The multiple grid(MG) chain code which uses four differ- applied to reduce the encoding bits.
In this correspondence, the coding algorithm of the MG chain
ent square grids is proposed to encode line drawings. The main processes adopted in the code are: 1) a grid selection algorithm which al- code is first described and then its performance is investigated by
locates quantization points only to the vicinity of the course of a line the encoding results of straight lines, circles, and contour maps. It
drawing, 2) labeling rule on quantization points which makes the fre- is proved that the coding efficiency of the MG chain code is about
quency of some codes larger than that of other codes, and 3) quanti- 60-70 percent better than that of the standard chain code. And it is
zation points allocation-not to the corners, but to the sides of a square also found that the subjective quality of the regenerated line drawwhich makes the straight line segments larger without increasing quan- ings by this algorithm is excellent. Finally, simulation results on the
tization error. A performance comparison of various chain codes is application of this coding algorithm to the electronic blackboard are
made from the viewpoints of the encoding efficiency, naturalness of the described. Here again, the superiority of the MG chain code to
encoded lines, and the rate distortion measure. Also, the superiority of other chain codes is proved.
the MG chain code to other codes is shown. At last, application of the
II. THE ENCODING ALGORITHM
MG chain code to the electronic blackboard system is explained.
In the algorithm to be described here, four different grids of horand vertical lines Go, GI, G2, and G3, whose centers are
izontal
Index Terms-Computer graphics, electronic blackboard, geometric
from each other by 2T, are used for quantization of
separated
quanticode,
chain
grid
multiple
encoding,
drawing
line
probability,
The side length of a unit square (fineness) of each
line
drawings.
zation error, rate distortion theory.
grid is 4T. The four square grids are represented by line vectors as
follows:
I. INTRODUCTION
Line vector
Grid
Cordinates of the
To encode line drawings such as contour maps, computer graphorigin
ics, engineering drawings, etc., Freeman's chain code and many
x=0 y=O
(0, 0)
other derived chain codes have been proposed [1]- [12].
x = 2T y = O
(1, 0)
A newly developed coding method described here is quite difx=0 y=2T
1)
(0,
ferent from these chain codes and is shown to be excellent in codx = 2T y = 2T
(1, 1).
ing efficiency and naturalness of regenerated line drawings [13]. In
the conventional chain code, a certain grid is prepared and a line
Each side of a square is divided into two equal length segments
drawing is superimposed on it, and the nearest nodes of the grid to and centers of the segments are used as positions for quantization
the line drawing are selected as quantization points. In these meth- points. A line drawing crossing the square is approximated by a
ods, tracking of line drawings is limited by the grid.
straight line connecting two quantization points. The quantization
On the contrary, in the multiple grid chain code or MG chain point on a segment where the line drawing enters to the square is
code described here, four different grids are prepared for quanti- labeled as "0." The center of the next segment on the same side is
zation, and by selecting the most appropriate grid for each quanti- labeled as "1" and other centers are labeled from 2 to 7 in due
zation, quite efficient encoding can be realized.
order as shown in Fig. 1.
That is to say, by this selection, direction of a line drawing is
To encode a line drawing, a square grid Go is superimposed on
predicted and the next quantization points are placed in the vicinity it and one of unit squares, on which the line drawing is crossing,
of the course of the line drawing. In general, high coding efficiency is selected as the square for quantization of the line drawing. By
can be achieved by approximating high curvature parts of line draw- the x and y coordinates of quantization points corresponding to the
ings with shorter straight line segments and low curvature parts of entrance of a line to the square, the starting point of the encoded
line drawings with longer straight line segments. In Freeman's chain line is determined. Then, by the label of the segment where the
code with fineness 2T, only two straight line units with the length line drawing exits from the unit square, the first chain code is obof 2T and 2 2T are used independently of curvatures.
tained. And again, by this label, a square which is used for the next
In the MG chain code, quantization points are taken on the sides quantization is selected, as shown in Fig. 2. The second square is
of a unit square and lengths of straight line units are quite diversi- selected in a way to make the next link as long as possible. The
fied: V2T, 2T, -/T, 4T, 3,12T, and 2v[T, under the condition selecting rule is tabulated as follows.
that the maximum error of the regenerated line drawings is the same
1) Case of the quantization point "0" on a vertical line
as the error of the regenerated line drawings by Freeman's chain
Present
of the exit
Label
code with a fineness of 2T. The variety of the straight line units in
+ Modification = Next Grid
Grid
point
quantization
efficiency
for
the
encoding
high
the MG chain code is one reason
+
(i, j)2
0
(i,j])
of this code.
(0, 0)
+
1
In this code, quantization points are allocated not to the corners,
1)
(i,j + 1)
(0,
(i, j)
+
(0, 0)
2
but to the sides of a square. By this allocation, the side length of a
(i, j)
(i, j)
+
0)
(1,
3
(i,
(i + 1,j)
j)
Manuscript received October 10, 1984; revised July 15, 1985. Recom
4
(i,
(i,j + 1)
(0,
1)
j)
mended for acceptance by Y. T. Chien.

Encoding of Line Drawings with a Multiple Grid


Chain Code

The authors are with the Department of Electronic Engineering, Kogakuin University, Tokyo, 160, Japan.
IEEE Log Number 8405365.

'i, j

I or O.

2Addition is based on the modulo 2.

0162-8828/86/0300-0269$01.00 1986 IEEE

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8. NO. 2, MARCH 1986

270

76

MG Chain Code;
4

2T |

7443563344345633

44T
4

Fig. 1. Quantization points


7

(a)
6

232

7.

s2

O/

24 iI

3 2

4
2

-4-,_--

(d)

External Cover

Internal Cover

(c)
5

Fig. 3. Example of MG chain coding.

57

54

(b)

-i 1

24

234

5
5
0
5

77

square.

unit

on a

6
4

Fig. 4. Measure of straight lines crossing the area A and B.

2 3

(h)
(e)
(f)
(g)
Fig. 2. Selection of a square for the next quantization.
5
+
(i, j)
(0, 0)
(i, j)
6
+
=(i + vj)
(i,j)
(1, 0)

7
+
(i,j)
(0,0)
(i,j)
2) Case of the quantization point "0" on a horizontal line
Label of the exit
quantization
Present Grid + Modification = Next Grid
point
+
0
(i,j)
(0,0)
=(i,j)
+
I
(i,j)
(1,0)
=(i+ 1,j)
+
2
(i,j)
(0,0)
(i,j)
3
+
(0, 1)
=(i + 1,j)
(i,j)
+
4
-(i+ 1,j)
(i,j)
(0,1)
+
- (i,j)
5
(i,j)
(0,0)
+
6
(i,j)
(0, 1)
(i,i+ 1)
+
7
(i,J)
(0,0)
=(i,j)
An example of a line drawing and the corresponding encoded
line is shown in Fig. 3. A numeral in a small circle indicates the
grid number.
The maximum error between the actual crossing point and the
quantization point is T, and this value corresponds to the error in
the encoded line by Freeman's chain code with a square of a side
length 2T. The length of a unit in a horizontal or vertical straight
line generated in Freeman's chain code is 2T and that of a diagonal
line is 2V2T. On the other hand, the lengths of units in straight
lines connecting two quantization points in the MG chain code are
12T, 2T, Vi76T, 47T, 3 liT, and 25Tas shown in Fig. 1. The difference between the average length of straight line generated by the
MG chain code and Freeman's chain code is one reason for the fact
that the number of required bits per unit curve length of the MG
chain code is smaller than those of Freeman's chain code.
In the MG chain code, codes 3, 4, and 5 are generated more
frequently than codes 0, 1, 2, 6, and 7 and Huffman coding can be
applied to reduce the redundancy effectively. The probability of each
code occurrence is investigated theoretically and experimentally.
To calculate the probability, the geometric probability theory is used
[15]. According to the geometric probability theory, the probability
or the measure of straight lines crossing areas A and B in Fig. 4 is
obtained by the difference between the internal cover and external

Fig. 5. Difference between the internal cover and external cover of dX and
A.

cover of convex areas A and B. This theory can be applied to calculate the measure dM of straight lines crossing the segment A,
segment B, and the infinitesimal division dx in Fig. 5 as follows.

dM = dx (cos 01 - COS 02)


8T-x

1(8T - x)2 + (6T)2

6T-x
1(6T -X)2 + (6)2-

(1)

By moving the division dx from 0 to 2T and integrating each


measure, the total measure of straight lines crossing the segments
SO, S13, and S23 in Fig. 6 is obtained.
2T
= J(COS 01 - cos 02) dx
MM
0

2T

(-

8T7- x

CI(8T-x)2
=

0.2405.

(6T)2

6Tx
)
1(67' -X)2 + (6T)2d

(2)

Now, let us define M's, pij, and P as follows.


Mi: Measure of straight lines crossing segments S0 and S,i.
Mij: Measure of straight lines crossing segments So, 5Sl, and
2j]Pi1: Probability of a straight line crossing segment S2J under the

271

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

Sii

So

S25

S24

S23

S22

Fig. 7. The Shannon diagram corresponding


Table I.

Fig. 6. Straight lines crossing SO, S13, and S23.

P:

condition of the straight line crossing segment


Sli = MiI/Mi.
Transition probability matrix
..

PNo POI
=

So

and
TABLE I
TRANSITION PROBABILITY MATRIX P

P07

Plo

(4)

0
P77

..

P70

For all the combination of segments, Mi1's, pij's, and P are calculated by (1)-(4). Along with this theoretical investigation, by encoding the map of the northern island of Japan with the use of MG
chain code, the probability of each code occurrence is obtained experimentally. Both results are shown in Table I. In the theoretical
investigation, it is assumed that line drawings are nearly straight
within two unit squares. This is a main cause for the slight difference between the theoretical result and the experimental result.
A state transition diagram corresponding to the experimental result in Table I is shown in Fig. 7. In the figure, each state shows
the quantized position of line drawings encoded by the MG chain
code, and the diagram is a simple Markov process representation
of the quantized line drawing. The stationary probability P of each
state in Fig. 7 or the occurring probability of each code is obtained
by the following equations:
(5)

UO Ul
P-

Uo

*--

UO

Ul

U7
U7

Ul

...

to the experimental result in

(6)

0.222

0.111

0.222

0.444

0.250

0.250

0.375

0.125

0.013

0.013

0.160

0.240

0.293

0.133

0.067

0.080

0.020

0.010

0.214

0.316

0.306

0.051

0.031

0.051

0.015

0.008

0.115

0.231

0.362

0.192

0.054

0.023

0.011

0.032

0.053

0.191

0.489

0.106

0.117

0.062 0.062 0.406 0.125 0.156 0.031 0.094

0.062

0.065

0.032

0.258

0.258

2
3

0
0

0.258

0.097

0.032

0.749 0.251 0

0.195 0.524

0.181

0
0

0
0
0.304

0
0.239 0.522 0.083 0.156
0
0.251 0.529 0.220 0
0
0.315 0.254 0.126 0

(a)
'j

0.281 0

0.502

0.317

(b)
(a) Experimental probability
(b) Theoretical probability

U7

E Uj
i =l

(7)

where ui is the stationary probability of state i.


By substituting pij's in (5) and solving (6) and (7), ui's
culated as follows:
uo = 0.017

are

TABLE II
HUFFMAN CODE

calMG

Chain

Code

Huffman Code

10

01

00

0.196

110

0.286

1110

U5

0.199

11111

U6

0.067

111101

111100

ul

0.017

U2

0.157

U3

U4

U7

0. 064.

(8)

2)7 2

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

>-

2L

(a)

41

MG Chain Coding
lul/45-1OO=35.6b

17/45%100=37.8-

20/45 1 0=44.-

28/60X1OO= 46.7'

3121
2

1 D X33

(b)
2C

Freeman's Chain Coding


8Y2+3= 19bit

1 8-3 = 54bi t I
I o

(c)
2

1 9/

54i

00=35.2%

MG Chain Coding

ol gLj!a

6TF1-

ooQLO!t1
a
I}I

121F-I

(d)

Freeman's Chain Coding

Fig. 8. Encoded straight lines with different slopes by Freeman's chain


coding and by MG chain coding.

Finally, the Huffman code corresponding to the ui's in (8) is obtained as shown in Table II.
III. PERFORMANCE OF THE MG CHAIN CODE

To evaluate performance of the MG chain code, efficiency and


error or distortions generated in the encoding process with the MG

chain code, Freeman's chain code, and the generalized chain codes
are compared to each other.
Furthermore, performance of various chain codes is compared
by the rate distortion measure and the results are shown in Section
III-C.
A. Comparison of the MG Chain Code to Freeman 's Chain Code

[1], [21

Performance of the MG chain code and Freeman's chain code is


compared by encoding straight lines with different slopes. Reproduced straight lines are shown in Fig. 8.
The number of bits required to encode the straight lines by the
MG chain code is 35.2-46.7 percent of the required bits by Freeman's chain code. Furthermore, the number of bending points in
the approximated lines by Freeman's algorithm is larger than that
of the approximated lines by the MG chain code. Fig. 9 illustrates
coded circles by these two algorithms. Here again, the number of
bits required to encode the circles by the MG chain code are fewer
than the required bits by Freeman's chain code, and the shape of

the regenerated circles by the MG chain code is better than the


shape of the regenerated circles by Freeman's chain code.
The coded approximation of the northern island of Japan, Hokkaido, is shown in Fig. 10. It is seen that the coastline is deviated
regularly in the map drawn by Freeman's chain code, but there is
no such deviation in the map drawn by the MG chain code. In addition to this merit, the MG chain code reserves the details of the
original map.
The number of bits required to encode the map by Freeman's
chain code is 2406 and the number of bits by the MG chain code is
738, and 69 percent bit reduction is achieved.
B. Comparison of the MG Chain Code to the Generalized Chain
Codes [3]-[61
The generalized chain coding scheme is one of the most excellent
algorithms for encoding line drawings with respect to coding efficiency and precision of regenerated line drawings.
To compare performance of the MG chain code to the generalized chain codes, a contour is encoded with those chain codes.
Quantized curves are shown in Fig. 11 and bit requirements for the
different chains are shown in Table III. As is shown in Table III and
Fig. 11, the efficiency of the MG chain code is highest among all
chain codes, and the quality of the reproduced curve with the MG
chain code is good compared to other curves.
The excellent quality of the MG chain code stems from various
processes described in Section II, and among those processes, the

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

Radius

Fineness

273

31 mm

Fineness

8 mm

4 mr,.

?MM

I I
I I

Starting point

point

End

End

I.

S
25 links

60 bits

129 bits

43 links

(a)

(b)
Fineness

Fineness 16 mm

I
start

8 nun

z I v*N,
I

IN

N
I

I.

-I I -l

22 links 66 bits

12 links 34 bits

MG Chain Coding

Freeman's Chain Coding

(d)
(c)
Fig. 9. Encoded circles by Freeman's chain coding and MG chain coding.

Original map

MG Chain Code

475 links
738 bits

(a)

(b)
Fig. 10. The northern island of Japan, Hokkaido.

Freeman's Chain Code

802 links
2406 bits

(c)

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2. MARCH 1986

274

01

12 9

10
I

(a)
..0

co

(c)

(b)

(c)

14

5/

4
8

(b)

10

XoS

9 6 3 0
14 7 1
12
. . 0

(a)

41

---t-1N 81

13

4
8

> a e \,\15/

(d)

,,10

12
11

13

21

14

10

14

(f)

(e)

(d)
11

18 10

17

16

19

(e)

0 /

1208
13

21 14 2 2

1 5o

(h)

TABLE III
BIT REQUIREMENTS FOR THE DIFFERENT CHAINS OF FIG. 11
Code System
8 points
16
24
32
I.
MG Chain

Code

with Huffman
..4

(f)
18
0188

Fig. 11. Comparison of original contour (a) with different chain types: (b)
MG chain, (c) 8 point, (d) 16 point, (e) 24 point, (f) 32 point chain, (g)
24 point coding system, (h) MG chain coding system.

Chain Code

t18

714

(g)

Generalized

18

~
21213

Coding

Number of
Links

Bits per
Link

Total No.
of Bits

87
44

3
4

261

48
38

5
5

240
190

50

150

50

2.6

130

176

line direction predicting technique and specific labeling rule of


quantization points can be applied to the generalized chain codes.
An example of the application to the generalized chain (24-point)
code is explained in Fig. 12 and Table IV. As is shown in Fig. 12,
about half of the original quantization points are used and their
positions are determined by the direction of the previous straight
line segment. The labeling order of each quantization point is determined according to the frequency of each code in order to apply
the Huffman coding algorithm.
Although the detailed analysis of this technique has not yet been
made, bit requirements are reduced about 40 percent without
changing the shape of the reproduced curve practically.
Through this experiment, the effectiveness of the technique is
clarified.

Fig. 12. Quantization scheme for the improved version of the generalized
chain (24 point) code: (a)-(c) labels for quantization points, (d) example,
(e) generalized chain (24 point) code, (f) improved version of the generalized chain code.
TABLE IV
BIT REQUIREMENTS FOR GENERALIZED CHAIN (24 POINT) CODE AND
IMPROVED VERSION OF THE GENERALIZED CHAIN CODE
Code System

Number of
Links

Bits per
Link

Total No.
of Bits

Generalized Chain Code

48

240

Improved Version of
Generalized Chain Code
with Huffman

48

192

48

2.9

139

codinig

C. Comparison of the Performance of Varions Chain Codes by


the Rate Distortion Measure [8], [14]
One other criterion to compare the performance of encoding algorithms is the rate distortion measure, namely, the product of maximum encoding error E between the actual curve and the quantized
curve, and the requirement in bits b per unit curve length. The
smaller the product bE, the better the performance.
The investigation results are shown in Table V. The MG chain
code is better than any other chain codes from the viewpoint of this
criterion.
VI. APPLICATION TO THE ELECTRONIC BLACKBOARD [7], [9],

[10], [161

One of the application fields of the chain code is a signal transmission in the electronic blackboard system. The simulation of the

275

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

7J K

2%

'

)Y L

The Freeeman co

0.199

19.9T 16T

is illustrated

'1

Fig. 3
(a)

'.4i

kn )

( nF

(b)

(c)

Fig. 13. Texts and circuit diagram.

TABLE V
COMPARISON BY bE
Freeman's Chain coding

1.35

Hexagonal Grid Chain coding

1.22 - 1.19

MG Chain

coding

0.53

1.44

0.56

requirement in bits per unit


curve length
E = maximum encoding error

TABLE VI
SIMULATION RESULTS
Japanese

English

Circuit

Freeman's Chain Code

10242 bits

6567 bits

8547 bits

MG Chain Code (Huffman)

2663(0.26)

1707(0.26)

2452(0.29)

Difference Window Chain


Code [10]
Level Code [12]

3672(0.36)

2218(0.34)

2626(0.31)

5602(0.55)

3965(0.66)

4685(0.55)

New Segment Chain Code[tl]

6410(0.63)

5231(0.80)

4336(0.51)

5720(0.56)

5000(0.76)

6176(0.72)

Modified DPCM

[9],[16]

( ) indicates compression ratio to

electronic blackboard signal transmission by chain codes was carried out with Japanese and English text, and a circuit diagram is
shown in Fig. 13. The Japanese text consists of 91 strokes with 3414
black pels, the English text consists of 2188 black pels, and the
circuit diagram 2849 black pels. The simulation results are shown
in Table VI. The numerals indicate the necessary number of bits to
encode Japanese text, English text, and the circuit diagram. In the
level code [12] and new segment chain code [11], the original texts
and circuit diagrams are encoded by Freeman's algorithm first, then
the redundancies are removed, and final codes are obtained. Numerals in the parentheses indicate the compression ratio of each
code relative to the chain code. Among these codes, the MG chain
code is extraordinarily good in coding efficiency.
V. CONCLUSION
The multiple grid chain code, which uses four different square
grids having quantization points on each side of a unit square, is
proposed to encode line drawings. It is shown that the coding efficiency of the MG chain code is significantly better than other chain
codes because of quantization points allocation to the vicinity of a
line drawing, availability of longer chain segments, and adoption of
the Huffman coding algorithm. As regards Huffman coding, the
probability of each code occurrence is investigated theoretically and

experimentally.

In addition to the coding efficiency, naturalness of the reproduced line drawings by MG chain coding is quite good on account
of the high density of straight line segments for quantization,
namely, smaller angles between straight line segments.

Freeman's Chain Code

The performance of the MG chain code is investigated by encoding straight lines, circles, and contour maps and the superiority
of the MG chain code to other chain codes is ascertained. At last,
the possibility of applying the MG chain code to the electronic
blackboard is examined by simulation, and it is proved that the coding efficiency of the MG chain code is better than the efficiency of
any other codes.
REFERENCES
[1] H. Freeman, "On the encoding of arbitrary geometric configurations," IRE Trans. Electron. Comput., vol. EC-10, June 1961.
[2] -, "Computer processing of line-drawing data," Comput. Surv., vol.
6, Mar. 1974.
[3] -, "Application of the generalized chain coding scheme to map data
processing," in Proc. IEEE Comput. Soc. Conf Pattern Recognition
Map Data Processing, Chicago, IL, May 31-June 2, 1978.
[4] J. A. Saghri and H. Freeman, "Analysis of the precision of generalized chain codes for the representation of planer curves," IEEE Trans.
Pattern Anal. Machine Intell., vol. PAMI-3, Sept. 1981.
[5] A. Rosenfeld, Image Modeling. New York: Academic, 1981.
[6] H. Freeman and J. A. Saghri, "Comparative analysis of line-drawing
modelling schemes," Comput. Graph. Image Processing, vol. 12,
1980.
[7] A. Kegel and J. H. Bons, "On the digital processing and transmission
of handwriting and sketching," in Proc. Commun. IEEE Eurocon '77,
1977, p. 2.4.6.
[8] D. K. Scholten and S. G. Wilson, "Chain coding with a hexagonal
lattice," IEEE Trans. Pattern Anal. Machine Intell., vol. PAMI-5,
Sept. 1983.

276

19]
[101
I l]

[12]

113]
[14]

[15]
[16]

IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. PAMI-8, NO. 2, MARCH 1986

T. Kishimoto and Y. Sato, "Simultaneous transmission of voices and


handwriting signals: Sketchphone.' IEEE Trans. Commun., vol.
COM-29, Dec. 1981.
K. Kondo et al., 'Chain encoding of telewriting signals using linear
interpolation" (in Japanese), IECE Japan Tech. Rep. IE 83-107, 1983.
T. Kaneko and M. Okuhara, "An efficient data compression for chaincoded line drawings" (in Japanese), IECE Japan. Tech. Rep. IE8382, Nov. 1983.
K. Shinohara and T. Minami. "Data compression for chain-coded
line drawings by level code" (in Japanese), in Proc. 1984 IIEE Japan
Nat. Conf. Rec., no. 12-24, June 1984.
T. Minami and K. Shinohara, "Multiple grid chain coding," presented at the 1984 Picture Coding Symp.. no. 6-1, Cession-Sevigne,
France, July 1984.
J. Koplowitz, "On the performance of chain codes for quantization
of line drawings," IEEE Trans. Pattern Anal. Machine Intell., vol.
PAMI-3. Mar. 1981.
L. A. Santalo, "Geometry and geometric probability," in Encyciopedia of Matheniatics and Its Applications, vol. 1. Reading, MA:
Addison-Wesley, 1976, pp. 27-34.
Y. Sato et al., "Telewriting system' (iii Japanese), Electric. Comm.
Lab. Tech. J., vol. 32, Mar. 1983.

Best Linear Unbiased Estimators for Properties of


Digitized Straight Lines
LEO DORST AND ARNOLD W. M. SMEULDERS

Abstract-This paper considers the problem of measuring properties


of digitized straight lines from the viewpoint of measurement methodology. The measurement and estimation process is described in detail, revealing the importance of a step called "characterization" which
was not recognized explicitly before. Using this new concept, BLUE
(Best Linear Unbiased) estimators are found. These are calculated for
various properties of digitized straight lines, and are briefly compared
to previous work.
Index Terms-BLUE estimators, chain-code string, digitization error, digitized straight lines, length measurement, measurement accuracy, quantization.
I. INTRO)DUCIION

This paper aims at finding optimal estimators for properties of


digitized straight lines in an image. To find these, we first need a
precise understanding of the measurement process since this will
reveal how improvement over existing methods can be achieved.
This knowledge can then be used to arrive at "optimal" estimators, in some specified sense.
The measurement situation is the following. Before digitization,
there is a line in the continuous world with specific properties (such
as slope, length, intercept, etc.) If one wishes to measure a property, a digitization of the continuous line is performed, leading to
a chain-code string. This digitization reduces the information in an
essential way since it maps a set of continuous lines into a set of
discrete strings. Therefore, exact measurement is impossible; the
best one can do is estimate the continuous property from the string.
We will discriminate two steps in this estimation procedure
(Section II): a characterization in which the information present in
the actual chain-code string is reduced to some characterizing paManuscript received August 6, 1984; revised July 15, 1985.
L. Dorst is with the Department of Applied Physics, Delft University
of Technology, 2628 CJ Delft, The Netherlands.
A.W.M. Smeulders is with the Department of Pathology and Medical
Informatics, Free University, Amsterdam, The Netherlands.
IEEE Log Number 8407172.

rameters, and a calculation in which these parameters are used in


a formula for an estimator of the property. The results by other
investigators on measuring line length [1]-[4] may also be expressed in these two terms (Section III).
The importance of this unraveling of the estimation procedure
(recognized here for the first time) follows from the fact that given
the digitization, one can optimize estimators in two independent
ways: by improving the characterization step, and by improving
the calculation, i.e., the formula used as an estimator. Both are
considered in Section IV. It is shown that to every characterization
there corresponds a "BLUE" estimator, which is the optimal estimator for that particular characterization (optimal in the sense of
minimal MSE, linearity, and being unbiased). The search for optimal estimators therefore becomes a search for an optimal characterization. It is shown that a so-called "faithful characterization," in which no information is lost, results in optimal BLUE
estimators.
In Section V, this basic result is applied to the measurement of
the length per chain-code of a digital straight line.
II. A FORMAL DESCRIPTION OF THE MEASUREMENT PROCESS

In this section, the digitization and measurement process is described in detail. This is necessary to arrive at a precise formulation
of the optimal measurement methods.
All continuous straight lines form a set S12. An element I of this
set can be characterized by intercept e and slope et in a Cartesian
grid (1: v = ax + e). A property.f can be associated with each 1.
For instance, f(e, a) a represents the slope of 1.
Properties of the continuous line I are to be measured after digitization symbolized by the operator D. Digitization results in a
string c where c = Dl. Digitization of all lines in results in the
set of all straight chain-code strings C.
Given a string c? there is an equivalence class of continuous
lines, all having the same string c as its digitization. This equivalence class is called the domain OD(c) of c corresponding to the
digitization D.
Formal definition:
DD(C)
{l.12tlDl c}.
(I)
Thus, the set of domains indicates the finest distinction of the original continuous lines that is still possible after digitization.
The digitized line c can be represented in various ways, for instance, as a string of (x, v) coordinates, a series of run codes, or
the Freeman directional code [1]. Furthermore, one can digitize in
different ways, such as grid intersection quantization (GIQ) or object boundary quantization (OBQ) [2]. The difference between these
methods is not essential to the basic idea of the present paper. Specific results will be given for OBQ, 8-connected Freeman
chain codes. For this case, the domains have been given in a previous paper [5]. In Fig. 1, they are depicted for all lines having a
chain code consisting of 6 codes 0 or 1. The representation is in a
part of the parameter space (e, a) where each point (e, a) represents a continuous line l:y = ax + e.
The estimation of the original continuous propertyf is to be based
on the discrete string resulting from the digitization. This is done
by characterization and calculation. The characterization K reduces the chain-code string c to a tuple t of parameters (where t =
Kc) characterizing the string. For instance, one might characterize
a string by the number of odd and even Freeman codes in the string.
Characterizing all strings of eC leads to the set of all tuples 3. A
tuple can be used in an estimator g which attributes a value g (t) to
the tuple t. This value g (t) = g (Kc) = g (KDI) is used as an estimate of the original continuous property f(l), based on the digitization Dl. The recognition of the characterization K is essential in
optimizing the estimator g of the property f.
In the same way as domains are the equivalence classes into
which the set of lines is divided by digitization, we have equiva-

0162-8828/86/0300-0276$01.00 1986 IEEE

Vous aimerez peut-être aussi