article - Kyushu University Library

Transcription

article - Kyushu University Library
A Representation of Digital Pictorial
Pattern
-1-
l COMPREHENSIVE
ARTICLE
A Representation of Digital Pictorial Pattern
Tsutomu ENDO" and Eiji KAWAGUCHI""
(Received Oct. 24, 1980) '
A new method of representing a binary-valued picture titled "DF-expression" or
"DF-coding" is developed, where the picture is decomposed into a set of square regions
of various sizes with uniform gray level (black or white). A simple context-free grammar having three terminal symbols "O", "1", and "(" is introduced to specify the gray
levels and sizes of such regions. With such grammar, every picture is represented as
a terminal string of the grammar. The DF-expression of a picture is defined as the
reduced terminal string. It preserves every information for reproducing the original
picture in spite of high data compressionability. The coding algorithm of raw pictorial
data into DF-expression is very simple. Some type of picture processings, such as shifting, expansions and reductions of original pictures, c'
an be performable on DF-expression itself. Moreover, logical operations are available. After the experimental studies
on many test pictures, it was made clear that DF-expression is really useful not only
for storing or transmitting pictorial data but also for digital picture processing.
'
1. Introduction
.
In the study of pattern recognition,
scene analysis and image understanding,
we are often troubled with a large am-
is much better if we can perform typical processings such as shiftings, rotations, expansions and reductions of the
original picture, on the coded form itself.
An example of such coding scheme is
ount of data. Even if we attempt to
the chain code devised by H. Freeman2'.
treat only binary patterns with 1024Å~1024
Another example is the methodwhich
pixels, a 1 Mbit memory is occupied by
a single picture. In order to reducethe
amount of storage, pictorial data need
to be represented by more compact form
using some coding scheme if any.
Today we have many coding schemes
for pictorial data compression. Most of
reduces original data into short compu-
ter commands for the storage of the
input picture3'. However, they do not
preserve all information about the original picture, still worse, they are onJy
applicable to line drawings. Recently,
we have another type of coding schemes
called pyramidal or quad tree represen-
them are developed for facsimile data
transmissioni'. The major goal of the
coding is to reduce the number of bits
tation`'5)6). Their point of concern
required to represent the picture, but it
thms on the coded form rather than
* Present address: Department of Information Science and Systems Engineering, Oita
University
** Department of Information Systems
would be the picture processing algorithe data compression.
In this paper, we show a new representation method called "DF-expression"
or "DF-coding", in which, (1) every in-
-2-
msampree bl sptdr ptxk
ee 2g ee 2g
va *n 56 tEp
uniformly black or white over a subfra-
formation is preserved, (2) it is appli,cable to any pictorial pattern, and (3) se-
be performed on the coded form. The
me Sa, it is said that such SE is'
an
r-th order' monotonous subpicture, and
is denoted by ea. Consequently, any
idea comes from considering the pyra-
pixel is an R-th order monotonous sub-
midal type representation as the generation process of some context-free gram-
picture. We call the total of them,i.e.,
the set of 4R O or 1's, the pictorial raw
data. A picture primitive (or primitive)
veral types of picture processings can
mar. But from the viewpoint of data
compression in facsimile, DF-expression
is the same as the generalized idea of
autoadaptive block coding7'8). This method is originally developed for binaryvalued pictures, but it is easy to apply
pE of T' is an ea which has no lower
monotonous subpicture. Every eE and
pG takes the value O or 1, but we put
it to multivalued picture.
ven monotonous subpicture, e.g., Ogno,
superscript and subscript on each O or
1 in the explicit representation of a gilgoion, and so on.
2. Definition of DF-expression
[Definition 3] The primitive sequence
of r is the concatenation of all primi-
Pictures we consider in this paper are
all digitized binary (black and white)
square pictures, which consist of 2RÅ~2R=
tives of r arranged in their address
order. We denote this sequence by P
4R pixels. We associate O and 1 with
(r). For Fig. 2(a), it is,
white and black data respectively.
p(r) == og,,, lg,,, og,,, lg,,, oa, o?,,, 1?,o, O?oieoo
2.1. Fundamental notions and definiT
tions
[Definition 1] Subframes denoted by
Sa's are sequentially defined by the
O?oiooi Ogoioio 1?eion 1?on lgioooo lgioooi O?ieoio
O?ieon 1?ioioo 1?ioioi Oiioiio liiolli Oi3iiooo O?iiooi
1?noio 1?non O?uioo llnoi 1?inie 1?nlli •
(1)
iterative quartic partitions of the total
[Definition 4] We define the comple-
frame SO, where r(r==1, 2, •••, R) and
xity of T as,
a specify their orders and addresses
c,(r)==
Total number of primitives of r
respectively as illustrated in Fig. 1. An
Sa is called a lower subframe of SE:,
4R (2)'
if and only if Sa contains SE:, and
upper subframe vice versa.
Apparently, O<CpS.1. Such r as Cp=1
is called a most complicated picture.
4 SrllllO S?11111
S?OIO slo11
slo
sl,
SrlllOl
Slooo
S?oQl Slioo
sgnloo
sbo
sbi
Slno
sl1o1
SillO
sbo
S8ieioi
We denote it by the expression rR.
Sss
S3ioo
Fig. 1 Picture subframes
[Definition 2] A picture on SO is to
be denoted by r. If a part of r is
Fig. 2(b) is an example of 1"R for R=3.
[Definition 5] For such a r that eao'oi
==eEei ==eai"oi=:eai"ii does not hold for some r
and a, a modification of r into r', for
which pa=:O or pE==1 holds, is called a
single simplification of r. A plcture
which is obtained from rR after n successive simplifications is denoted by
rS. Fig. 2(a) is an illustration of T'gi.
A Representation
It is obvious that any non-most complicated picture is obtained after successive
simplifications from a most complicated
one.
of Digital'
-3 --
Pictorial Pattern
ture
(3)-generation of higher order sub-
frame from SE.
The left most, the next, the
third, and the last nonterminals
after "(" corresponds to Sao"oi, SEo"ii,
Saroi, and SEi"ii respectively. Also,
the effective interval of r-th
order "(" is its successive four
elements of order r+1.
A simple example of picture generation
Fig. 2 An example of binary picture (a),
and a most complicated picture (b)
by G is illustrated in Fig. 3. Fig. 3(a)
is the terminal string, (b) istlte derivation tree, and (c) is the binary picture
2.2. Relation between binary pictures
and context-free grammar
Let us introduce a context-free gram-
generated. In our discussion, we write
derivation tree in quad form. That is,
1) we omit every "(" from the tree, and
2) for such production as A-->O and.A-!>
(a) (b)
mar (CFG). We focus our attention on
terminal string of the grammar and
1, we put Oand 1 just on the A position. We associate with each node a
nonnegative integr called node level
that ofa binary picture on SO. Let G
which show the order of each subframe.
the analogy of generation process of a
be a CFG defined as follows:
G=={V., V.,P, U)
U=A: the start symbol
VN={A}: the set of nonterminal
symbol
VT ={O, 1, (}: the set of terminal
' symbols
P: production rules
(1) A-->O (2) A->1 (3) A.(AAAA
This CFG is interpreted as a binarypicture generative grammar in the following way:
Start symbol A-a total frame SO
'
( (oo f'( i'i 'ii',oi (ic'( b'56'6,:i aioo ( (oooi aoio (tiooo
{a>
A -ievel-O
---- :
A 1 A A +level-1
O O S' A"t
O 1 :"A"•. 1 A A A A O ÅÄ level-2
AA AA
,.iA'x,. ,.'A:•i
:,1111: iP.9P.9.: 1100 OOOI 1010 1100 +level-3
(node level)
(b)
Nonterminal symbol A-subframe Sa
Termin'al symbols:
O-white subpicture of some order
1-black subpicture of some order
(-order relation among subpictures
Production rules:
(1)-generation of a white subpicture
(2)-generation of a black subpic-
(c)
Fig. 3 An example of picture
generation by G
-4-
kK,Anc E\iiJIyfut $syWll7
If a terminal string generated by G
ee 2g ee 2g•
va *a 56 ttli
[the first half of the statement]
has such substrings as "(OOOO" and
The derivation process of a terminal
"(1111", we apply to them the reduction
rules shown in Fig. 4(a). The corresponding reduction rules for derivation
as follows :
trees are shown in Fig. 4(b). After
recursive applications of reduction rules
string of G which contains m' "("'s is
**
A=>xAy=>x(AAAAy #>X(a,a2a3a4Y
def
=W,n' (3)
to a given string (or tree), we finally
where x, ye{O,1, O*, aie{O,1}. Then
obtain a unique string (or tree). In
a terminal string w,,•-i defined by
case of Fig. 3, reduction rules are appli-
cable to two parts which are enclosed
'*A#xAy=>xOy
def -= w.•-i (4)
by dotted lines.
consists of m'-1 "("'s and 3(m'-1)+1
"O or 1" 's.
1) (OOOO
-.-O 1) X-o
ofgM,o
2) (1111 ---. 1 i2) A ----eb l
'
A
- llll
(a) cb)
Fig. 4 Reduction rules
Consequently, w., contains m' "(" 's and
3m'+1 "O or 1" 's;
[the last half of the statement]
Let w., be an arbitrary string consisting of "(" 's, "O" 's, and "1" 's which sati-
sfies two conditions of the statement
for m=m'. It is easily seen that w.•
contains such a substring as "(aia2a3a4",
The most important property of G is
expressed in the next theorem.
[Theorem 1] Let m be the number
where ai="O or 1". That is,
W,,,==x(ala2a3a4y. (5)
of "("'s in an arbitrary terminal string
If not, according to the second condi-
of G. Then the total number of "O or
1" 's in that string equals to 3m+1.
tion on w,,,, wm, never contains m'
"("'s and 3m'+1 "O or 1"'s. Consequ-
Inversely, any such string w. that
ently, such w., is actually generated
by G through a derivation process like
consists of "("'s, "O"'s, and "1"'s is
always generatable by that G if it satisfies the following:
1) w. has m "("'s and3m+1 "O or
1" 's,
2) no proper substring w.', which
begins from the top of w,,, has
m' "(" 's and 3m'+1 "O or 1" 's for
some m'(<m).
Proof: It is proved by an induction on
m. We use traditional notations in the
derivation of terminal string.
1) For m==O, the statement is true.
2) Suppose that the statement is true
for m == mLl.
3) For m= m';
(3). Q. E. D.
The above theorem suggests that any
string that consists of "("'s, "O"'s and
"1"'s is interpretable as a concatenation
of binary pictures if it is possible to
assume that R=:c>o. Each picture inthe
concatenation corresponds to every first
substring consisting of m "(" 's and 3m
+1 "O or 1"'s in the residual string.
And if the final residue does not contain m' "(" 's and 3m'+1 "O or 1" 's, we
can conclude that some illegal data processing or transmission occurred.
In the following discussion, G is supposed to complete its generation process
A Representation of Digital Pictorial Pattern
by R-th order node level. Under this
assumption any terminal string of G is
interpretable as a binary picture r. We
denote this string by 2(r).
2.3. Picture expression
If a terminal string 9(r) is given in
a nonreduced form, it is easy to trans-
[Definition 8] The complexity of a
DF-expression is defined as
-L(r)--1+4+...+4R==4R"i-1
L(r) L(r)
Ce(1')-L(rR)
'
3(s)
Consequently, for any r, C, satisfies
form it into the reduced form,through
O<C,Sl. (9)
recursive application of reduction rules.
It is also possible to expand it into more
redundant form, if necessary, by the
use of inversed reduction rules. So we
can express a r in various forms.
[Definition 6] We define the reduced
form of 2(r) the DF-picture expression
(depth first picture expression) of T, or
more simply, the DF-expression, and
denote it by 2*(7).
Every "O" and "1" in a DF-expression
corresponds to a white and a black primitive in the picture, respectively. Any
primitive sequence P(r) is translatable
The relation between Cp and C, is
stated in the next theorem.
[Theorem 2] All pictures with equal
complexity Cp have equal complexity
of C,. And for a large 4R,
Cp==Ce (10)
hold for every r.
Proof: The total number of primitives
in rÅí equals to the total number of "O
or 1"'s in 2*(r".). Every single simplification reduces one "(" and three "O
or 1"'s. Then the complexity of rÅí is
4R-3n
into DF-expression. For each pa ina
P(T'), if 2m or 2m+1 consecutive bits
from LSB (or the right most bit) of a
are all O's, we insert m "("'s just before
the value of pE (i. e.,Oor 1).and delete both superscript and subscript. The
inverse translation is also easy. For
the picture in Fig. 3, S2*(r) and P(r)
are;
g* (r) == ( (oolol (lol (noo ( (oool (lolo
(11000 (6)
p(r) = og,,, og,,, lg,,, og,. 18, li,,, Oleo, ll,,o
lionoo lgoiioi o?oulo og,n!1 ogioooo o?ioool
O?iooio liiooii lgioioo O?ioiei 1?ioiio Oloiii
linooo linooi 03inoio Ognou O?in (7)
[Definition 7] The length of a DFexpression is defined as the total num-
-- 5-
C,(rÅí)- 4. . (11)
The complexity of DF-expression 9*(r.R)
is
4R'5-1-4n 4R-3n-t
C,(rÅí)= 4R"5-i "= 4R=t '
'
(12)
Equation (11) means that all pictures
with equal complexity come from a rR
through equal number of simplifications.
Equation (12) shows that the value of
C,(TÅí) is also determied only by n.
So the first part of the theorem is evident. The latter part is also clear from
(11) and (12) for a large 4R.
• Q. E. D.
equals to the total number of nodes in
DF-expression uses three symbols "(",
"O", and "1". So the data,rate of aDFexpressionislog23bit/symb. Therefore,
the reduced derivation tree.
the total data of a DF-expression 2*
ber of symbols in the 2*(T) and is
expressed as L(r). Evidently, L(T)
ms3 ve r\ EI yfut pt we
-6 --
ee 2g eg 2 {9
va *n 56 tEti
actua! examples in Section 5.
(rs)gis
H .= (4R"5'- 1-- 4n) log2 3
3. Coding algorithm
=- (g.4R.C,-g) Iog, 3. (13)
As 4R is usually a large number, (13)
is approximated by
H==-II-log23.4R.Cp == 2. 1.4R.Cp (bits) .
ates, and the position of each pixel is
Let Cpo be a special value of Cp for
which the right side of (13) equals to
4R. That is,
Cpo - -2 .4-1. (4R log23 + g) . (ls)
these relations.
These discussions lesd to the next
self-evident theorem.
[Theorem 3] Any picture r, for which Cp(T)<Cpo holds, is representable
by the data less than 4R bits in terms
of 9*(T).
According to this theorem, effectiveness of DF-expression depends definite-
ly on the value of Cp. We show some
4R
i
:
:
:
:
l,
;
1
nyCpo
pc
5 Re!ation between Cp and the
total data of the corresponding
DF expression
a== biaib2a2•••bRaR. (17)
3.1. DF-encoder
In the DF-coding algorithm we need
a device titled DF-encoder which is
schematically shown in Fig. 6. This
encoder fetches pictorial data from the
memory device (ME) and sequentially
produces DF-expression from left to
right,order. We assume that 4R data
by an imaginary hardware device. The
DF-encoder consists of the following
:Original pietorial
Fig.
ly and (ac,y) is simply related as
this encoder by software. But it is useful to understand its essential operation
Å~
o
So the pixel address a defined previous-
ME. In an actual system we realize
Total data of a
DF-expression
it
: data
x=Eaia2•••a,••'aR (ar=O,1),) (16)
are located from address O to (4R-1) on
.2.'lx4R
i
specified by two binary numbers such
'
Y= bib2"'br"'bR (br =' O, 1). J
Fora large 4R, Cpo.!=O.47. Fig.5 shows
(bits)
coding algorithm.
A standard I/O devices for pictorial
data processing have X and Y coordin-
(14)
H
In order to utilize DF-expression in
an actual system, an effective coding
algorithm is needed. In this Section,
we show such an algorithm, named DF-
five fundamental units.
1) Reader (RD):This is a data reading unit consisting of address counter
(AC) and data reader (DR). DR reads
pictorial data from ME, and AC indicates their addresses.
2) Symbol generator (SG):This generates "(", "O", and "1".
3) Q-Register (QR):This isatemporal memory which keeps a queue (or a
A Representation of Digital Pictorial Pattern
string) of "("'s, "O"'s, and "1"'s. We
symbolize this queue by Q. Output from
QR becomes a prat of DF-expression.
4) Input Controller (IC):According
to information from AC and DR, IC controls input symbols into QR.
-7-
most bit) to upper (or left) bits in AC
are all O's.
4) Repeat next a) and b) four times.
a) Add "O" or "1" to Q. If RD
reads O, then "O", and if 1, then
"1" must be added.
5) Q-Controller (QC):QC shifts out
b) [AC]=[AC]+1 (binary addition).
Q from QR if one of the following con-
5) Apply two reduction rules to Q
ditions is satisfied.
Condition 1: Q contains several "("'s,
and the last (or the right most) "(" is
followed by the sequence including both
"O" and "1".
Condition 2: Q contains no "("'s.
repeatedly.
6) If Q satisfies condition 1 or condition 2, shift left Q out of QR.
7) If [AC]==1000...O (the value is4R),
shift out all Q from QR and halt. If
not, go to 3).
In another circumstance where Q con-
We give supplementary explanations
tains "(OOOO" or "(1111", QC reduces Q
about step 3) and 6) in the next.
Step 3): Let ct and B be such that
by two reduction rules, i. e.,
1) (OOOO-O...•, 2) (1111-->1.e.•
last two bits are not 11,
where.means, a space.
Q-controller
output <qC) Q-register(QR)
-K!pm -t-Input
controller
(rc)
--
ct : a 2 R-2 m bits binary number, whose
Symbo1
genera.tor
"(","o",,,
Data reeder
(DR)
.---Pictoria!
data
HHO--....--ooelot"e
OHOr-lH oHorlo
OOdHH
oooo...o
H-H-O--..
Memory
--. OOd-O
Address
of
ooaoH
(ME)ooaoo
picture
elements
OOOHoH-HHH
eoaoo ooooo
dresscounterXReader
(AC) (RD)
Fig. 6 DF-encoder
B: a binary number of 2m 1's.
Step 3) occurs immediately after DR has
read the e."s which is the last datum in
S.R-M. At this stage the effective interval of the preceding "(" corresponding to that S.R-M is over. Therefore,
another "(" must be inserted. It corresponds to the next subframe.
Step 6): Reduction rules in step 5) are
applicable only to the last part of Q. So,
if Q satisfies condition 1, there is no
possibility that this Q will be reduced
in the future. The situation of condi-
tion 2 occurs only when Q is reduced
3.2. DF-coding algorithm
In this algorithm we use such a con-
into a single "O" or "1". But this symbol is in fact in the effective interval
vention that the notation [X] means
of the preceding "(" which have been
already shifted eut. from QR. There-
the content of X.
1) Clear QR.
2) Clear AC. That is, set [AC]=OOO
•..O, where OOO...O is a 2R bit binary
fore, this symbol will never be reduced
number of value O.
3) Add m"("'s to Q under the con-
length of Q in our algorithm. Q becomes the longest at the final stage of
trol of IC if and only if consecutive 2m
or 2m+1 bits from the LSB (or the right
step 4) in a certain cycle of DF-algorithm. But it never exceeds 4R +19'. This
again in the later cycles.
Now, let us consider the maximum
kK,amer\ERveBtiNWk
-8-
ee 2g ee 2 I:F
;i.ll, ( (2R-ri. y, +2R-r2'-1) 4R-ri.pa;f )
means that we do not need alarge
temporal memory in DF-encoder. For
yg- " '
Ill.ll, 4R -ri •paf
instance, in case of wholly black picture)
Q= (111 (111 (111. . . (111 (1111
4R+1
va $p 56 tlp
(20)
In equation (19) and (20), 2R"i.Xt and
2R-ri.Yi are X and Y cbordinates of the
left most bottom pixel of pai,,and(2R-'t-1)
is the longest, which appears just after
shows the width of the square. As
RD have read the last datum (i.e.,
we see later, the number of primitives
is much fewer than the number of total
pixels. Therefore, a great deal of computing time will be saved in this me-
1iRn".n) On ME•
The algorithm of recovering the original pictorial data from DF-expression,
that is, DF-decoding algorithm, is also
described with similar imaginary hardware device titled DF-encoderie)..
4. • Picture processings on DF-expression
In this Section, we describe the se-
thod.
4.2. Circular shifting
We shall define circular shifting. The
r-th order right circular shifting (r-th
right shifting. for short) is the right
veral kinds of basic picture processings,
circular shifting operation of the original picture by the distance of 2Rmr pixels.
or operations, where some are carried
We symbolize this operation by Xr(r)
out at the level of primitive sequence,
(cf. Fig. 7(a)). Then le right shifting
and others are on the DF-expression
is recursively defined as;
Xkn(...Xk2(Xki(r))...),
where le=2R-ki+2R-k2+...+2R-kn,
itself.
4.1. Centroid of black pixels
Any "1" in 2*(r) corresponds to a
certain r-th order black primitive which
consists of 4R-r black pixels. Accordingly, the coordinates (X., Y.) of the
picture centroid in binary numbers are
calculated as follows:
Let
P(I-')=pElpE:•••pE;•••pa: (18)
be the primitive sequence of r. From
such ai (that is, ai=bi ai b2 a2 ••• briari,
where b's and ds are O or 1's), we
can extract two binary numbers; Xi=
aia2•••ar, and Yi=bib2...b,,. Then it is
easily seen that
II. lll.. }, ((2R-ri.x, + 2R-r2i -i)4R-r, .pa; )
and O<lei<le2<•••<le.::i{IR.
In the same way, the r-th left, up, and
down shiftings are denoted by X-'(T),
Yr(T), and Y-r(T) respectively.
NoW we define the r-th (order) subsequence expression of a picture. The
r-th sub-sequence expression of a L
denoted by 2r(r), is the sequence of
symbols that is obtained from 2*(r)
after applications of inverse reduction
rules. It includes all DF-expressions of
r-th order subpictures in T. Thatis,
let (DEioo, (D32oi, (Da3io,••. be DF-expressions
of r-th order subpictures, then 2'(r)
is of the form;
S?r(I") == ((••• ((DE,,, tu3,o, CDa,,o (Da,ii ((Da,oo Q)3,oi
(Da21o (De2u••.((DEioo (DEiol Q)iiio tuiili••.
li•llll.,4R-ri•pA;;.
(toa.oo toa.o, tua.,, oa.. , (21)
(19)
where m==4'-i, and ai is the binary
-9-
A Representation of Digital Pictori41 Pattern
then cti=Ol, else if Bi==11 then ai=
10, else if Bi=:10 then ai=11.
number with 2(r-1) digits. For example,
the 2nd sub-sequence expression of r
in Fig. 2(a) is:
,s?2 (1-T) == (((Dg,,, tog,,, og,,, (Dg,,, (to&oo (Dg,6i o3i!o
(D&ii ((Dlooo (DioDi to?eio (D?oii ((]L)koo (Dkoi
(]O?no CD:in, (22)
where wZooo :O to2ooi==1 to:oio =O togoii==1
to&oo=O togiei=O ogno=O (D:m=O
taieoe==O torooi="1 (D?oio==(OOOI
Q)roii==1 to;ioo=(1100 okoi==(1101
to?no == (OOII tolni"= (Olll.
Naturally, we have RO(r)-9*(1") for
anyr. Suppose
3) If ai=Ol or 11 then go to 4), else
• afj = Bj (J'-i- 1, l-2, •••2, 1) and halt.
4) i--i-1, and go to 2).
After rearranging 9r(r) into 2r(xr
(r)) we must apply reduction rules
to 9r(Xr(I")), then we get the DFexpression of r-th right shifted picture,
i. e., 2* (Xr (T)).
For example, 2nd right shifted form
of S2*(r),for such r in Fig. 2(a) is
as follows:
92 (X2(I-T)) = ((tug,,, tug,,, to3,,, to3oio (togoDi to&oo
S2r(]")-:((•••(o3, toa, (Da, wa, (••• (23)
wgoii togno (Q)?ioi to?eoi (]t)?m (DgoiD
(OiOOi to?iOO toZOii tuZiiO
and
==((OOOO(1010((11010(Olll
2r(xr(r))--((•••(tos, toE, tog, tuE4 (••• (24)
(OOOI (11001 (OOII, (25)
are r-th sub-sequence expression of the
original, and the shifted pictures respe-
ctively. Since r-th shifting causes no
effect to the DF-expression of any subpicture of order greater than or equal
9* (X2 (T)) == (O (1010((11010 (Ol11 (OOOI
(1 (11001 (OOII. (26)
This is illustrated in Fig. 7(b).
that is obtained after rearranging oE's
Other shifting operations such as X"'
(r), Yr(r) and Y-r(T) are also carried
out through similar rearranging proce-
in 2'(r). That means, every tug in
sses.
to r, 9r(Xr(T)) is just the sequence
2r(Xr(T))is just the same as some oa
in 2r(T), and vice versa. So the r-th
f-fi--H--Fi
right shifting operation is a rearranging
'
process of each oE in S?r(T). In
other words, 9'(Xr(T)) is to be obtained
by sequential concatenation of all toE's
in their new address (in terms of B)
order, with suitable number of "("'s.
Therefore, we only need to know which
a corresponds to that B. The following
is the summary of the algorithm of find-
ing unique a from a given B.
Let B=BiB2"'Bi"'Br•
where Bi(i-1, 2, •••, r)=OO, Ol, 10, or 11.
s'''
'
'
er'.
etr"
;'
o
::e;t
2R'-r
2R
(a> <b)
Fig. 7 Circular shifting of picture
4.3. Rotation by multiples of 90e and
mirror operatien.
1) Set i---r.
The picture which is obtained by rotating an original r with respect to the
center of SO, by the degree of 90, 180
2) If Bi==Ol then ai=OO, else if Bi=OO
and 270 counterclockwise, are denoted
Then the corresponding a==aia2•..ai•••ctr
is decided by the following steps.
-10-
ms aEx\ fiA yetsw wk
by Ki(r), K2(r) and K3(r) respectively.
ee 2g ee 2 El
mpm iF" 56 tEll
These operations are performed by the
combination of circular shiftings and
Also we give the notation M(r) to
the picture transformed through the
simplifications. The procedure for Z'(T)
mirror operation about Y axis. As pri-
is as follows.
mitives are subpictures in square frame,
so the shape of primitives after the ro-
1) We repeat Ieft-down shiftings of
r until the original center ofT moves
tatlon or mlrror operatlon remalns unchanged. These operations are another
types of rearranging process. For example, K'(r) is obtained as follows.
to the central position of So'e".oo. Let T'
1) We transform the address expression a of pe in P(T) tb the address
tuain...be the r-th sub-sequence expres-
expression B of pS in P(Ki(I-')). Let
9r(r') is the DF-expression of Zr(I").
be such shifted picture.
2) Then we regard So'o."oo as the total
frame. Let 2r(r') = ((•••(oa,oo to3,oi tuaiio
sion of 1'. The sub-sequence o3ieo in
The procedure of obtaining Z-r(r) is
ct==aia2 ••• cui••• a, and B==B!B2 ••• Bi ••• B.,
where ai,Bi==OO, Ol, 10, or 11. The
as follows.
relationship between cri and Bi is shown
1) Let 9R-r(I") be the (R-r)-th subsequence expression of r. We replace
in- Table 1.
every Q)Åí;,' in 9R-'(I') with O or 1.
This is a simplification of the original
picture. In this case, we should execute
such simplification in such a manner as
to preserve the shape of original picture
2) We rearrange every pE obtained
in step 1), in order of address B. The
result is P(Ki(r)).
3) We translate P(Ki (T) to 2* (Ki (r)) .
K2(r), K3(T) and M(T) are accomplished in the same manner. The ad-
as much as possible. Also we apply
reduction rules to this expression. The
resultant is denoted by 2*(r').
dress relations are also listed in Table
L
2) We addr"("'s to the left side of
2*(T') and 3r "O"'s to the right. The
Table 1 Address transformation for
rotation and mirror operation
K2(r)
Ki(r)
cti
oo
Ol
10
11
picture corresponding to this DF-expres-
M(r)
K3(r)
pi
ai
Pi
cti
,B i
cti
Ol
oo
Ol
10
11
10
10
Ol
oo
Ol
10
oo
11
oo
Ol
10
11
oo
11
Ol
11
11
oo
10
,B i
sion is denoted by r". r" is the reduced picture by the factor 1/2r, but its
location is still in So'o".oo.
Ol
oo
11
10
3) We repeat right-up shiftings of
r" until the center of the reduced pic-
ture moves to the center of SO. The
resultant picture is the Z-r(r).
4r4. Expansion and reduction
The expansion by the order r is the
expanding operation of original picture
4.5. Logical operations on DF-expression
We can produce new pictures by apply-
by the scale factor 2r with central point
ing logical operations to each pixel value
of original pictures. The logical opera-
of T being fixed. We represent this
operation by Z'(T), where r=1,2,3•••.
In the meantime the reduction of order
'
ris the inverse operation of 7 by the
factor 1/2r, and is denoted by Z-r(r).
tions on DF-expession are defined as
follows :
(1) AND 9*(T,) . 2*(r,)-9*(r, . T,),
(2) OR 9*(I-,)+2*(r,)-S2*(I-',+J",),
-11-
A Representation of Digital Pictorial Pattern
expression directly, we now define the
(3) NOT 2*(r)-2*(r).
following operations on a symbol, or
These three operations are interpreted
as (1) intersection, (2) union, and (3)
complementation of pictures.
To execute logical operations on DF-
pair of symbols in DF-expressions.
Operations must be carried out from
leftto right order on the strings.
"O"."O"="O", "1"•"O"="O",
"1" • "1" -=
"1", "O"+"O"=:"O", "1"+"O"="1",
"1"+"1"=="1'S, "("."("="(",
"(,,+"(,,=
((
"("."1"="(" [in this case,
four "1"'s must be inserted after "1"],
:((:.'112Z'Z:9:) :ig,,t.h.is.s,a,se•
"("+"O" ="(" [in this case,
(tts
all symbols in the effective interval of "(" are
four "O"'s must be inserted after "O"],
"O"="1", "1"-"O", "("-="(".
The operations . and+are commuta-
digitized into binary pictures with1024
tive. After these operations, we finally
apply the reduction rules to get the DFexpression of the new picture.
ing analog data from image dissector.
These values were determined in consi-
The logical operation is very useful
when we apply DF-expression to picture
series or gray images. Outline of such
derations of each set of data being not
influenced by the image quality (e.g.,
each background of picture may not be
applications will be shown later.
5. Experimental studies
uniform, or the inking of the black
areas may not be uniform, etc.). In
We have performed several kinds of
this system every pixel is randomly acc-
experiments to examine the effectiveness
essible.
1024 pixels (that is, R=-10) by threshold-
of DF-expression in view of data compresslon.
5.1. Experimental apparatus and test
pictures
PDSCAMERA
D!SSECTOR) SCANCONVERTER
INTERFACE
The apparatus used in this experiment
is PDS (Photo Digitizing System)-200
pictorial data processing system controll-
ed by TOSBAC-40C mini-computer as in
Fig. 8. Test pictures are (a) weather
chart, (b) circuit diagram, (c) prints,
(d) crest patterns, (e) bold-faced characters, and (f) English text as shown in
Fig. 9. These pictures were all 20cm
by 20cm size, and were placed in front
DISPLAY
(IMAGE
CONTROLUNIT
INTERFACE
PTR
CPU
(TOSBAC-40C52KB)
TTY
Fig. 8 Block diagram of the PDS
5.2. Picture complexity and spectrum
of primitives
The number of r-th primitives (for r==
of PDS camera 85 cm apart from its lens.
The illumination on the picture surface
3, 4, •••, 10) and the picture complexity Cp
was 3800 lx and the diaphragm of the
for test pictures were calculated in order
camera was 5.6. Analog images were
to know the statistical properties of
-12-
ee2g
ks aEr\ Eff :detu $ma k
ee 2e
va Ta 56 tlli
n
,tCZ(rdM
Q
`tiilliiiii[iiks
N
v,s@
o
sL.
z
sa
v
.o"NL
@
P
(a)
(c)
(b.)
.
THE GETTYSBURCS AODRESS
by Abraham Lincotn
feetscore ut sevtrt "vs lgo eut ththers brevght torth upon
this tent,ntnt i rvw Nt,oo, centtivtd in I,bertv, ind dediCltrd
tO lrbt ptopeslllon thit atl mtnite ctt-led equIl.
tt ,s r-Ttw te{ vs Ie be beft dtd;c4f{" le tht greal ta"
ttmltn,ng brtart us-trLtt ttom thtse horlered dtid we ta-t
lnct-iSed otyetlon to thal c-ute tet .tucn lhev pave tN list
tott mNs"re ct et.ol,en-l)mt " hete htptlv teselvt t)vat lhese
6t-d sh"1 oot htvt di-d in vaLn-lhll lhts tutien, undet God.
stvtt ht.e 4 dv btnh et tteedorn-lna tNt, obyttnrrwot ot tbe
peoptt. by lhe pteptt, tet tht peep)t, st"U nel peresfl trem
the eulh.
hS,
PROVERB
1. Whtre theh is l .ttlL thtre ;s i t,ir.
2. Aome ."s nel buLt ina "v. 2. ib nevs good ntws.
4. 4s-, Ma il thltt be gtrtfi to".
5• E"v te gv, h"d to do. 6, (hJt ot sgts, ou1 ot rn,nd,
7, Etttv t,sh that tsevs, ippe"rs crNttt khin tbs.
8. Hetven trlps {haLe "ho htlp lrptnieLvts.
9• :t vcu wckdd indv, tN vtiut ot monty. trr to botrow il.
tO. Wtvt 1ltt toel Oees 4t t"t, the wise mlfi does at tirst.
(d)
(e)
Fig.
Table 2
(a)
T
r
3
4
5
6
7
8
9
10
Total
Pixel
Cp
(f)
9 Test pictures
Complexity and number of primitives
(d)
(c)
(b)
(e)
(f)
W
B
W
B
W
B
W
B
W
B
W
B
o
20
228
o
o
o
1
23
875
15
57
229
497
o
o
9
48
144
554
o
1
17
184
o
15
91
107
o
o
2
316
17
22
104
497
o
o
6
288
2
31
117
o
o
o
o
o
548
O. 924
O. 076
o
1
34
14562
13960
1267
3036
5604
5988
1120
5802
5988
1530
3546
7230
5794
41467 29421
16693
12945
18855
17851
57203
67031
21622
1162
2898
7623
17600 14193
14086 14086
21366 43519 28827
O. 953
O. 047
O. 785
O. 215
O. 443
O. 557
O. 744
O. 256
1004
3037
7252
15966
13960
O. 916
O. 084
O. 068
O. 028
binary pictorial data. The results are
shown in Table 2. The white primitive
1030
3520
7305
5794
O. 035
3252
1146
5591 10058
23109 26259
27144 27144
O. 118
1262
3397
8633
7690
1447
3413
8522'
7690
O. 041
O. 069
Complexities of all test pictures were
is predominant except only one case
less than Cpo(#O.47). So, we became
convinced that even an appparently
(test picture (d)). Generally such predominance at primitive level is not so
very complicated picture will still have
less complexity than Cpo. For example,
remarkable as that of pixel level.
even a weather chart on a very noisy
A Representation of Digital Pictorial Pattern
-13-
The spectrums of test pictures are de-
background and a pattern of char-acters
that was printed very closely by lineprinter, were found to be less complica
monstrated in Fig. 10. It is clear
that spectrum patterns vary according
to the class of pictures. For example,
ted than C,o. With our preliminary
experimental studies, we have concluded
that DF-expression is a good method for
data compression.
Complexity of a picture gives us good
global information, but it does not tell
us anything about sizes of predominant
primitives. If a picture contains many
low order primitives, the picture wi11
consist of many areas. While, if not,
it will consist of many curves and points. Taking account of these features,
the significant differences are observed
between (a) and (f), but both complexities nearly equal to each other. Also
we have made certain that various pic-
tures of a same class (e.g. weather
chart) have some similar spectrum pat-
terns. Therefore, the spectrum will
serve as the feature for picture classification and as the index for pictorial
database.
5.3. Coding method and compression
we introduced the notion of spectrum
of primitives. Let mca and mg be the
number of r-th order white and black
primitives respectively. The spectrum
of primitives is the set of such r-th
ratio
DF-expression uses three'symbols "(",
"O" and "1". We must code them with
O and 1. In our study, the following
three coding systems were tested.
order components of primitives as follows:
eza-4r-.mza, e;-=4-r.m;, Qr--efi+e;.
(2) "(" . 11, "O" ---> OO, "1" -> Ol.
(2) "(" -. 11, "O" -> O, "1". 10.
(3) "(" -> 11, "O" -> O,
"i"-'(,ti.6{,ihl,"tee,P,e[rS'Serf-l?iZ..)
o.3 Q:i o.3 Qes
O.2 • O.2
O.1 O.1
O.1 O.1
O.3
O.3
O.2
O.1 O.2
O.1
O.1
O•2 qE O.1
O'2 Qbr
Q,r
Q,r
(a)
Qli
(2) comes from the Theorem 1 and the
<b)
estimation that "O" is the most frequent
Qli
symbol in an ordinary DF-expression.
(3) is based upon the fact that only "O"
and "1" appear in the effective interval
of an R-th (in our case, R=10) order
"(".
The program' of DF-coding algorithm
was written in the assembly language
of TOSBAC-40C. The compression ratio
(e)
(d)
qes
qes
O.3
O.3
O.2
O.1
O.2
O.1
ro
o
O.1
(1) is the most simple and consntat
length but apparently redundant system.
Qg
(e)
Fig.
is defined by
r
Total number of
v- ]sl9.ii:egg,(i.O,2`..Å~,i.02,`,?,,. (27)
O.1
Qg
(f)
10 Spectrum of primitives
The compression ratios of test pictures
-14-
kK.aNr\N EffStsNX9
ee 2g ee 2 ag
wa *ll 56 {EF
are listed in Table 3. These results are
pression is a generalized two-dimensional
very satisfactory. Especially, for (b)
and (c), markedly high ratios were obtained because of the predominancy of
about 60% better than (B) on the ave-
run-Iength coding, and its ratio (3) is
rage .
Iower order primitives.
In order to compare the eMciency of
DF-expression with typical facsimile
Table 3 Compression ratio
bandwidth compression methods, we also
performed three facsimile simulations
T
DF-expression
(a)
using the same data as our DF-coding
followings.
We summarize these experiments as in
the following statements.
(1) The compression ratio depends
(e)
9.15
(f)
5. 44
<c)
Table 3, where A, B, and C are the
(A) Block coding'i'.
(B) Two-dimensional predictioni2'.
(C) Mode run-length codingi3'.
(d)
5. 55
13. 27
10. 71
3. 17
(b)
methods. The results are all listed in
(1)
(2)
7. 11
16. 82
13. 27
3. 83
11. 27
7. 02
Facsimile method
(3)
7. 85
18. 61
14. 32
4. 25
12. 29
7. 75
A
3, 51
5. 46
2. 61
L 11
2. 26
3. 38
B
c
4. 86
11. 93
8. 44
2. 59
7. 38
4. 97
2. 87
6. 69
4. 87
1. 44
3. 96
2. 94
5.4. Application to picture series
A set of pictures, or a picture series,
is coded into a set of respective DF-ex-
pressionsintheusualmanner. Further-
on the statistical properties of pictorial
more, we may be able to get more compact form according to the next opera-
data. For example, since facsimile me-
tion.
thod (A) is based on the estimation
Let T3=Tier2 be the picture that is
produced by EOR (exclusive OR) opera-
that the white pixel is predominant in
the picture, so its ratio becomes worse
tion of Ti and r2. Then Ti==r2er3
when a picture contains many black
and I"2==Tier3 holds. EOR operation
pixels. In case of (C), the ratios for
such pictures as (a) and (f) are rather
worse because the mode transitibns are
on DF-expression is defined as;
very frequent. While, DF-expression
(1) is not influenced by which (black or
white) pixel is predominant in the picture.
(2) The compression ratio, both in
2* (T,) e2* (r,) =9* (r ,) .2* (r ,)
+2* (r,) .9* (T,) -= 2* (T,er,) .
Then we also have 2"(L)=2*(r2)e(2*
(I"i)e2*(T2)) and 2*`(I",)=2*(I"i)e(9*
(Ti)e2"(T2)). This can be said as
follows. When we store the data of a
facsimile methods and obviously in our
method, tends to decrease with increasing picture complexity in our sense. It
picture series {ri,T2} in some database,
we are allowed to store {2*(Ti),2*(T'i)
will be concluded that the complexity in
instead of (S2*(ri), S2*(r2)}. Especi-
our sense is a good measure of the
ally, if Ti and r2 are sirnilar to
02*(r,)} or (9*(r,), 9*(T,)e2*(r,)}
complicatedness of pictures from the
each other, 2*(Ti)e2*(72) will be more
standpoint of data compression.
compact than 2*(ri) or2*(r2). We
(3) The ratio of (B) is highest in
facsimile methods because the strong
illustrate a simple example of picture
two-dimensional correlations are observed among pixels. Incidentally, DF-ex-
operation in this case proved to reduce
series in Fig. 11. The effect of EOR
50% data of the ordinary coded DF-ex-
A Representation of
rl
Digital
Pictorial
P3
r2
-15-
Pattern
r4
rs
n
q
lp ..
'
rler2 F2$F3
F3
Fig. 11 An example of EOR
operatlon
e F4
r4 e rs
on a plcture
serles
presslon.
5.5. Application to multi-valued picture
So far we have restricted our discus'
sion to binary-valued pictures. But we
can easily remove such restriction. The
outline of the coding method of multivalued pictures by DF-expression is as
follows. Let there be 2le bits possible
values in each pixel. Then we are to
have le bit-sliced binary patterns. By
(a)
applying DF-coding method to such le
4 level
binary patterns, we can represent every
multi-valued picture as a set of le DFexpressions. Still more, EOR operation
may be worth trying.
This method was tested for 4 and 8
gray level pictures with 256 by 256 pi-
xels. Table4shows the resulted compression ratio by three coding systems.
We decoded these expressions into original pictures, and displayed them on a
(b) 8level
Table 4 Compression ratio of multivalued picture
Fig. 12 Decoded multi-valued pictures
Level
(1)
(2)
(3)
2
3. 79
1. 59
1. 03
4. 52
1. 90
1. 25
5. 39
2. 30
1, 56
4
8
storage type graphic display terminal,
where the cell size (the number of dots
per pixel) was 4 by 4. They are shown
in Fig. 12.
-l6-
8tav.FN, a pp [I t}}E liJl geu TSP va tll;'
6. Conclusions
The authors have presented DF-expression and demonstrated its effecti-
veness in data compression. This method has the following desirable advantages:
(1) It is applicable to multi-valued
pictures as well as binary-valued pictures.
(2) It preserves every information
for the reconstruction of the original
plcture.
(3) It yields much higher compression
than traditional methods which are often
found in facsimile transmission.
(4) The coding algorithm of raw data
into DF-expression is very symple, and
it is executed recursively by. an ordinary
processor if the pictorial data are randomly accessible.
(5) Some typical picture processings,
such as circular shiftings, rotations by
multiples of 900, expansions and reductions of a original picture, can be per-
formed on DF-expression itself. This
is useful for further picture processings
and flexible display of pictures.
(6) The logical operations of original
ee 2g ng 2 {l
Ba *u 56 ff-
References
1) T. S. Huang, "Coding of Two-ToneImages", IEEE Trans. on Comm., vol. COM25, No. 11, pp. 1406-1424, Nov. 1977.
2) H. Freeman, "On the Encoding of Arbitrary Geometric Configurations", IRE Trans. on Elec. Comput., vol. EC-10, No. 2,
pp. 260-268, June 1961.
3) S. Murakami, M. Okada and T. Tsuchiya, "A Study on a Method of Inputting
Line Drawings", Trans. IECE Japan, vol.
J59-D, No. 2, pp. 117-124, Feb. 1976.
4) A. Klinger and C. R. Dyer, "Experiments
on Picture Representation Using Regular
Decomposition", Computer Graphics and
Image processing, vol. 5, pp. 68-105, March
1976.
5) T. Ichikawa, "A Pyramidal Representation of Images", Proc. 4th IJCPR, pp. 603606.
6) G. M. Hunter and K. Steiglitz, "Opera-
tions on Images Using Quad Trees", IEEE
Trans. on Pattern Analysis and Machine
Intelligenc"es• vol. PAMI-1, No. 2, pp. 145153, April 1979.
7) F. de Coulon and O. Jhonsen, "Adaptive
Block Scheme for Source Coding of Blackand-white Facsimile", Electronics Letters,
vol. 12, pp. 61-62, Feb 1976.
8) M. Kunt and O.Jhonsen, "Codes de blocs
a prefixe pour la reduction de redondance
d'images", Ann. Telecommunic., vol. 33,
No. 7-8, p. 61, July 1976.
9) E. Kawaguchi and T. Endo, "On a Me-
pictures can be performed on it. This
thod of Binary Picture Representation and
Its Application to Data compression", IEEE
is applicable to the representation of a
plcture senes.
Intelligence, vol. PAMI-2, No. 1, pp. 27-
Trans. on Pattern Analysis and Machine
35, Janu. 1980.
(7) Such concepts as a picture complexity and a spectrum of primitives,
are defined based on DF-expression.
10) T. Endo and E. Kawaguchi, "Some Properties of DF-expression of Binary Pic-
They will serve as the features for picture processing and the indexes for pictorial information retrieval systemi`'.
11) K. Kubota, "Facsimile", J. IECE Japan,
We are convinced that DF-expression
mensional Prediction", Trans. IECE Japan,
vol. 56-D, No. 3, pp. 170-177, March 1973.
13) T. Ishiguro, "Facsimile", J. IECE Japan,
vol. 59, No. 11, pp. 1224-1230, Nov. 1976.
is effective and eMcient representation
of pictorial data not only for the construction of a pictorial database but also
for several types of picture processings.
tures", Tech. Report of Kyushu Univ., vol.
51, No. 2, pp. 147-154, March 1978.
vol. 57, No. 11, pp. 1370-1376, Nov. 1974.
12) M. Takagi and T. Tsuda, "Band-width
Compression for Facsimile using Twodi-
14) T. Endo, E. Kawaguchi and T. Tamati,
"DF-coding and Weather Chart Database",
National Convention Recgrd of IECE Japan, S197-IQ, March 1980.