Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 15

July 20, 2012

Lossless Image Compression Using


Ideal Crosspoint Regions and
the Integer Discrete Cosine Transform
Dr. Tin T. Dang, My D. Le, Nga N.A. Le
Hochiminh City Univerity o! Technology
Hochiminh City, "ietnam
Abstract # Thi $a$er $reent C%&CM 'Cro $oint %egion !or lole &mage Com$reion on Multi$le (it $lane), an
algorithm !or lolely enco*ing an* *eco*ing image, an* &ntDCT '&nteger Dicrete Coine Tran!orm), +hich i ue* in
tran!orm#(ae* *ata com$reion cheme. ,ae* on -ray co*ing, -ray co*e o! cro $oint are *etermine* on an a*.acent *ata
et (ecaue image characteritically contain *ata that *oe not change much in a $eci!ic area/ then thi e!!ect i generali0e* !or
real *ata +ithout loing generality !or their tatitical $ro$ertie. The -ray co*e tran!ormation ma1e the (it tate o! cro
$oint change !rom the original *ata (it, o !irt the $ro(a(ilitie o! *ata (it on $eci!ic (it $lane in cro $oint region an* then
the entro$ie o! the meage are change*. Thee $ro(a(ilitie are etimate* an* com$are* +ith the $ro(a(ilitie o! the original
*ata (it. Thi change o! $ro(a(ility ha im$ortant e!!ect on the enco*ing an* *eco*ing $rocee in lole image com$reion.
,ei*e &C% '&*eal Cro$oint %egion), &ntDCT i a*a$te* to recor*ing or tranmitting the igni!icant coe!!icient intea* o! the
+hole coe!!icient !or the $ur$oe o! achieving the goal o! com$reion.
There are 2 main $art in thi $a$er. Decri$tion o! i*eal cro$oint region +ill (e given in 3art 1. 3art 2 *e$ict ho+ to
contruct an* a$$ly integer *icrete coine tran!orm to com$re image lolely. There are e4$erimental reult an*
concluion o! the $ro.ect in 3art 2.
Keywords - cross point; ideal cross point region; discrete cosine transform ; integer discrete cosine transform; entropy coding
1
3A%T 15 &D6AL C%78837&NT8 %6-&7N8
I. INTRODUCTION
The !irt $art o! thi $a$er i a *evelo$ment o! the $a$er
91:, 92: that $reente* the *e!inition o! cro $oint an* cro
$oint region, the $ro$oition o! (it tate o! cro $oint an*
the cone;uence a(out entro$y o! o(taine* *ata in cro
$oint region a!ter -ray co*e tran!ormation. &t $reent the
e!!ect o! -ray co*ing on the calculating $roce o! $ro(a(ility
o! (it in i*eal cro $oint region.
Cro $oint are neigh(or $oint aroun* the $oint o! grey
level 2
n
. The $oint o! grey level 2
n
may or may not e4it in
*ata. The original *ata $oint +hoe value are le than 2
n
have (it tate (eing much *i!!erent !rom thoe o! the *ata
$oint (eing greater than or e;ual to 2
n
92:, 9<:. The change o!
(it tate !or -ray co*e tran!ormation i tu*ie* (y many
author 9=:#9>:, ho+ever the num(er o! (it an* the
*itri(ution o! thee (it o! -ray co*e in the i*eal cro $oint
region are not mentione* yet. Thi lea* to a ne+ cheme !or
*ata com$reion. The *ata are ar(itrary, (ut in i*eal cro
$oint region the change o! (it tate are ytematically
*etermine* a!ter -ray co*ing, o the $ro(a(ility o! *ata (it in
i*eal cro $oint region i ma4imal.
II. IDEAL CROSSPOINT REIONS AND !IT STATES
D6?&N&T&7N 2.1. Let the positive integer N be the bit
length of data points. The region of cross points Ao(n, p), with
n from (N 1 to 1, p from 1 to n, and n ! p, is a set of data
points whose grey val"es are from (#
n
@ #
n-p
to (#
n
$ #
n-p
@ 1.
The point of grey val"e #
n
(if it e%ists is called the center
point of the cross point region, and the grey val"e #
n
is called
the central val"e. These regions are the &'(s.
,y De!inition 2.1, *ata $oint in &C% have grey value that
ati!y the rule
)* (n, p A B 2
n
@ 2
n-p
, C,

2
n
D 2
n-p
@ 1E. '1)
The value n i the e4$onent o! central value 2
n
. The value p
give the range o! &C%, that mean the character o! grey
value o! *ata $oint in thoe region. The num(er o! (it $lane
!or *ata (it com$reion i 'n-p). &n general, the et )* 'n, p)
can (e *ivi*e* into t+o grou$5 )* l 'n, p) an* )* g 'n, p) +ith
)* l 'n, p) A B2
n
# 2
n#p
, 2
n
# 2
n#p
D 1, C, 2
n
#2, 2
n
#1E, an* )* g 'n,
p) A B2
n
, 2
n
D1, C, 2
n
D 2
n#p
F2, 2
n
D 2
n#p
F1E.
?or e4am$le, +hen n A 2, p A 1, )* '2, 1) AB2
2
#2
2#1
, C, 2
2
D
2
2#1
F1EA B<, =, G, H, >, I, 10, 11E, at that time )* l '2, 1) A B<,
=, G, HE, an* )* g '2,1) A B>, I, 10, 11E.
3%7378&T&7N 2.2. Let n be the e%ponent of the central
val"e 2
n
in the &'( Ao(n, p), where n is from (N @ 1 to 1, N is
a positive integer representing bit length, p from 1 to n, and n
! p. +its of ,ray codes in the &'( Ao(n, p) on the bit plane (n
@ p are always bits 1 (if p - 1 or 0 (if otherwise.
3roo! o! 3ro$oition 2.2.
Accor*ing to De!inition 2.1, +ith a value o! n in the interval
!rom 1 to 'N @ 1) an* p A1, grey value o! *ata $oint in the
region *o'n, 1) are !rom '2
n
@ 2
n@1
) to '2
n
D 2
n@1
@1), o they
may (e e4$an*e* un*er the !orm o! $olynomial o! ra*i4 2 '2)
'!or *ata $oint in )* l) an*Jor '2) '!or *ata $oint in )* g) a the
!ollo+ing
0. 2
N#1
DCD0.2
n
D 1. 2
n-1
D 4. 2
n-2
DCD 4. 2
0
, '2)
0.2
N#1
DCD0.2
nD1
D1.2
n
D".2
n-1
D4.2
n-2
DCD 4 2
0
,

'2)
+here 4 are (it 1 or 0.
A!ter -ray co*e tran!ormation, '2) an* '2) (ecome '<) an*
'=) re$ectively
0.2
N#1
DCD0.2
n
D#.2
n-1
D 4.2
n-2
DCD4.2
0
, '<)
0.2
N#1
DCD0.2
nD1
D1.2
n
D#.$
n-#
D 4.2
n-2
DCD 4. 2
0
. '=)
,y com(ining '<) an* '=), the region *o'n, 1) on the (it
$lane 'nF1) al+ay contain (it 1.
?or e4am$le, +hen n A 2, the central value i 2
2
, *o '2, 1) A
B<, =, G, H, >, I, 10, 11E. A!ter -ray co*ing, the -ray co*e o!
thoe value are G, H, =, <, 12, 12, 1=, 1< re$ectively, all o!
them have (it 1 on the (it $lane 2 'A 2 F 1). Thi i very goo*
!or com$reing real *ata (ecaue the $ro(a(ility o! (it 1 in
&C% i al+ay 1, an* the $ro(a(ility o! (it 0 in &C% i al+ay
0.
Khen p A 2, 2, C, or n, grey value o! *ata $oint in the
region *o 'n, p) are !rom '2
n
@ 2
n.p
) to '2
n
D 2
n.p
@ 1), o they
may (e e4$an*e* un*er the !orm o! $olynomial o! ra*i4 2 'G)
an*Jor 'H)5
0.2
N@1
DCD 0.2
n
D 1.2
n@1
D 1.2
n@2
DCD #.2
n@p
D %.2
n@p-1
DC D
D %.2
1
D %.2
0
, 'G)
0.2
N.1
D C D 0.2
nD1
D 1.2
n
D 0.2
n@1
D 0.2
n@2
D C D D0.2
n.p
D
D %.2
n.p-1
DCD %.2
1
D %.2
0
, 'H)
+here % i (it 1 or 0.
A!ter -ray co*e tran!ormation, 'G) an* 'H) (ecome
0.2
N@1
DCD 0.2
n
D1.2
n@1
D 0.2
n@2
DCD ".2
n.p
D %.2
n.p-1
D DCD
%.2
1
D %.2
0
, '>)
0.2
N@1
D C D 0.2
nD1
D 1.2
n
D 1.2
n@1
D 0.2
n-2
D C D D".2
n-p

D %.2
n.p-1
DC D %.2
1
D %.2
0
. 'I)
6;uation '>) ho+ that the *ata $oint ati!ie )* l on the
(it $lane 'n @ p) al+ay contain (it 0. ,y com(ining '>) an*
'I), the region *o 'n, p) on the (it $lane 'n @ p) al+ay
contain (it 0 too.
?or e4am$le, +hen n A 2, p A 2, +e have *o '2, 2) A BG, H,
>, IE, -ray co*e o! thee *ecimal value '=, <, 12, 12) have
(it 0 on the (it $lane 1 'A 2 F 2).
Thi tatement i convenient !or the $roce o! o$timi0ing
the $ro(a(ility o! *ata (it in the cheme o! lole image
com$reion, e$ecially in the te$ o! mo*eling o! entro$y
co*ing.
C7N86LU6NC6 2.2. &n the ideal cross point regions *o,
after ,ray code transformation the entropy of obtained data
on a certain bit plane is minim"m.
3roo! o! Cone;uence 2.2.
Ke can eaily ee that in the i*eal cro $oint region *o 'n,
p) on the (it $lane 'nFp), (e!ore -ray co*e tran!ormation, the
$ro(a(ilitie o! (it 1 an* (it 0 are ran*om, there!ore the
entro$y o! the corre$on*ing (it tring i o!ten / A #0'1). log2
0'1) # 0'0). log2 0'0) M 0.
A!ter -ray co*ing, thee i*eal cro $oint region contain
all ame (it '(it 1 or (it 0), o the $ro(a(ility o! (it 1 in the
region i 1, an* the $ro(a(ility o! (it 0 i 0 there, an*
inverely. Thi i the reaon !or that the entro$y o! *ata (it
tring i al+ay / A #0'1). log2 0'1)# 0'0). log2 0'0) A 0, that
mean the average in!ormation o! thi region i 0.
2
III. CODIN S%STE& 'OR LON SOURCE
SE(UENCES
Let u aume a ource al$ha(et A, to (e A A Ba1, a2,C, acE,
+ith c *i!!erent ym(ol o! a 0ero#memory in!ormation ource,
each ym(ol ai i +ith a $ro(a(ility 0i an* a ;uantity o!
a$$earance Ni. Let , (e the co*e al$ha(et, , A B(1, (2,C, (d E,
+ith d *i!!erent ym(ol (1 , let N (e the tring o! an ar(itrary
e;uence o! ym(ol that re$reent the concatenation o! the
tring ym(ol. 6ach maage o! ource e;uence ai1ai2Cain o!
length n i corre$on*ing to a co*e+or* (11(12C(1l +hich i a
co*e e;uence o! length l. The notation ai an* (1 re$reent
literal ym(ol !rom the ar(itrary ource an* co*e al$ha(et
!or +hich the co*e i to (e *e!ine*. The $ro(a(ilitie 0i are
real num(er, the a$$earance Ni are integer.
Jone 9I: *e!ine* a cumulative !re;uency ta(le 2 +here 2i
i com$ute* (y
1
]
1

+

i 1
1 i
0 " 2
1
2
1
,
c i 0
.
'10)
The !unction ]
%
i *e!ine* a the greatet integer le than
or e;ual to %, +here % i a real num(er, 23 A 0 an* 2c - ", " i
the cale !actor that i mentione* (elo+.
Here i the co*e generation $roce*ure to e4act arithmetic
mani$ulation o! integer !or avoi*ing any inaccuracy +hich
might (e intro*uce* into the algorithm (y in*icriminate ue
o! !loating#$oint calculation. 8o at $reent, +e have to acce$t
an a$$ro4imation !or com$uting 2i (y uing $ro(a(ilitie 0i
that are real num(er +hich are a$$ro4imate*. &n thi
$roce*ure the cale !actor " that e!!ectively convert a real
$ro(a(ility to a !re;uency rate $er " ource ym(ol. Thi
cale !actor " can (e choen to avoi* the roun*ing e!!ect.
&n 910:, a!ter the $roce o! counting the ;uantity o!
a$$earance o! ource ym(ol +e have a et N A BN1, N2, C ,
NcE, +ith 0 O Ni O ", an* +ith ome im$le o$eration +e can
ee that the e;uation '10) (ecome
2i-

i 1
1
N
1
, c i 0 . '11)
8o the $roce*ure to com$ute 2i i not an a$$ro4imate
calculation an* n i the num(er o! ource ym(ol in thi cae,
(ut in ome cae i! +e alrea*y ha* the $ro(a(ilitie 0i, +e
coul* ue '10), not '11), to calculate 2i. An* i! +e ue '10), +e
have to choice the cale !actor " a$$ro$riate to the value o!
the $ro(a(ilitie 0i .
The (aic $rinci$le o! ource co*ing cheme i that (oth
u$$er an* lo+er limit o! the interval corre$on*ing to the
tring N are re$reente* (y three !unction 4(5, 6(5 an* L(5.
L(5 i in the com$onent o! e4$onent #L(5-w (y +hich the
(ae d i raie* to give a cale !actor. 4(5 an* 6(5 re$reent
the $oition an* +i*th, re$ectively, o! the interval, they are
integer, an* converte* into !raction (y the cale !actor
*
#L(5-w
.
Kith the initial con*ition
4( - 0, 6( - d
w
, L( - 0 , '12)
4, 6 an* L are *e!ine* recurively (y the !ollo+ing
e;uation '12), '1<) an* '1=)5

( )
s
i i
d " 2 6 4 4

,
_

1
]
1

+ +

2
1
J ) ' ) ' ) a '
1
,
'12)
( ) ( )
s
i i i
d " 2 6 " 2 6 6

,
_

1
]
1

+
1
]
1

+

2
1
J ) '
2
1
J ) ' ) a '
1

, '1<)
L'5ai A L'5 $ s, '1=)
+here 5ai i an e4ten*e* e;uence the interval limit o! +hich
are *erive* (y a ma$$ing o! the ne+ ym(ol ai onto the
$reviou interval (ae* on the cumulative !re;uency ta(le, s i
the integer !or +hich
d
w
O 6 '5ai ) O d
w$ 1
'1G)
The $arameter w i ue* to $reent the +i*th o! an interval
(y 6 '5), it e!!ectively *etermine the num(er o! d#ary *igit o!
$reciion (ecaue in the !loating#$oint term the caling (y d
s
in '1<) to ati!y '1G) i e;uivalent to a normali0ation o! 6
'5ai) to 'wD1) d#ary *igit.
,ei*e that, Jone 9I: $reente* main !eature, $ro$ertie,
enco*ing an* *eco*ing algorithm that +e ue* to *evelo$ our
cheme, (ut intea* o! uing the $ro(a(ilitie to com$ute the
cumulative !re;uencie +e ue the ;uantitie o! a$$earance o!
ym(ol, o +e *onPt carry out a$$ro4imate calculation !or
com$uting the cumulative !re;uencie 2i .
I). SC*E&E ICRIC 'OR LOSSLESS I&AE
CO&PRESSION
?igure 1. $reent the cheme &C%&C !or image com$reion
generally. 6ach te$ i num(ere* accor*ing to the e;uence o!
the cheme, +e have G te$ !rom 1 to G. The !irt te$, 8te$ 1
'&*eal cro $oint region) loo1 !or region o! cro $oint
+here +e can o$timi0e the $ro(a(ility o! *ata (it. -rey
value o! *ata $oint in thee region ati!y '1) !or &C%. 8te$
2 'Cro $oint ma$) +ill eta(lih the ma$ o! i*eal cro $oint
region. Notice that +ith each central value 2
n
+e have many
*i!!erent i*eal cro $oint region *o'n, p) on (it $lane 'n-p),
in thoe region +e enco*e *ata (it. Thi te$ evaluate an*
ignore mall i*eal cro $oint region containing 1, 2 or 2
*ata $oint *e$en*ing on the num(er o! (it $lane 'n#p), thee
area *onPt a!!ect much the com$reion ratio o! $rocee o!
co*ing an* *eco*ing. The thir* te$, 8te$ 25 -ray co*ing,
ma1e -ray co*e tran!ormation 92:. 8te$ < ',it $lane
*ecom$oition) *ecom$oe image *ata into e$arate (it
$lane that are num(ere* !rom 0 to N#1, thee num(er *e$en*
on the igni!icance o! (it, +here N i the (it length o! $i4el
o! image. The ne4t te$, 8te$ =5 7$timi0ing $ro(a(ility,
calculate the $ro(a(ility o! *ata (it outi*e &C% an*
o$timi0e $ro(a(ilitie o! *ata (it in &C% (y the $ro$oition
2.2. Thi o$timi0ation i (ae* on the cro $oint ma$
(e!orehan* an* im$lemente* to 8te$ G to com$ute !re;uencie
o! *ata (it. The lat te$, 8te$ G5 Co*ing, ue ome algorithm
in the $roce o! entro$y co*ing, li1e arithmetic co*ing. &n the
e4$erimental reult at the ne4t ection, +e ue JoneP
algorithm 9I: mentione* in the ection 2 a(ove. The $roce o!
enco*ing *ata (it houl* (e carrie* out !rom the mot to the
leat igni!icant (it $lane (ecaue o! the ran*om o! *ata on
the le igni!icant (it $lane.
There!ore, thi cheme i a $roce o! entro$y co*ing5
mo*eling '!rom 8te$ 1 to 8te$ =), an* co*ing '8te$ G).
2
2ig"re 1. The scheme &'(&' with ideal cross point regions
for lossless image compression.
). CONCLUSION
The cheme &C%&C an* ome reult are $reente*. Thi
cheme +ith the *e!inition 2.1, the $ro$oition 2.2, an* the
cone;uence 2.2 i no+ a ne+ $art o! the theory o! cro $oint
region +hich are mentione* in 912:, an* 91<:. &t illutrate* the
ue o! the theory o! cro $oint region +ith o$timi0ing
$ro(a(ilitie o! *ata (it only in i*eal cro $oint region. &n
thi $a$er, +e have ue* i*eal cro $oint region on (it $lane
'n - p), thi i the *evelo$ment !rom 91:, 92: an* 912:, 91<:. Ke
may chooe the num(er o! (it $lane 'n - p) (e!ore enco*ing,
that may ma1e the com$reion ratio *ecreae *ue to (igger
an* (igger cro $oint ma$, (ut thi i (etter an* (etter !or
encry$tion. The *ata receive* !rom the cheme i reveri(le,
o thi cheme can (e trongly ue* in cry$togra$hic ytem
+ith 1ey *e$en*ing on n#or*er etimating, num(er o! (it
$lane, num(er o! i*eal cro $oint region, thi $ro(lem +ill
(e mentione* in another $a$er. -enerally, the cheme &C%&C
i a $roce o! entro$y co*ing, it inclu*e t+o $art5 mo*eling
'8te$ 1#=) an* co*ing '8te$ G). The theory o! cro $oint
region can (e ue* in the !irt $art in or*er to re*uce
inter$i4el re*un*ancy, the econ* $art ue ome algorithm,
li1e arithmetic co*ing or JoneP metho* to re*uce co*ing
re*un*ancy.
The (aic conce$t have (een intro*uce* in 91:, 92: +hich are
no+ the (ae !or the theory o! o$timi0ing $ro(a(ilitie o! cro
$oint +ith the ne+ conce$t o! i*eal cro $oint region. A
meaning!ul im$rovement in com$reion ratio ha (een
o(taine*, com$are* to the other authorP metho*. ?rom thee
concrete (ae, the $ro(lem o! im$roving the com$reion
ratio o! image $roceing an* tranmiion can !urtherly (e
*evelo$e* in the !uture.
RE'ERENCES
91: Dang Thanh Tin, "u Dinh Thanh, Nguyen Qim 8ach,
8eiha1u Higuchi, R7$timi0ing $ro(a(ility o! *ata (it (ae*
on the theory o! cro $oint regionS, M&& .ournal, vol.22,
No. 2, May 200=.
92: Dang Thanh Tin, "u Dinh Thanh, Nguyen Qim 8ach,
8eiha1u Higuchi, R6!!ect o! -ray co*ing on the tate an*
the *itri(ution o! *ata (it in cro $oint region,S in 3roc.
2r* &nt. Con!. Com$utational 6lectromagnetic an*
A$$lication, &666 catalog No. 0<6T>H=, ,e.ing, China,
Nov 200<, $$. ==2F==G.
92: C. J. Lu, 8. C. Tai, RA note on iterating an #ary -ray
co*e,S 8&AM J. Dicrete Math, vol. 1<, No. 2, $$. 22H#22I,
2001.
9<: Nguyen Qim 8ach, RDigital image an* vi*eo
$roceingS, 8cience an* Technology 3u(liher, "ietnam,
1IIH, $$. 1H0#1H<.
9=: M.C. 6r, R7n generating the N#ary re!lecte* -ray co*e,S
&666 Tran. Com$uter, vol. 22, $$. H2I#H<1, 1I><.
9G: K. -il(ert, RA cu(e# !illing Hil(ert curve,S Math. &ntell. ,
vol. G, $$. H>#>1, 1I><.
9H: Matthe+ ,. 8;uire, R-ray co*e an* e!!icient generation
o! com(inatorial tructure,S Doctor thei, De$t. Com$uter
cience, North Carolina 8tate Univerity, 2001.
9>: %a!ael C. -on0ale0, %ichar* 6. Koo*, RDigital
image $roceingS, 3rentice Hall, 2002, $$ <2># <<0.
9I: Jone C. ,, R6!!icient co*ing ytem !or long ource
e;uence,S &666 Tran. &n!orm. Theory, vol. 2H, No. 2, $$.
2>0#2I1, 1I>1.
910: Dang Thanh Tin, "u Dinh Thanh, Nguyen Qim 8ach, RAn
im$rovement o! JoneU metho* o! lole *ata
com$reion,S "ietnam $ot an* telecommunication
.ournal, No. H, $$. G=#GI, May 2002.
911: ?e*eral in!ormation $roceing tar*ar* $u(lication 1IH,
RAnnouncing the A*vance* 6ncry$tion 8tar*ar*S, National
&ntitute o! 8tar*ar* an* Technology 'N&8T), Nov 2001.
912: Tin1u Acharya, 3ing#ing Tai, RJ36-2000 8tar*ar* !or
image com$reionS, Kiley, 200=.
912: Dang Thanh Tin, 8eiha1u Higuchi, RA lole co*ing
cheme !or image,S Me*ical &maging an* &n!ormation
cience .ournal, Ja$an, vol.1>, No. 2, $$. H=#>2, May 2001.
91<: Dang Thanh Tin, "u Dinh Thanh, Nguyen Qim 8ach,
8eiha1u Higuchi, RLole image com$reion +ith the
theory o! cro $oint region,S $reente* at <th &666 &nt.
Con!. Com$uter 8cience, %eearch, &nnovation an* "iion
!or the ?uture, Collection &n!ormati;ue &88N5 1G21#0>G=,
Hor 8erie &88N5 1G21#00G=, Hochiminh city, "ietnam, ?e(
200G, $$. 1I#2=.
<
3A%T 25 &NT6-6% D&8C%6T6 C78&N6 T%AN8?7%M


I. INTRODUCTION
The *icrete coine tran!orm 'DCT) ue the conce$t o! the
tran!orm co*ing that ha (et $er!ormance in image
com$reion an* !iltering !or image. The (loc1 i0e o! mot
a$$ro$riate are > or 1G !or the tran!orm co*ing o! the
image *ata. There!ore, im$lementation o! the or*er#> an*
#1G DCT ha !at com$uting time an* cot#e!!ectivene
!or reali0ation o! a tran!orm co*ing. Ho+ever, the
com$onent o! the (ai vector o! the DCT e4it
irrational num(er then cannot (e re*uce* to integer (y
im$le caling. There!ore, it i har* to im$lement an* uing
!loating $oint arithmetic i com$le4 an* e4$enive, o integer
*icrete coine tran!orm '&ntDCT) are $ro$oe* to
im$lement the DCT (y uing im$le integer arithmetic. 7n
the (ai o! theory o! *ya*ic ymmetry, tran!orm the or*er#
> an* or*er#1G coine tran!orm into a !amily o! integer
*icrete coine tran!orm '&ntDCT). &! the (etter
$er!ormance i *eman*e*, the large magnitu*e can (e ue*
!or the integer tran!orm.
&n thi econ* $art, +e *icu (rie!ly DCT tran!ormation
an* then ho+ to im$lement an* a$$ly &nteger DCT in lole
image com$reion.
II. DISCRETE COSINE TRANS'OR& +DCT,
The DCT ha long (een ue* a a metho* !or image co*ing
an* ha no+ (ecome the tan*ar* !or vi*eo co*ing . &t energy
com$action ca$a(ility ma1e it i*eal !or e!Vcient
re$reentation o! image. -iven a ;uare image (loc1 ? o! i0e
m (y m, an m (y m matri4 C i *eVne* (y the e;uation5
Ci.A
1
m
iA0 .A0..m#1
2 '2 1)
o
2
i 1
c i
n m
+
A1..m#1 .A0..m#1
Thu the DCT o! ? i *eVne* a !AC?C
T
'1)
The DCT i a unitary tran!orm,meaning that the inverion
an (e accom$lihe* (y ?AC
T
!C '2)
Un!ortunately, the DCT coe!Vcient, i.e., the entrie in !, are
evaluate* to inVnite $reciion. &n tra*itional co*ing metho*
(ae* on the DCT, all com$reion an* all loe are
*etermine* (y ;uanti0ation o! the DCT coe!Vcient. 6ven !or
lole image com$reion, thi $ro(lem cannot (e avoi*e*,
(ecaue toring the coe!Vcient to their !ull $reciion '+hich i
*etermine* (y the machine one i uing) +oul* not yiel* any
com$reion. Khat i $ro$oe* i to evaluate all entrie o! the
DCT matri4 out to only , *igit $at the *ecimal $oint. Thi
mean that the DCT coe!Vcient +ill have $reciion out to 2,
*igit $at the *ecimal $oint. A ma.or cone;uence o! thi
action i that the reulting DCT matri4 i no longer unitary,
an* the invere o! the DCT matri4 an* it tran$oe mut (e
evaluate* e4$licitly, i.e.,
?AC
#1
!'C
T
)
#1
'2)
2ig"re #. /ighest to lowest energy coef7cients.
7! coure, one mut chooe , uch that thee invere e4it.
?or intance, in the cae +here , i 1, i.e., the entrie o! C are
evaluate* to only one $lace (eyon* the *ecimal $oint, the
invere matri4 *oe not e4it in the > (y > $i4el (loc1 cae.
8ince the entire o$eration involve matri4 multi$lication, a
total o! 2m
2
multi$lication an* 2m
2
'm#1) a**ition are
re;uire* to evaluate all the entrie o! ' in '2).
7nce the DCT coe!Vcient have (een com$ute*, +e retain
only + high energy coe!Vcient to (e ue* !or the calculation
o! an a$$ro4imation to the original *ata matri4 ?. 7ne nee* to
chooe + uch that a *eire* amount o! energy com$action i
o(taine*. The high#energy coe!Vcient in general +ill a$$ear
in the ame location ini*e !/ e.g. the three highet#energy
coe!Vcient al+ay a$$ear in !00 , !01 , an* !11 , the u$$er#le!t
corner o! !. &n ?ig. 2, the high to lo+ energy coe!Vcient are
canne* !or an > (y > DCT (loc1. The remaining DCT
coe!Vcient are aume* to (e 0ero. Then the invere#DCT i
calculate* '+ithout auming unitarity) an* a reulting matri4
?n reult. ?rom thi, an error rei*ual matri4 6 can (e
*eVne*5
6i. A ?i. # ?ni. '<)
,y retaining E an* the + ;uanti0e* DCT coe!Vcient,
$er!ect recontruction o! ? can (e achieve*. A!ter electing
the high energy DCT coe!Vcient, +e $er!orm linear $re*
&ntDCTion on the non0ero DCT coe!Vcient (y uing a im$le
*i!!erencing cheme. ,et+een neigh(oring (loc1 there e4it
ome correlation (et+een the corre$on*ing high energy
coe!Vcient. A!ter $eci!ying + o! thee high energy
coe!Vcient, each o! thee coe!Vcient can (e enco*e* a the
error rei*ual reulting !rom u(tracting the corre$on*ing
DCT coe!Vcient !rom a neigh(oring (loc1/ in thi $a$er, the
(loc1 imme*iately to the le!t i choen, e4ce$t !or any o! the
le!tmot (loc1 in the image, +hich ue the (loc1 imme*iately
a(ove. A a reult, the high energy coe!Vcient are
*ecorrelate* (et+een (loc1, an* the overall Vrt#or*er
entro$y o! the reulting *ata i *ecreae*. &n a**ition, the
entro$y o! the entrie o! 6 are o! lo+er entro$y than the
original *ata matri4/ there!ore, a uita(le entro$y co*er can (e
ue*, uch a an a*a$tive Hu!!man co*er or an arithmetic
co*er.Moreover, ince +e are tranmitting error rei*ual, the
choice o! the $arameter ,, +hich *etermine the $reciion o!
the tranmitte* DCT coe!Vcient, (ecome le crucial, a
=
increaing , +ill reult in little *ecreae o! 6 in many cae.
?or intance, in the > (y > cae, e4$erimentation ho+e* that
, A 2 +a a*e;uate to achieve ma4imal com$reion 'a tate*
(e!ore, !or , A 1 the DCT matri4 invere *o not e4it in the >
(y > cae). The minimum choice o! , i
cae#*e$en*ent.
+-, Application of DCT in Image Compression
III. INTEER DCT
8everal verion o! the integer DCT have (een *evelo$e*.
The o(.ective i to im$lement the &NTDCT +ith integer
a**ition an* integer multi$lication '(it a** an* hi!t) an*
alo im$lementthe invere &NTDCT imilarly. A an e4am$le
everal '> 4 >) &NTDCT are lite* (elo+
#. Integer DCT .ia Lifting
To contruct &nteger DCT, the DCT 1ernel i *ecom$oe* into
-iven rotation via KalhFHa*amar* tran!orm. The KalhF
Ha*amar* tran!orm 'KHT) re;uire only a**ition
'u(traction) a all o! it element are 1 an* #1. The >#$oint
KHT matri4 i given (y5
A (it#reveral matri4 9+: i one +hich rearrange the in$ut
e;uence into the (it#reveral or*er.
Let B '0), '1), '2), '2), '<), '=), 'G), 'H)E
T
4 % % % % % % % %
then the $ro*uct
9 : B '0), '<), '2), 'G), '1), '=), '2), 'H)E
T
+ 4 % % % % % % % %
ha it entrie in (it#revere* or*er.
The DCT o! in$ut e;uence 4 i T A 9C:4, +here 9C: i the
DCT 1ernel. No+ let u normali0e 9H+: uch that
W
9 : 1J 9 :
w w
/ N / i an orthonormal matri4. Hence
1
W W
9 : 9 :
T
w w
/ /

. Then one can $rove that5


9 : 1J 9 :9 :9 :
w
+ 4 N T + / %
+here
W
9 : 9 :' 9 :)9 :
T
w
T + 4 / + i (loc1#*iagonal. &n term o!
the converion matri4 9T:, the DCT can (e *ecom$oe* a5
W
9 : 9 :9 :9 :
w
4 + T + / %
?or >#$oint in$ut e;uence, 9T: i given e4$licitly (y5
+here
22
co' J >) in' J >)
9 :
in' J >) co' J >)
8


1

]
an*
<<
co'HXJ1G) 0 0 #in'H J1G)
0 co'2XJ1G) #in'2XJ1G) 0
9 :
0 in'2XJ1G) co'2XJ1G) 0
in'HXJ1G) 0
8


0 co'HXJ1G)
0 #1 0 0 co'2XJ>) 0 #in'2XJ>) 0
0 0 0 1 0 co'2 J >) 0 #in'2
4 4
#1 0 0 0
0 0 #1 0

1
1
1
1
1
]
1
1
1
1
1
]
J >)
in'2 J >) 0 co'2 >J) 0
0 in'2 J >) 0 co'2 J >)



1
1
1
1
1
]
To o(tain &NTDCT, the li!ting !actori0ation o! -iven rotation
matri4 i ue*5
co 1 co 1
co #in 1 0 1 1
in in
in co in 1
0 1 0 1




1 1
1 1
1 1

1 1
1 1
] ]
] ]
T+o *itinct integer multi$ler an* are ue* to archieve
integer li!ting (y5
co 1
2 in
b
b

an* in
2
b
b


The !ollo+ing ta(le lit the multi$lier
b
an*
b
!or
(A1 # > an* variou rotation angle5
G
Thi !igure ho+ ho+ a -iven rotation i integer li!te*.
$. Integer DCT /0 the Principle of D0adic S0mmetr0
Another integer DCT can (e *evelo$e* (y re$lacing
tran!orm 1ernel com$onent o! the or*er#eight DCT (y a ne+
et o! num(er. ?or the or*er#eight DCT, many tran!orm o!
thi 1in* can (e o(taine*. ,oun*ary con*ition are a$$lie* to
enure that the ne+ tran!orm contain only integer, +hile
they till a$$ro4imate the DCT. A the magnitu*e o! thee
integer can (e very mall, the tran!orm can (e im$le to
im$lement.
Let the matri4 9T(: re$reent the 1ernel o! the eight#$oint
DCT. The !ollo+ing *ecri(e the te$ to convert the or*er#
eight DCT into integer DCT 1ernel.
&! the (ai ce4tor Jm 'mA0, 1,..., H) o! 9T%: are cale* (y
9Q:, all the (ai vactor can (e e4$ree* a the varia(le o! a,
(, c, *, e, ! an* g a !ollo+5
+here 9Q: A *iag '10, 11, ..., 1H) an* YY1mJmYY
2
A 1 'm A 0, 1, ...,
H).
?rom the !ollo+ing ta(le, the only con*ition to ma1e the
tran!orm 9T%: (e orthogonal i5 a( A ac D (* D c*

A there are < varia(le, there are an in!inite num(er o!
olution. Thu an in!inite num(er o! ne+ orthongonal
tran!orm can (e generate*.
?rom thee num(er +e can et u$ (oun*ary con*ition a
!ollo+ e4$ecting that the ne+ tran!orm a$$ro4imate the
DCT an* ha a goo* $er!ormance a the DCT5
a b c d an* e f
?urthermore to eliminate truncation error *ue to o$eration
o! irrational num(er the !ollo+ing con*ition ha to (e
ati!ie*5 a, (, c, *, e, !
Tran!orm that ati!y thee con*ition are re!erre* to a >#
$oint integer DCT. 7nce the varia(le o! 9J: are !i4e*, +e can
get the caling !actor that ma1e the ne+ tran!orm
orthonormal. Ke can get5
0 <
2 2 2 2
1 2 = H
2 2
2 G
1J '2 2 )
1J 2' )
1J '2 )
9 9 g
9 9 9 9 a b c d
9 9 e f

+ + +
'

A !at algorithm !or thi >#$oint &nteger DCT i ho+n in the


!ollo+ing.
+here $ A '( D c)J'2a) an* ; A 'a# *)J'2c)
Ta(le (elo+ ho+ the highet tran!orm e!!iciencie o!
the t+elve or*er#> &NTCT +hen a le than or e;ual to
2==. ?rom thi ta(le, +e can reali0e that the tran!orm
e!!iciencie o! all t+elve or*er#> &NTCT are higher than the
or*er#> DCT. Note that &CT'a, (, c, *, e, !, g).

T%AN8?7%M
6??&C&6NCZ
T%AN8?7%M
I0.221 &CT'220, 201, 12<, <G, 2, 1, 1)
I0.220 &CT'1H=, 1=2, 102, 2=, 2, 1, 1)
I0.21I &CT'120, 10=, H0, 2<, 2, 1, 1)
H
I0.21H &CT'1>=, 1G2, 10>, 2H, 2, 1, 1)
I0.21H &CT'2=0, 21I, 1<G, =0, 2, 1, 1)
I0.21= &CT'G=, =H, 2>, 12, 2, 1, 1)
I0.212 &CT'==, <>, 22, 11, 2, 1, 1)
I0.212 &CT'20=, 1>0, 120, <1, 2, 1, 1)
I0.212 &CT'1<0, 122, >2, 2>, 2, 1, 1)
I0.211 &CT'21=, 1>I, 12G, <2, 2, 1, 1)
I0.210 &CT'H=, GG, <<, 1=, 2, 1, 1)
I0.20> &CT'22=, 20H, 12>, <H, 2, 1, 1)
>I.>2G DCT
HH.1<0 Kalhtran!orm
&n thi $ro.ect, &NTDCT i ue* in image com$reion +ith
uing i*eal cro$oint region. The !ollo+ing cheme ho+
ho+ +e ue &NTDCT !or thi $ur$oe. Thi cheme i imilar
to the one +ith DCT.

8imilarly, +e have the cheme !or *ecom$reion5
I). LOSSLESS I&AE CO&PRESSION PRORA&
A!ter uing the &NTDCT tran!orm an* revere &NTDCT
tran!orm, +e al+ay o(taine* error. 8o, to com$re image
lolely, +e have an i*ea !or thi $ro.ect5 +e ave that error
matri4, (ecaue thee error are ;uite mall, o aving thi
matri4 +ill not ma1e the i0e o! out$ut !ile (ecome larger
much.
,y aving the error matri4 an* the matri4 a!ter &NTDCT
tran!ormation, an* then a$$lying the theory o! the i*eal
cro$oint region, +e get lole image com$reion
$rogram uing integer DCT.
+-, Compressing Process
+--, Decompressing Process
>
RE'ERENCES
91: -iri*har Man*yam, Nair Ahme*, Neera. Magotra,
RLole &mage Com$reion uing the Dicrete Coine
Tran!ormS, Journal o! "iual Communication an* &mage
%e$reentation, Article No. "CIH0222, 1IIH.
92: Chia#Hao Tai, R&nteger Coine Tran!orm '&CT)S,
National Tai+an Univerity, Tai$ei, Tai+an, %7C.
92: Q.%. %ao, D.N. Qim, J.J. H+ang, R ?at ?ourier
Tran!orm5 Algorithm an* A$$licationS, A$$en*i4 C5
&nteger Dicrete Coine Tran!orm '&NTDCT), $age 222 F
2<I, 8$ringer 8cience D ,uine Me*ia ,.", 2010.
9<: Tai0o 8u0u1i, Maaa1i &1ehara, R8tructurally %egular
&nteger Dicrete Coine Tran!orm !or Lo+#,it#Kor*#
Length Coe!!icientS, De$artment o! 6lectronic an*
6lectrical 6ngineering, Qeio Univerity, Zo1ohama,
Qanaga+a, Ja$an.
9=: Tai0o 8u0u1i, Hi*ea1i Hayano, Maaa1i &1ehara,
R%eali0ation o! &ntDCT +ith Ar(itrary ,loc1 8i0e Uing
%elation (et+een DCT#&" an* 3arallel ,loc1 8ytem o!
DCT#&&S, De$artment o! 6lectronic an* 6lectrical
6ngineering, Qeio Univerity, Zo1ohama, Qanaga+a, Ja$an.
9G: Chang.iang Kei, 3eng+ei Hao, Lingyun 8hi, R&nteger
DCT#(ae* &mage Co*ingS, National La( on Machine
3erce$tion, 3e1ing Univerity, ,ei.ing, China.
9H: Q.M. Cheung, ?. 3ollara, M. 8hahhahani, R&nteger
Coine Tran!orm !or &mage Com$reionS, TDA 3rogre
%e$ort <2#10=, May 1=, 1II1.
I
9>: M. Cota, Q. Tong, RA 8im$li!ie* &nteger Coine
Tran!orm an* &t A$$lication in &mage Com$reionS,
TDA 3rogre %e$ort <2#11I, Novem(er 1=, 1II<.
9I: 8.M. 8ri1antaiah, R3er!ormance analyi o! &nteger DCT
o! Di!!erent ,loc1 8i0eS, 66 =2=I Multime*ia 3roceing,
8e$tem(er 2>, 2010.
910: Zing#Jui Chen, 8oontorn 7raintana, Truong Nguyen,
R"i*eo Com$reion Uing &nteger DCTS, 6C6 De$t,
,oton Univerity, ,oton, MA 0221=, U8A.
10
3A%T 25 6T36%&M6NTAL %68ULT8 AND C7NCLU8&7N
#. Some images /efore and after compression
,e!ore Com$reion A!ter Com$reion
Lena.(m$
,e!ore Com$reion A!ter Com$reion
Chet.(m$
11
,e!ore Com$reion A!ter Com$reion
Man*rill.(m$
,e!ore Com$reion A!ter Com$reion
[el*a.(m$
12
,y com$arion the original image +ith the *ecom$ree*
image, +e *o not !in* any *i!!erence (et+een each $air o!
image. Thee are ome !igure o! teting#$rogram 5
D [el*a '2=G 4 2=G)
D Man*rill '=12 4 =12)
12
$. Ta/les of compression ratios
TA,L6 1. DATA C7M3%688&7N %AT&78 7? &D6AL C%78837&NT %6-&7N8 '&C%) AND TH6 3%7J6CT
&MA-6 8&[6
C7M3%688&7N %AT&7 CD
&C% 3%7J6CT
Chet 2=G 4 2=G 1.I<><2 5 1 2.1<H<1 5 1
Chet1 =12 4 <>0 2.0>1H< 5 1 2.2GG20 5 1
Chet2 =12 4 <>0 1.I>GG1 5 1 2.1>>12 5 1
Chet2 =12 4 <>0 2.<>G2I 5 1 2.HI==2 5 1
Chet< =12 4 <>0 2.0I2=1 5 1 2.<010I 5 1
Cou$le =12 4 =12 1.H1I<< 5 1 2.>=G<< 5 1
?rance GH2 4 <IG 2.>=G>2 5 1 2.>>G2< 5 1
?rog G21 4 <I> 2.<02=G 5 1 2.<1111 5 1
-irl H20 4 =HG 1.HG<<I 5 1 2.100=< 5 1
Joint =12 4 <00 2.2I1H1 5 1 2.IHI20 5 1
Lena =12 4 =12 1.H12<< 5 1 2.II2<H 5 1
Li(rary <G< 4 2=2 2.2G2>< 5 1 2.2H22H 5 1
Man*rill =12 4 =12 1.2H=>2 5 1 2.1<<>> 5 1
Moon 2=G 4 2=G 1.=<2H2 5 1 2.==>>I 5 1
Mountain G<0 4 <>0 2.<2>=0 5 1 2.<=2>0 5 1
[el*a 2=G 4 2=G 2.0=>HH 5 1 2.<02=I 5 1
TA,L6 2. 6NT&%6 &MA-6 C7M3%688&7N %AT&78 7? TH6 3%7J6CT AND K&N%A% # K&N[&3
&MA-6
8&[6
6NT&%6 &MA-6
C7M3%688&7N %AT&7 C6
K&N%A% K&N[&3 3%7J6CT
Chet 2=G 4 2=G 1.=H<=> 5 1 1.=2>22 5 1 1.<H=12 5 1
Chet1 =12 4 <>0 1.GIIIG 5 1 1.=0GI0 5 1 1.G21>< 5 1
Chet2 =12 4 <>0 1.<>==< 5 1 1.2<>=I 5 1 1.=221< 5 1
Chet2 =12 4 <>0 2.21GI2 5 1 1.==211 5 1 1.>2<I1 5 1
Chet< =12 4 <>0 1.H<201 5 1 1.2<=<2 5 1 1.G2>I2 5 1
Cou$le =12 4 =12 1.=I022 5 1 1.2I2<> 5 1 1.2G11G 5 1
?rance GH2 4 <IG 22.021H 5 1 20.GGGI 5 1 1.>2G02 5 1
?rog G21 4 <I> 2.12<>= 5 1 2.0H22< 5 1 1.1H22I 5 1
-irl H20 4 =HG 1.G0>02 5 1 1.2=HG= 5 1 1.<I2GI 5 1
Joint =12 4 <00 1.I2=>2 5 1 1.<=1IG 5 1 1.I0012 5 1
Lena =12 4 =12 1.=GH>< 5 1 1.1H2GI 5 1 1.<220> 5 1
Li(rary <G< 4 2=2 1.GI>I0 5 1 1.GG220 5 1 1.0>10G 5 1
Man*rill =12 4 =12 1.20G1= 5 1 1.1011< 5 1 1.0210< 5 1
Moon 2=G 4 2=G 1.2I1<< 51 1.20I1< 5 1 1.1H>I2 5 1
Mountain G<0 4 <>0 1.=2=<I 5 1 1.=0HII 5 1 1.1>HIH 5 1
[el*a 2=G 4 2=G 1.=1<1G 5 1 1.2HHGI 5 1 1.=I<22 5 1
1<
1. Concl2sion
Ta(le 1 ho+ that the *ata com$reion ratio CD o! thi
$ro.ect i much (etter than the $rogram +hich ue only the
i*eal cro $oint '&C%). Ho+ever, the entire image
com$reion ratio C6 o! thi $ro.ect i not a goo* a the
$rogram +hich ue only the &C%.
-enerally, the entire image o! the com$reion ratio o! thi
$ro.ect i not a goo* a +inrar (ut (etter than +in0i$, an* it
*e$en* on the image too much.
Thi $ro.ect ue the theory o! the &C%, o it a*vantage i
the a(ility to com$letely retore the original *ata +ith
relatively !at time. Though, the *e!ect i the time
conuming in the $roce o! cro $oint region an* region
$ace ma$ cro $oint !or *eco*ing. Thi one may (e !i4e*
(ecaue the $roceing $ee* o! com$uter ha gro+n, an*
the metho* o! creating ma$ cro $oint region +ill (e
o$timi0e* (y im$roving the +ay to !in* cro $oint region
in com$aring, !in*ing an* removing unneceary cro
$oint.
&n !uture, +e nee* reearch more to a$$ly +i*ely on
com$uter ytem in me*ical, commercial or in*utrial.
1=

You might also like