Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
4-1-1992
A Study of color image data compression
Vassilis Koutsogiannis
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
ritscholarworks@rit.edu.
Recommended Citation
School of Printing Management and Sciences
Rochester Institute of Technology
Rochester, New York
Certificate of Approval
Master's Thesis
This is to certify that the Master's Thesis of
Vassilis Koutsogiannis
With a major in Printing Technology
has been approved by the Thesis Committee as satisfactory
for the thesis requirement for the Master of Science degree
at the convocation of
April 1992
Thesis Committee:
Thesis Advisor:
Frank Cost
Graduate Program Coordinator: Joseph L. Noga
A
STUDY
OF
COLOR
IMAGE DATA COMPRESSION
By
Vassilis Koutsogiannis
A
thesis
submittedin
partialfulfillment
ofthe
requirements
for
the
degree
ofMaster
ofScience in
the
School
ofPrinting
Management
andSciences in
the
College
of
Graphic
Arts
andPhotography
ofthe
Rochester
Institute
ofTechnology
April 1992
Thesis Advisor: Professor Frank
Cost
Title of thesis: A Study of Color Image Data Compression.
I, Vassilios Koutsogiannis, preferred to be contacted each time a request for
reproduction is made. I can be reached at the following address:
18 Messinias st.
Halandri, Athens 15234
Greece
Phone: (301) 681-9980
Acknowledgements
This
researcher wouldlike
to thank
a number of people whohelped
mecomplete
this
Master
ofScience
degree.
First,
Dr.
Kiriakos
Stathakis,
my
professor at
the
Technical Institute
ofAthens
who supported mein my decision
to
attend and completemy
graduatestudy
atRochester Institute
ofTechnology.
Two
people whodeserve
a specialthanks
aremy
parents,
Mr. Thanasios
Koutsogiannis
andMs. Eleftheria
Koutsogianni,
who supported and encouragedme
during
the
yearsthat
I have
workedtowards
my
Master
ofScience
degree in
Printing
Technology.
I
wouldlike
to thank the Xerox
corporationfor
the
permissionthey
gaveto
do
an extensive search
in
the Xerox
corporationlibrary.
Finally,
the
candidate wouldlike
to thank
professorFrank
Cost
andProfessor
Chuck Layne for
their
support andhelp
in
completing
this
Thesis.
Table
of contentsTitle Page
Permission
to
Reproduce
Acknowledgements
Table
of contentsiv
List
ofFigures
vAbstract
viIntroduction
1
Background
1
Data
Compression
2
How
Data
Compression Works
3
The
problem5
Endnotes
6
Theoretical Bases
ofthe
Study
7
Lossy
Compression
andthe
JPEG
Standard
7
The Discrete
Cosine
Transformation
8
Quantization
11
The
Zig-Zag
Sequence
14
What
about color?15
Endnotes
17
Review
ofthe
Literature
19
Endnotes
22
Statement
ofthe
Problem
23
Hypothesis
24
Methodology
25
The Results
31
Endnotes
37
Recommendations
38
Bibliography
40
Appendix A:
Equipment
andMaterial
41
Equipment
42
Materials
42
Appendix B:
The Images
43
List
ofFigures
Figure
1
.A
Statistical
Model
with aHuffman Encode
3
Figure 2. JPEG
lossy
compression8
Figure
3.
The DCT
on ablock
of pixels11
Figure
4.
The
path ofthe
zig-zag
sequence14
Figure
5.
The
collecteddata
30
Abstract
The
space whichblack
and white or colorimages
requireto
be
storedintroduces
one ofthe
biggest
problemsin
the
field
ofGraphic
Arts.
A
solutionto
this
problemis
offeredthrough
the
use ofsoftware programsthat
compressthe
data
of a scannedimage.
Compressing
images
withoutany
consideration cancreate other problems.
These
problems arisebecause
eachimage has
adifferent
structure .It is
possibleto
classify images into
three
main categoriesusing
as a criterionthe
frequencies
the
images
contain.The first
category
includes
images
that
contain
high frequencies
-alot
ofdetail
andvery
small uniform areas.The
second
category includes images
withfewer
frequencies
-less detail
and
larger
uniform areas.
The
third
includes images
withlow frequencies
-just
a
few (or
no) details
andlarge
uniform areas.The
main goal ofthis
study
wasto
set compression ratio standardsaccording
to the
structure ofthe
images.
A
software programthat
does data
compressionwas used.
Three 35
mm slides were used as well.The
slideshave been
chosen
carefully
sothat the
maintopics
were composed offrequencies
in
distinct
ranges.All
ofthe
images
were scanned at300
pixels perinch.
Then
allof
the images
were compressed atthree
specific compression ratios(
5:1
,8:1
,and
14:1)
andthen
printed.Output
size was5x7
inches,
the
resolution was256
dpi,
andhalftones
were150
lines
perinch (LPI).
A group
offorty
people(twenty
professionals andtwenty
novices)
comparedthe
controlimage
(
non compressedimage)
with each ofthe
compressedimages.
The
Chi
squaretest
was usedto
analyzethe data.
The
resultsindicate
that
it
is
acceptableto
compressimages
withlow detail (like
the
image
Shaving
Material)
and mediumdetail (like
the
image Three
Amigos)
up
to fourteen to
one(14:1),
because any loss
ofdata is apparently
notdetectable
by
the
human
eye.On
the
otherhand,
images
which contain alot
ofdetail (like
the
image
Doll),
cannot
be
compressedusing
the
above(14:1)
compression ratio withoutany loss
ofinformation
being
detected.
However these
images
canbe
compressedup
to
8:1
, andany loss
ofdetail up
to this
compression ratio will notbe detected.
Chapter
1
Introduction
Background
Data
compressionis
mainly
usedin
communications.The
reasonfor
this
is
that
it is very
expensiveto transmit
information
through
a simpletelephone
line
(fax
machine
)
or a satellite.For
example,
if
someonehad
to transmit through
afax
machine a
200-dots-per-inch image
of an8
1/2
by
11
inch
sheet of paperwithout
compressing
the
image,
it
wouldfill
4MB
ofmemory
and would requireapproximately
onehour
to
transmit1Thus
away
to
compress allthese
data,
andmake
this
kind
of communicationless
expensive,
had
to
be found. As
the
use ofthe
computerbecame
commonin many
fields,
and asthe
amount ofdigital data
that
had
to
be
storedgrew, the
demand for data
compression appeared.The demand for data
compressionin
eachfield
of endeavoris different.
Some
professions can not affordto
loose any
ofthe
stored ortransmitted
data.
For
examplein the
medicalfield,
noloss
ofinformation
is
acceptable since asmall
loss
ofimage
detail
, or amissing letter from
adocument,
canbe
life
threatening1.
As
aresult, the
software programsthat
are usedin
the
medicalfield
can not compressdata
to
alarge degree.
This kind
ofdata
compressionis
called
LOSSLESS
compression.In
the
field
ofGraphic Arts
this
restrictiondoes
not exist.On
the
otherhand,
the
demand for
software programs which compressimages
to
a greatdegree
is
a concern.
Imagine
that
each color orgray
scaleimage
containsinformation
withmemory
sizeranging
from 400K
bytes
to
several megabytes.Having
so muchdata
that
needsto
be
storedbrought
about storage problems.The
solutionto
these
problemsis data
compression.Commercial
software exists whichdoes
data
compression andhas
been
usedby
peoplein
the
graphic arts.The
kind
ofcompression used
in
this
field is
calledLOSSY
compression.Data
Compression
The
technique
which reducesthe
amount ofdata
by
reducing
the
number ofbits
usedto
describe
a colorimage
or adocument,
that
is
to
be
stored ortransmitted, is
calleddata
compression.Another definition for data
compressionis:
"It is
atechnique
that takes
advantage ofthe
redundanciesin files
to turn
information into
codes and createfiles
that
are smallerthan the
original file".2Data
compressionis divided into
two
major groups:lossy
andlossless
compression.
Lossy
compressionhas
the
ability
to
effectlarge
amounts ofcompression,
in
exchangefor
loosing
someinformation.
It is
avery
effectivemechanism
in
the
graphic artswhen appliedto
graphicimages.
Lossless
compression can not compress
the
originaldata
alot,
because
the
input
anddatabase
or wordprocessing files.
How data
compression worksData
compression consists oftaking
a stream of symbols andtransforming
them
into
codes.Whenever
compressionis
being
done correctly
the
resultwillbe
a newfile
smallerthan the
original.Data
compressionis
a combination ofmodeling
and coding.The
softwarefirst
usesthe
modelto
accurately define
the
probabilities
that
each symbol willoccur andthen
uses a coderto
create anappropriate code
for
a specific symbolbased
onthe
probabilities3-Probabi
lities
iInput
j
Stream
Symbols
Model
1
Encoder
i
Codes
H
Output
Stream
rFigure
1.
A Statistical Model
with aHuffman
Encoder.
Data
compressionis
concernedwith redundancy.As
aresult,
it
entersinto
the
field
ofInformation Theory.
Redundant information in
a message uses extrabits
to
encode.By
getting
ridof such redundanciesit
is
possibleto
reducethe
size ofthe
message.Information
Theory
usesthe
notion ofEntropy
as a measurementmore
data
the
message contains.The entropy is
calculatedthrough
the
base
two
logarithm,
asfollows:
Number
ofbits
=-Log
base
2
(probability)
The entropy
of an entire messageis
the
sum ofthe
entropies ofthe individual
symbols
in
the
message.Entropy
deals
withdata
compressionin its
determination
ofhow
many
bits
ofdata
areactually
presentin
a message4.In
orderto
compressdata
researchershad
to
encode symbols withthe
samenumber of
bits
that the
symbols contain.For
example,
if
symbolsin
an alphabetcontain eight
bits,
then
they
shouldbe
encoded withexactly
eightbits.
But,
this
kind
ofcoding
was nothelping
progress.They
had
to
comeup
with some othersolution.
Huffman encoding is
one ofthe
first
techniques
which offeredthem this
opportunity.
In Huffman encoding
the
morefrequently
a symbolis
used, the
shorter
its
code.On
the
otherhand
the
moreinfrequent
the symbol, the
longer
the
code.For
example,
commonly
usedletters
such asa, e,
t,
might receivethree
bits,
whereletters
like
q, z,
j,
might receive eightbits5.
Previous
paragraphsdescribed
how the
encoder works.But
the
encoderis
not able
to
compressdata
if it does
nothave
a modelfeeding
it
with appropriatedata. Lossless
compression usestwo
different
types
of modeling: statistical ordictionary
compression.Statistical modeling
readsin
and encodes asingledictionary
modeling
uses a codeto
encode a stream ofsymbols6Lossy
compressiondiffers
from
lossless
compressionin that
it
accepts aslight
loss
ofdata in
exchangefor
ahigher level
of compression.This
type
ofcompression requires
two
passes.A
first,
high level
pass,
overthe
data
transforms the
data into
the
frequency
domain. Then data is
"smoothed"(rounding
offhigh
andlow
points).A loss
of signal occurs atthis
point.Finally
the
frequency
points are compressedusing
conventionallossless
techniques7Different
organizationsstudy
data
compression.The
onethat
has done
the
most complete work on
this subject,
is
the
Joint Photographic
Experts
Group
(JPEG). This group
has
established a compression standardfrequently
usedin
the
graphic arts.In
the
next chapterthe way
lossy
compression andthe
JPEG
method workare
described in
moredetail.
The
problemBy
scanning
several color orgray
scaleimages
larger than
afew
squareinches in
area,
it is
possibleto
fill
a100MB
hard drive in less
than
anhour1. The
only
solutionto this
storage problemis
the
use ofdata
compression.Blindly
using
the
software programsthat
exist will cause other problems such asloss
ofsome
data
that the
originalimage
contained,
possibly
rendering
the
reproductionunacceptable.
The
purpose ofthis
research wasto
solvethis
problemby
Endnotes
LSeiter,
Charles. The
Big
Squeeze
.MacWorld,
January
1991.
page128-135.2. More
Data
Less
Space
.MacWord,
November
1991
.Page 180
3.
Nelson,
Mark.The
Data Compression Book
.M & T
Publishing, Inc,
1991.
page
14
4.
Nelson,
Mark. The Data Compression Book
.M & T
Publishing,
Inc,
1991.
page
16
5.Seiter,
Charles.Tfre
Big
Scueeze
.MacWorld,
January
1991.
Pages 128
-135
6.
Nelson,
Mark. The
Data Compression Book
.M & T
Publishing, Inc,
1991
.page
20
7.
Nelson,
Mark. The Data Compression Book. M & T
Publishing, Inc,
1991.
Chapter
2
Theoretical Bases
ofthe
Study
Lossy
Compression
andthe
JPEG Standard
Graphic images have
an advantage over conventional computerdata
files.
They
canbe slightly
modified withoutany
effect onimage
quality.It is
possibleto
make changes
in
apixel,
andif
the
modificationhas been done
correctly, the
changes will go unnoticed.
Desktop
graphics use eightbits
to
define
a singlebit1.
During
the
pasttwo
decades,
a greatdeal
of emphasis was put oncompressing
animage
with minimum effect onimage
quality.Two
standardization
organizations, the International
Consultative Committee
onTelegraph
andTelephone
(CCITT)
andthe International
Standard Organization
(ISO),
have
workedtogether
onthe
subject ofdata
compression.The
result wasthe
creation ofthe
Joint Photographic Experts
Group
(JPEG)2.
JPEG
worked onboth lossless
andlossy
compression.However,
the
mostinteresting
part ofthe
workJPEG did
wasthe
workonlossy
compressiontechniques.
The
specificationsthat this
group
compiled arethe
mostcommonly
used
today.
This
researcher adheredto those
specificationsfor
the
purpose of8
JPEG
created a compressor ableto
compress acontinuoustone image to
less
than10
percent ofits
original size.This is
possiblebecause the
JPEG
lossy
compression algorithm operates
in
three
successive stages.DCT
Transformation
iitosjas*i:S*j*a
Coefficient
Quantization
SSBSBSED
Lossless
Compression
ESZ
Figure
2.
JPEG
lossy
compressionThe Discrete
Cosine
Transformation
As it is
shownin
figure 2
atthe
first step
ofthe
JPEG
lossy
compressiontechnique the
key
is
a mathematical transformationknown
asthe
Discrete
Cosine
Transformation (DCT).
The DCT
takes
a set of pointsfrom
the
spatialdomain
andtransforms
theminto
anidentical
representationin
the
frequency
domain.
The DCT
can operatefor
two
orfor three dimensional
signals3.When
the
DCT
operates on athree dimensional signal, the
signalis
plotted on aX, Y,
Z
axis.The
three dimensional
signal represents acertain point of a graphicalimage;
wherethe
X
andY
axes arethe
two
dimensions
ofthe screen,
andthe
Z
axis
is
the
colorat a specificX,Y
coordinate.This
is
the
spatial representation ofthe
signal.The DCT
canbe
usedto
convert spatialinformation
into
"frequency"
different
dimensions. There is
also anInverse
Discrete
Cosine
Transform
(IDCT)
function
that
convertsthe
frequency
information
ofthe
signalback
to
spatialinformation.
The DCT transformation
formula
is
the
following:
N-1
N-1
x=0 y=0
C(X)=
1/2 if
xis
0,
else1
if
x>0
N-1
N-1
-(urs^E
Z^W.cos
[<^]cos
[]
In
the
following
table
we givethe
formula for
the
IDCT.
N-1
N-1
Pixel(x,y)=^
c(i)
CfljDCTdjjCOS
I
mm*
I
COS
I
l
x=0 y=0
C(X)=
1/2
if
xis
0,
else1
if
x>0
Both
ofthe
abovetransformations
are performed on aN
xN
matrix of pixelvalues,
yielding
anN
xN
matrix offrequency
coefficients5.By
using
the
DCT formula JPEG
transforms the
pixelsto
frequency
coefficients,
having
the
same points asbefore.
The DCT
accomplishesthe
above when
it
transforms
data,
this
is
the
properway for
compressing
data. In
aN
-by-Nmatrix,
allthe
elementsin
row0 have
afrequency
component of zeroin
10
zero
in
the
otherdirection.
As
the
rows andthe
columns moveaway
from the
origin, the transformed
DCT
matrix representhigher
frequencies.
So,
the
component
found in
row and column0
(DC
component) carry
more usefulinformation
aboutthe
image
than those
in
other rows and columns.The DCT
transformation
choosesthe
pieces ofinformation
that
canbe
thrown
away
without
seriously affecting
image
quality6.By
examining
the
DCT
andIDCT
formulas
it is
clearthat the
calculationtime
needed
for
each elementdepends
uponthe
size ofthe
matrix.So,
asN
increases,
the
amount oftime
requiredto
process each elementin the DCT
output
array
will goup dramatically. As
a resultthe
amount of calculation neededto
perform aDCT
transformation
on a256-by-256 gray
scaleis
prohibitively
large. This is
the
reasonthat
DCT breaks
the
image
down
into
smallerblocks.
The
sizethat
JPEG
selectedfor
the
DCT
calculationsis
an8x8
matrix.This
type
of compression
is
referredto
as"block
coding"
7.
The
matrix position0,0,
(at
the
upperleft
corner ofthe
matrix) is
the
"DC
coefficient".
This
value represents an average ofthe
overall magnitude ofthe
input
matrix.As
the
elements movefarther from
the
DC
coefficient,
they
tend to
decrease in
magnitude.This
meansthat
onthe
output ofthe
DCT,
the
representation of
the
image is
concentrated atthe
upperleft
coefficients ofthe
11
the
DCT
matrix.An
example of aninput
and output8x8 DCT
matrixis
the
following:
Input Pixel
matrix140
144
147
140
140
155
179
175
144
152
140
147
140
148
167
179
152
155
136
167
163
162
152
172
168
145
156
160
152
155
136
160
162
148
156
148
140
136
147
162
147
167
140
155
155
140
136
162
136
156
123
167
162
144
140
147
148
155
136
155
152
147
147
136
Output
DCT
matrix186
-1815
-923
-9 -1419
21
-3426
-9 -1111
14
7
-10 -24 -2
6
-183
-20 -1-8 -5
14
-15 -8 -3 -38
-3
10
8
1
-1118
18
15
4
-2 -188
8
-41
-79
1
-34
-1 -7 -1 -20
-8 -22
1
4
-60
Figure 3. The DCT
on aBlock
ofPixels.
Quantization
As it is
shownin figure
2,
JPEG
performsthe
compressionin
three
steps.The
first step is
the
DCT
whichis
alossless
transformation andactually
takes
morespace
to
storethe
output matrixthanthe
original one.That
meansthat
in
this
stage
there
is
no compression8.The DCT
preparesfor
the
Lossy
or quantization stage ofthe
process.The input
to the
DCT function
is
an8x8
pixel values.In
the
output
the
values can rangefrom
alow
of -1,024to
ahigh
of +1,023,
occupying
12
storage of
the
DCT
matrix.The
processperformed atthis
stageis
called"Quantization".
As
Nelson
said:"Quantization
is
simply
the
process ofreducing
the
number ofbits
neededto
storean
integer
valueby
reducing
the
precision ofthe
integer".
After
the
DCT
image has
been
compressed,
it is
possibleto
further
reducethe
precision ofthe
coefficientsby
moving
away from
the
DC
coefficientpositioned at
the
origin.Thefarther
away
the
elements arefrom
the
DC
coefficient
the
less
the
elements contributeto the
graphicalimage,
the
less
JPEG
care aboutmaintaining
rigorous precisionin
their
values.The
JPEG
algorithmimplements
quantizationby
using
a quantization matrix.The
quantization matrix gives a quantum valuefor
each elementinto
the
DCT
matrix.
This
value can rangefrom
1 to
255,
andindicates
whatthe
step
sizewillbe for
the
elementin
the
compressed reduction.The
mostimportant
elementin
the
picturewillbe
encodedwith a smallsize,
sizeone,
offering
the
mostprecision.
All
these transformations take
place throughthe
following
formula:
DCT(i
D
Quantized Value
,; *= -= -Rounded
to
nearestinteger
l'>\)
Quantum
^ ^
As
there
is
aninverse DCT
function,
aninverse formula
existsfor
the
quantization
faction,
performedduring
decoding.
This is
the
following
formula
:DCT
(i,
j)
=Quantized
Value
13
There
aretwo
experimental approachesthat test different
quantizationschemes.
The
first
checksthe
mathematical errorbetween the
input
andthe
output
image
afterit has been
decompressed;
whilethe
secondtries to
determine
the
effect ofdecompression
onthe
human
eye,
which sometimesdoes
not correspondto the
mathematicaldifferences
in
errorlevels.
The
quantization matrix can
be
defined
during
runtime,
when compressiontakes
place.
That
gives usthe
opportunity
to
choosethe
matrix we will use, andfurthermore
the
compression ratio an operatorwill use."By
choosing
extraordinary
high step
sizesfor
mostDCT
coefficients,
we get excellentcompression ratios and poor
image
quality"10saysMark
Nelson.
The
Zig-Zag
Sequence
The final step
ofthe
JPEG
processis coding
the
quantizedimage. The JPEG
coding
phaseis
madethrough three
different
steps.The first step
changesthe
DC
coefficient at0,0
from
an absolute valueto
a relative value.After
that,
the
coefficients of
the
image
are arrangedin
the
"zig-zag
sequence".The
nextstep
is
to
encodethe
coefficientsusing
first
the
run-lengthencoding
andthen the
Entropy
coding11.One
reasonthe
JPEG
algorithmis
ableto
compress soeffectively
is
that
alarge
number of coefficientsin
the
DCT image
are reducedto
zero valuesin
the
coefficient quantization stage.
Since many
values are setto
zerothe
JPEG
14
values.
The
zero values are codedthrough the
Run-Length encoding
(RLE)
logarithm.
A
simple codeis
developed
that
gives a count ofconsecutive zerovalues
in the image.
As it is
mentionedpreviously,
alot
ofthe
coefficients arequantized
to
zeroin
many
images.
The
resultis
anoutstanding
compression12-A
graphical representation of
the
"zig-zag"sequence
is
given atthe
following
page.In
the
zig-zag
sequence,
the
JPEG
algorithm moves throughthe
block along
diagonal
paths,
selecting
what shouldbe
the
highest
valueelementsfirst,
andworking its way
toward the
valueslikely
to
be
lowest.
During
the
zig-zag
sequence
the
DCT block
willbe
reordered andthe
JPEG
algorithm will outputthe
elementsusing
an"entropy
encoding"
mechanism.
The
outputhas RLE built
into it. The
output ofthe
entropy
encoder consist of a sequence ofthree
tokens,
repeated until
the
block is
complete.The
three tokens
look like
this:Run Length:
The
number of consecutive zerosthat
precededthe
currentelement
in the
DCT
output matrix.Bit Count:
The
number ofbits
to
follow
in the
amplitude number.Amplitude:
The
amplitude ofthe DCT
coefficient.At
this point, the
coding
sequence usedis
a combination ofHuffman
codesand variable-length
integer
coding.The
run-length andbit
count values arecombined
to
form
aHuffman
codethat
is
output.The bit
count refersto the
15
0.0
?
0.2
EL3
0.4
[15
0.6
CK7
7
1.1/
Yj/
1.3/
1.4/
1.5/
1.6V 1.7
!V
l/
2.2/
2.3/ 2.4/
2.5y*2.6>
2W
3.0V
3.1/
3.2>
3.3/13.4/
3.5> 3.6/ 3.7
4^/ 4.1
V
4.2/
4.3/
4.4/
4.5> 4.6>
4W
5.uV
5.1/ 5.2/
^.3/
^5.4>
s.sv
5.6/
5.7
6T^
6.1> 6.2y
'.3/
6.4> 6.5>
6.6/*6W
7.0V 7
1/
7.2V
73/
7.4
V
75> 7.6V
77
Figure
4.
The
path ofthe
zig-zag
sequence.What
about color?To
this point,
how
to
compressimages
that
have only
one color(
agray
scale) has been described.
The
question nowis
whatdoes
onedo
with animage
that
contains morethan
one color.Color images generally
containthree
components.Red,
green,
andblue.
JPEG
treats
eachimage
asif
it
werethree
separateimages.
That
meansthat
animage
which contains morethan
onecolor,
wouldfirst
have
the
red componentcompressed.
The
commercial software wouldfollow
the
proceduredescribed
16
componentwill
be
compressed.Finally,
always throughthe
above procedurethe
Endnotes
1
.Nelson,
Mark. The Data Compression Book
.
M & T
Publishing,
Inc
1991
.pages
349-350.
2.
Nelson,
Mark.
The
Data Compression Book
.M & T
Publishing,
Inc
1991
.pages
353.
3.
Nelson,
Mark. The Data Compression Book
.M & T
Publishing,
Inc
1991
.pages
354-355.
4.
Nelson,
Mark. 777e Dafa Compression Book
.M
&
T
Publishing,
Inc
1991
.pages
356-357.
5.
Nelson,
Mark. The Data Compression Book
.M & T
Publishing,
Inc
1991
.pages
357.
6.
Nelson,
Mark. The Data Compression Book
.M & T
Publishing,
Inc
1991
.pages
359.
7
Nelson,
Mark. The Data Compression Book
.M & T
Publishing,
Inc 1991
.pages
360.
8.
Nelson,
Mark.
The Data
Compression Book
.M & T
Publishing,
Inc
1991.
pages
363-364.
9.
Nelson,
Mark.
The
Data Compression
Book
.M
&
T
Publishing,
Inc
1991
.18
1991.
pages364-366.
10.
Nelson,
Mark. The Data Compression
Book
.M
& T
Publishing,
Inc
1991
.page
366.
11
.Nelson,
Mark. The Data
Compression Book
.
M & T
Publishing,
Inc
1991
.page
369.
12.
Nelson,
Mark. The Data
Compression
Book
.M & T
Publishing,
In
1991
.pages
369-370.
13.
Nelson,
Mark. The
Data
Compression Book
.M
& T
Publishing,
Inc
1991
.Chapter
3
Review
ofthe
Literature
The demand
for
data
compressionin
the
field
of graphic arts was createdonly
afew
years ago.The
resultis
that
very little literature
specificto the
graphicarts exists on
this topic.
On
the
otherhand
someliterature does
existsin
the
computer science
field. This
researchermainly focused
on magazines articles.The
main goal wasto
compare commercial software productsthat
do
compression and give some
brief
explanations aboutJPEG.
As it is discussed in
MacWorld1 "a singleAdobe
Photoshop
document
caneat
up
adozen
megabytes ofdisk
space.To
deal
withthe
needto
squeeze evermore
data
ontotape,
tape
drive
manufactures areturning
to
data
compression".From
this
statementit becomes
clearthat the
storage spacethat
ahard drive
provides
is
not enoughto
store morethan afew
images
withoutcompressing
them.
As
Charles
Seiter
says " each charactercanbe
represented as anASCII
byte,
and eachbyte
takes
8 bits
of spacein
the
file"2.
If
someone stores afile
formed
from
characters withthe
abovecharacteristics,
he
willvery
soondiscover
20
he is running
out of space."
Huffman
encoding
the
simplest compressionscheme,
uses avery
straightforward principle: replace symbols with codes of
varying
lengths. The
more
frequently
a symbolis
used, the
sorterits
code"3 saysSeiter
Other
methods existbut
the
one whichis
the
most effectiveis
the
onethat
JPEG introduced.
"You may
not considerit
before,
but
the
obiquitousfax
machineis based
onimage
compression"4.In this area, the
needfor data
compression occurred alot
of years ago
because
every
transmition
is very
expensive.Researchers had
to
decrease
the time that
afile
needsto
be
transmitted through
a simpletelephone
machine or a satellite.
Today
this
problem also existsin the
graphic artsfield
asdesktop
publishing
becomes
increasingly
popular.One
ofthe
commercial software productsthat
does data
compressionis
Colorsqueeze from Kodak.
"
The Colorsqueeze is
the
easiest productto
usefor
colorimage
compression.
Using
the Kodak implementation
ofJPEG,
you canspecify
one of
three
compressionlevels
-high,
medium,
or normal-for 24 bit
PICT
orTIFF
sourcefiles"5.
Seiter
suggeststhat
this
softwareis very
effective andthat
it is
almostimpossible
to
detect any kind
ofdifference between
"the
original and a versionthat
has
been
compressed andthen decompressed"6 when a operator usesthe
normal or medium compression
level that the
software offers.On
the
otherhand
21
is
the
commercial software productthat
is
usedfor
the
purposes ofthis
study.On
the
otherhand,
Bruce
Fraser in his
articlein Publish
magazine, suggestthat
Colorsqueeze
is
an old programthat
is
beginning
to
showits
age.Also,
he
adds
the
following:
"...,
the
software-only
compressionis
quite slow and uses aproprietary file
format, KIC,
that
is
recognizedonly
by
Colorsqueeze. The
program offersthree
levels
ofcompression,
all ofwhichfall in
the
usefulrange,
but
the
resulting
images
tended to
look
washed out comparedto those
from
otherproducts.Colorsqueeze includes
adecompression utility
that
canbe
freely
distributed
along
withthe
images
but lack
a plug-infor Photoshop. For
casual use,it
getsthe
job
done,
but better
alternatives are available"7.Colorsqueeze
along
with other commercial softwareis based
onthe
JPEG
standard.
As Bruce Fraser
says"the final draft
ofthe
JPEG
standardis
nowin
circulation
to the
member nations andis
expectedto
be
ratifiedlater
this
Endnotes
1
.More
Data Less
Space
.MacWord,
November
1991
.Page 180
2.Seiter,
Charles. The
Big
Squeeze
.MacWorld,
January
1991.
page128-135.3.
Seiter,
Charles. The
Big
Squeeze
.MacWorld,
January
1991.
page128-135.4.
Seiter,
Charles. The
Big
Squeeze
.MacWorld,
January
1991.
page128-135.5.
Seiter,
Charles. The
Big
Squeeze
.MacWorld,
January
1991.
page128-135.6.
Seiter,
Charles. The
Big
Squeeze
MacWorld,
January
1 991
. pagel28-1
35.
7.
Fraser,
Bruce. JPEG
products cutMac files
down to
size.Publish,
April 1992.
pages
60
-63.
8.
Faser,
Bruce.
Scan handlers
.Publish,
April
1992.
pages60
-63.
Chapter
4
Statement
ofthe
Problem
One
ofthe
main problems created when animage has
to
be
storedis
storagespace.
This
problemis
amplifiedwhenthe
image
contains color.The
solutionto
the
problemis
the
use of softwarethat
compressesdata. This
technique
solvesthe problem,
but
compressing
the
images
causes aloss
ofinformation.
This
study
looked
at waysin
whichit is
possibleto
compress animage
andloose
information
that
will not affectthe
quality
ofthe
reproduction.The
objectives ofthis
study
were:1
.To
provethat
image
contentwilldetermine
the
optimum amountof
data
compressionthat
canbe
appliedto
animage
withoutbeing
detected
by
ahuman
observer;
and2. To
make recommendationsfor
additional studies ondata
compression related
to the
field
of graphic arts.24
Hypothesis
If
images
ofvarying detail from low
to
high
are compressedusing the JPEG
standard
method, the
amount ofdata
compressionthat
canbe
appliedto
anChapter
5
Methodology
This
chapterdescribes
how
the
researcherdesigned
the
study
andcollected
the
data.
Three images
werecarefully
chosenfor this
study.Those
images
were(see
appendixB):
First
image:
Shaving
materials.This image belongs
to the
first
category;
it
containslow
frequencies
-just
afew
or nodetail
andlarge
uniform areas.Second
image: Three
amigos.This image belongs
to the
secondcategory;
it
contains morefrequencies
-more
detail
and smaller uniform areas.Third
image:
Doll.
This image belongs
to the third category;
it
containshigh
frequencies
-alot
ofdetail
andvery
small uniform areas.The
three
images
were35
mmtransparencies.All images
werescanned onthe
Nicon
scanner1using
Photoshop
2.0
software1.They
were savedin
aTIFF
format.
1.SeeappendixAforacompletelistof equipmentand materialsusedinthis thesis
26
The
sizeof each scannedimage
was5x7
inches;
the
resolution was256
pixel per
inch.
These files
were stored on aSyQuest
removable cartridge(7.1
MB
required perimage).
The
nextstep
wasto
recallthe
data
using
the
Colorsqueeze
software.This
software compresses color
images
in
aRGB
modeusing
the
JPEG
standards.The
softwareis limited
to
compressing
images in
aformat
otherthan
KIC
(Kodak
Image Compression). Thus
eachimage had
to
be
convertedto
KIC format in
order
to
be
compressed.One
ofthree
compressionlevels
offeredby
the
software was chosen.The
three
levels
are:high,
medium,
and normal(low)
compression.The
researcher'sobjective was
to
compress each ofthe
images
in 5:1
,10:1
, and20:1
compression ratio.
Unfortunately
the
Colorsqeeze
softwareonly
allows5:1,
8:1,
and
14:1
compressing
ratios.Using
these three ratios,
eachimage
wascompressed.The
resultsfor
each picture and
corresponding
compression ratios were:Shaving: Original
file
size:7.1
MB.
Normal
compression:Original file
reducedby:
94%
Compressed file
size:465K
Medium
compression:Original file
reducedby: 96%
Compressed file
size:306K
High
compression:Original
file
reducedby:
98%
27
Three Amigos:
Original
file
size:7.1 MB.
Normal
compression.Original
file
reducedby:
94%
Compressed
file
size:491
K
Medium
compression:Original
file
reducedby:
96%
Compressed
file
size:323K
High
compression:Original
file
reducedby: 98%
Compressed
file
size:157K
Doll:
Original
file
size:7.1
MB.
Normal
compression.Original file
reducedby:
92%
Compressed
file
size:71 4K
Medium
compression:Original file
reducedby: 94%
Compressed
file
size:482K
High
compression:Original file
reducedby:
96%
Compressed file
size:21 3K
Each
compression processtookapproximately
seven minutesto
complete.The
nextstep
wasto
decompress
the images.
The decompression
processtook
about six minutes
for
each ofthe files.
After
the
images
weredecompressed,
the
researcher
had
to
resize thembecause
during
the
compression-decompression
stage theirsize changed.
After
that,
he
changedthe
format
from
KIC
to
TIFF.
The
size ofthe decompressed
files
wasthe
same asthe
file
that
containedthe
data
ofthe
controlimage.
To
convertthe
image format
Photoshop
2.0
software28
Using
the
same softwarethe
researcherchangedthe
modein
whichthe
images
were.Thus
the
mode was changedfrom RGB
to
CMYK. This
changeallows separations
to
be
made.After
the
mode changedthe
file's
size grewfrom 7.1 MB to
9.3 MB. That
happened because
eachtime
a particular pixel wasdescribed,
using three
bits
from
the
RGB
mode nowin
the
CMYK
mode, the
same pixel wasdescribed
using four bits. At
this
pointthe
images
werein
aTIFF format
andCMYK
mode.The
above were performedon aMacintosh
llsi2 and aMacintosh
CX2(on
whicha
44
SyQuest2external
hard
drive
was connected).The
nextstep
wasto
do
the
separations.The hardware
usedhere
was aMacintosh CX
with a44
MB
SyQuest
externalhard drive
andthe
Agfa 9600S
imagesetter2.
The
output wasfour
5x7 inch
positivefilms
for
each one ofthe
images. The
screenruling
selected was150
lines
perinch. After
the
images
were on
film,
Dupont
Chromalin
proofs were made.At
this
pointthe
researcherhad four
proofsfor
each ofthe three
images.
One
ofthe
four
proofs wasthe
controlimage,
which was uncompressed.The
other
three
werethe
5:1,
8:1,
and14:1
compressedimages.
As
a resultthere
were
two
groups ofimages:
the
controlgroup
(uncompressed
image),
andthe
experimental
group (compressed
image).
Three
comparisons were made.One
wasthe 5:1
compressedimage
with29
the
controlimage;
the
second wasthe
8:1
compressedimage
withthe
controlimage;
andthe third
wasthe
14:1
compressedimage
withthe
controlimage.
The
evaluation
for
each pair ofimages
was madeby
agroup
offorty
people.This group
wasdivided
into
two
smaller groups oftwenty
people.The
first
group
was madeup
of professional people relatedto the
graphic arts area(graduate
students andfaculty
members),
whilethe
secondgroup
was madewith
randomly
selected people who are not relatedto this
area.All
observers were askedto
comparethe
images
under a5000K light
source.
Another
requirement wasto
have
observations madebetween 15
and20
inches
from
the
images.
During
the time the
observers viewed each pair ofimages
they
were askedthe
following
question:"which image do
youprefer."
In
case an observerdid
nothave
apreference,
she/he wasforced
to
choose one ofthe images.
The
observers were exposed
to the
same pair ofimages
twice,
to
checkfor
consistency
of responsesby
each observer.The
observers wereviewing
eachtime
a pair ofimages from
adifferent category
ofimage.
The
following
figure displays
the
results ofthe test.
0-|
,O2,
O3
representthe
controlimage
eachtime
the
observers were comparedit
with one ofthe
compressed
images.
T-|
,T2
representthe two times
each pairofimages
wasviewed
to the
observer.The
collecteddata
were analyzedusing
the
Chi Square
test.
The
results are30
Shaving
Material
NOVICE
PROFESSIONALS
0]
5:1
02
8:1
03
14:1
01
5:1
02
8:1
03
14:1
T]
11
9
12
8
13
7
11
9
8
12
12
8
T2
n
9
12
8
11
9
12
8
8
12
13
7
Three Amigos
NOVICE
PROFESSIONALS
Ol
5:1
02
8:1
3
14:1
Ol
5:1
02
8:1
03
14:1
Ti
10
10
13
7
12
8
8
12
9
11
12
8
T2
11
9
12
8
12
8
10
10
11
9
13
7
Doll
NOVICE
PROFESSIONALS
Ol
5:1
02
8:1
03
14:1
Ot
5:1
o2
8:1
03
14:1
T!
12
8
14
6
14
6
9
11
13
7
18
2
T2
14
6
13
7
14
6
9
11
10
10
18
2
Chapter
6
Results
In
this
study
the
hypothesis
is
statedin
nullform (there
willbe
no preferencefor
alltype
ofimages). The
researchertested this
hypothesis
withthe
Chi-square
statistic at an alpha
level
of0.051. Each
comparison was examined separately.In
each chart
below
the
numbersin
parentheses arethe
expectedvalues,
wherethe
others arethe
sum ofthe
first
and secondtime the
observerslooked
at eachpair of
images. There is
onedegree
offreedom
in
each comparison.Shaving
materials(
pair0-,
-5:1).
Oi
5
:1Novice
22
(22.5)
18(17.5)
Pro.
23
(22.5)
17(17.5)
The
calculated chi-square valueis
x2=0.050. The
criticalchi-square valuefor
one
degree
offreedom
is
x2o.os,i
-3.841
.
Since
the
computed chi-squarevalueis less
than the
critical chi-squarevalue, the
hypothesis
is
accepted.Thus
no32
preference
is
indicated
for
control versus5:1
compressedimage.
Shaving
materials(
pair02
-8:1)
o2
8:1
Novice
24
(20)
16(20)
Pro.
16(20)
24
(20)
The
computed chi-square valueis
x2=3.200. The
critical chi-square valuefor
this pair,
for
onedegree
offreedom,
is
x20.05,i=3.841.Since
the
computedchi-squarevalue
is
less
than the
critical chi-squarevalue, the
hypothesis is
accepted.
Thus
no preferenceis
indicated
for
control versus8:1
(02
-8:1)
compressed
image.
Shaving
materials(
pair03
-14:1)
Os
14
:1Novice
24(24.5)
16
(15.5)
Pro.
25
(24.5)
15
(15.5)
For
the third
pair ofimages
for the
image
Shaving
material, the
computedchi-square
is
x2=0.052.
The
criticalchi-squareis
x2o.os,i=3-841
.Sincethe
computedchi-square value
is
less
than
the
critical chi-squarevalue, the
hypothesis is
accepted.
Thus
no preferenceis indicated
for
control versus14:1
compressedimage.
33
Three
Amigos
(
pairO^
-5:1).
o,
5
:1Novice
21
(19.5)
19(20.5)
Pro.
18(19.5)
22
(20.5)
The
computed chi-squarefor
this
pairis
x2=0.448. The
critical chi-squarefor
one
degree
offreedom
is
x2o.o5,i=3.841
.
Since
the
computed chi-square valueis
less
than the
critical chi-squarevalue, the
hypothesis
is
accepted.Thus
nopreference
is
indicated
for
control versus5:1
compressedimage.
Three Amigos
(
pair02
-8:1).
0,
8:1
Novice
25
(22.5)
15(17.5)
Pro.
20
(22.5)
20(17.5)
The
two
chi-square valuesfor
this
pair arethe
following:
x2=1
-268, and
X2o.05,i=
3.841
.Since
the
computed chi-square valueis less
than the
criticalchi-square
value, the
hypothesis
is
accepted.Thus
no preferenceis
indicated
for
control versus
8:1
compressedimage.
On
the
following
pagethe
data for
the third
pairofthe
image
Three Amigos
is
given.
The
computed chi-square, x2=0.052,
is less
than the
criticalvalue,
chi-34
square
value, the
hypothesis
is
accepted.Thus
no preferenceis indicated
for
control versus
14:1
compressed
image.
Three Amigos
(
pair03
-14:1).
Os
14
:1Novice
24
(24.5)
16
(15.5)
Pro.
25
(24.5)
15(15.5)
In
the
following
paragraphsthe
calculationsfor
the third
image
(Doll)
aregiven.
Doll (pair
O^
-51).Ot
5
:1Novice
26
(22)
14(18)
Pro.
18
(22)
22
(18)
The
computed chi-squareis
equalto
3.230. On
the
otherhand
the
criticalis
equal
to 3.841.
Since
the
computed chi-square valueis less
than the
criticalchi-squarevalue,
the
hypothesis
is
accepted.Thus
no preferenceis
indicated
for
control versus
5:1
compressedimage.
For
the
pair ofimages 02-8:1
the
resultfrom the
calculationsfor
the
computed chi-square
is:
x2=0.266.
The
critical chi-squarefor
onedegree
of35
chi-squarevalue
is
equalto
or greaterthan the
criticalvalue.Since
this
is
notthe
case
in this study, the
nullhypothesis
is
accepted.Thus
no preferenceis
indicated.
Doll (pair
02-8:1).
Oz
8:1
Novice
27(25)
13
(15)
Pro.
23
(25)
17(15)
Doll (pair
02-14:1).
O3
14
:1Novice
28(32)
12(8)
Pro.
36
(32)
4(8)
This is
the
collecteddata for
the
last
pair ofimages.
The
computed valueis
X2=
5.000,
andthe
critical valueis
x2o.05,i=3-841.Since
the
computed chi-squarevalue
is
greaterthanthe
critical value,the hypothesis
is
rejected.That
meansthat
there
is
a preference:The
observers preferredthe
controlimage
whenthey
compare
it
withthe 14
:1 compressedimage.
The
goal ofthis
study
wasto
examineif
it is
acceptableto
compress various36
Colorsqueeze
from
Kodak.
In this
study
the
hypothesis
which was statedin
a nullform
is
the
following:
"If images
ofvarying detail from
low
to
high
are compressed
using
the
JPEG
standard
method,
the
amountofdata
compression
that
canbe
appliedto
animage
withoutbeing
detected
by
ahuman
observerwillbe
the
samein
allcases."
By
examining
the
resultthat the
chi-squaretest gave,
it is
clearthat the
alternative
hypothesis
is
rejected andthe
nullhypothesis
is
acceptedfor
allbut
one
image
pairs.In
most cases neitherthe
eye ofthe
experts northe
eye ofthe
novice participants coulddetect
any
deference
between
the
control andcompressed
images. From
these results, the
following
observationis
made.It
is
acceptableto
compressimages
withlow detail (like
the
image
Shaving
Material)
and mediumdetail (like
the
image Three
Amigos)
fourteen
to
one(14:1),
because any loss
ofdata is apparently
notdetectable
by
the
human
eye.On
the
otherhand,
images
which contain alot
ofdetail (like
the
image
Doll),
can notbe
compressedusing
the
above(14:1)
compression ratio withoutany loss
ofinformation
being
detected,
because
the
chi-squaretest
showsthat the
observers preferred
the
controlimage
whenthey
comparedit
withthe
Endnotes
1
.Dowdy,
Shirley
andWearden,
Stanley. Statistics for
Research
.John
Wiley
&
Sons,
Inc.
Canada
1991
. page551
.Chapter
7
Recommendations
There
are a number of othertests that
canbe
performedto
examinethe
effect of compression on color
images. The first
recommendationis
to
repeatthe
same
test
using higher
compression ratios.From
the
results ofthis
study it is
clear
that the 14:1
compression ratio used asthe
highest
compression ratiodid
not make
any
significant changesto the
compressedimages
withthe
exceptionof
the
image Doll. Maybe
the
use ofhigher
ratios would produce significantdifferences.
For images in
the third
category
the
maximum compression ratiofalls
somewherebetween
eight(8:1)
andfourteen
(14:1),
but it is
notknown
exactly
where.Another
similartest
couldtake
place afterthe
researcherperforms colorcorrection
to
the
images
that
she/hewill use.There is
apossibility
that
some ofthe observers chose one of
the images
whenthey
were askedto
do
so,
because
they
were ableto
identify
some colordifferences from the
controlimage
to the
compressed one.
Therefore,
it
wouldbe
interesting
to
seein
a similar project39
how
people respondif
any
changesto
color appearedfrom the
color correctedcontrol
image to the
compressedimage.
Finally,
there
is
alwaysthe
possibility
ofdoing
something
similarbut
instead
of
asking
"which
image
do
youprefer",
askother questions.Those
questionscan
be
morespecific,
like: "which image do
you thinkhas
the
mostdetail" or
"
which
image
contains moreinformation".
Another
study
canbe designed
in
sucha
way
that the
researcher would ask morethan
one question at atime.For
example she/he can ask:
a.
Which
image has
moredetail?
b.
In
whichimage
do
you preferthe
colors?c.
Which
image has
better
contrast?