Sie sind auf Seite 1von 69

IMAGE COMPRESSION USING DISCRETE WAVELET AND DISCRETE COSINE TRANSFORM A Project Report Submitted i p!rti!

" #u"#i"me t o# t$e re%uireme t& #or t$e A'!rd o# t$e de(ree O# )AC*ELOR OF ENGINEERING I ELECTRONICS + COMMUNICATIONS ENGINEERING ), A-SU.ANA A-MAD*AVA REDD/ N-0RIS*NA C*AIT*AN/A A-0ART*I0 U der t$e E&teemed Guid! ce o# T-*/MA LA0S*MI -1E ((-23MISTE3MIETE Pro#- o# E-C-E Dept-

Dep!rtme t o# E"ectro ic& + Commu ic!tio & E (i eeri ( SR0R ENGINEERING COLLEGE3 )*IMAVARAM 1Reco( i&ed b, A-I-C-T-E2 A##i"i!ted to AND*RA UNIVERSIT/ 14556745852

CERTIFICATE OF EXAMINATION

T$i& i& to certi#, t$!t I $!9e e:!mi ed t$e t$e&i& ! d $ere b, !ccord !ppro9!" o# it !& ! &tud, c!rried out ! d pre&e ted i ! m! er re%uired #or it& !ccept! ce i p!rti!" #u"#i""me t o# de(ree o# )!c$e"or o# E (i eeri ( #or '$ic$ it $!& bee &ubmittedT$i& !ppro9!" doe& ot ece&&!ri", e dor&e or !ccept& e9er, &t!teme t m!de3 opi io & e:pre&&ed or co c"u&io & dr!' !& record i t$e report3 it o ", &i( i#ie& t$e !ccept! ce o# t$e report #or t$e purpo&e #or '$ic$ it i& &ubmitted-

EXTERNAL INTERNAL EXAMINER

EXAMINER

ACKNOWLEDGEMENT We !re mo&t &i cere ! d (r!te#u" to t$i& &! ctum S-R-0-R ENGINEERING COLLEGE ! d e:pre&& our $e!rt#e"t t$! ;& to pri cip!" Dr-D-RANGARA.U3 #or (i9i ( u& t$i& opportu it, #or t$e &ucce&&#u" comp"etio o# t$i& de(reeWe e:pre&& our pro#ou d (r!titude to our project (uide Pro#-T-*/MA LA0S*MI3 #or $i& 9!"u!b"e

(uid! ce ! d e cour!(eme t t$rou($out t$i& project3 '$ic$ e !b"ed u& to comp"ete our project &ucce&&#u"", ! d i time- We 'ou"d "i;e to e:pre&& our &i cere t$! ;& to Pro#-N-VEN0ATESWARA RAO3 *e!d o# dep!rtme t o# ECE #or $i& 9!"u!b"e &u((e&tio & !t t$e time o# eedWe e:pre&& our &peci!" t$! ;& to &t!## o# ECE dep!rtme t ! d #rie d& '$o $e"ped u& i bri (i ( out t$e pre&e t #ormT$e "!&t but ot t$e "e!&t 'e !re (r!te#u" to our #!mi", member& #or t$eir "o9e ! d mor!" &upport 'it$out '$ic$ 'e 'ou"d ot !c$ie9e t$i& (o!"77Project A&&oci!te&

ABSTRACT: The fast development of multimedia computing has led to the demand of using digital images. The manipulation, storage and transmission of images in their raw form is very expensive, and significantly slows the transmission and make storage costly. Efficient image compression solutions are becoming critical with the recent growth of data intensive, multimedia based applications. Many techniques are now available and much effort is being expended in determining the optimum compression transforms. Compression is done using Cosine and avelet Transforms. !ecently

compression techniques using avelet Transform " T# have received great attention, because of their promising compression ratio, ability to analy$e the temporal and spectral properties of image signals and flexibility in representing non stationary signals like speech and images by taking into account human perception system. %n this paper we describe the application of &iscrete avelet Transform "& T# for analysis, processing and compression of multimedia signals like speech and image. More specifically we explore the ma'or issues concerning the wavelet based image compression which include choosing optimal wavelet, decomposition levels and thresholding criteria. The simulation results prove the effectiveness of & T based techniques in attaining an efficient compression ratio of (.)* for images, achieving higher signal to noise ratio "+,!#, better peak signal to noise ratio "-+,!#, while the retained signal energy is ....//01 and the resulting signals are generally much smoother. 2 comparison between &iscrete Cosine Transforms "&CT# and discrete wavelet transform is done finally. 1. INTRODUCTION %n today3s digital world, when we see digital movie, listen digital music, read digital mail, store documents digitally, making conversation digitally, we have to deal with huge amount of digital data. +o, data compression plays a very significant role to keep the digital world realistic. %f there were no data compression techniques, we would have not been able to listen songs over the %nternet, see digital pictures or movies, 4r we would have not heard about video conferencing or telemedicine. 5ow data compression made it possible6 hat are the main advantages of data compression in digital world6 There many be many answers but the three obvious reasons are the saving of memory space for storage, channel bandwidth and the processing time for transmission. Every one of us might have experienced that before the advent M-7, hardly 8 or 0 songs of wav file could be accommodated. 2nd it was not possible to send a wav file through mail because of its tremendous file si$e. 2lso, it took 0 to 9: minutes or even more to download a song from the %nternet. ,ow, we can easily accommodate 0: to ): songs of M-7 in a music C& of same capacity. ;ecause, the uncompressed audio files can be compressed 9: to 90 times using M-7 format. 2nd we have no problem in sending any of our favorite music to our distant friends in any corner of the world. 2lso, we can

download a song in M-7 in a matter of seconds. This is a simple example of significance of data compression. +imilar compression schemes were developed for other digital data like images and videos. <ideos are nothings but the animations of frames of images in a proper sequence at a rate of 7: frames per second or higher. 2 huge amount of memory is required for storing video files. The possibility of storing 8=0 movies in &<& C& now rather than we used (=7 C&s for a movie file is because compression. e will consider here mainly the image compression techniques. %mage data compression is concerned with minimi$ing the number of bits required to represent an image with no significant loss of information. %mage compression algorithms aim to remove redundancy present in the data "correlation of data# in a way which makes image reconstruction possible> this is called information preserving compression -erhaps the simplest and most dramatic form of data compression is the sampling of band limited images, where an infinite number of pixels per unit area are reduced to one sample without any loss of information. Consequently, the number of samples per unit area is infinitely reduced. Transform based methods better preserve sub'ective image quality, and are less sensitive to statistical image property changes both inside a single images and between images. -rediction methods provide higher compression ratios in a much less expensive way. %f compressed images are transmitted an important property is insensitivity to transmission channel noise. Transform based techniques are significantly less sensitivity to channel noise. %f a transform coefficients are corrupted during transmission, the resulting image is spread homogeneously through the image or image part and is not too disturbing. 2pplications of data compression are primarily in transmission and storage of information. %mage transmission applications are in broadcast television, remote sensing via satellite, military communication via aircraft, radar and sonar, teleconferencing, and computer communications.

1.1) IMAGE %n general images can be defined as any two dimensional function f"x,y# where x,y are spatial coordinates, and amplitude of f at any pair of coordinates"x,y# is called intensity or gray level of the image at that point. Digital image when x,y and the amplitude values of f are all finite, discrete quantities, we call the image a digital image. Pixel 2 pixel is a single point in a graphic image. ?raphics monitors display pictures by dividing the display screen into thousands "or millions# of pixels, arranged in rows and columns. The pixels are so close together that they appear connected. The number of bits used to represent each pixel determines how many colors or shades of gray can be displayed. @or example, in /Abit color mode, the color monitor uses / bits for each pixel, making it possible to display ( to the / th power "(0)# different colors or shades of gray. Image types The different types of images are binary, indexed, intensity, and !?; image types. Bi a!y image 2n image containing only black and white pixels. %n M2TB2;, a binary image is represented by a uint/ or double logical matrix containing :Cs and 9Cs "which usually represent black and white, respectively#. 2 matrix is logical when its Dlogical flagD is turned Don.D e often use the variable name ; to represent a binary image in memory. I "exe" image 2n image whose pixel values are direct indices into an !?; color map. %n M2TB2;, an indexed image is represented by an array of class uint/, uint9), or double. The color map is always an mAbyA7 array of class double. e often use the variable name E to represent an indexed image in memory, and map to represent the color map. I te sity image

2n image consisting of intensity "grayscale# values. %n M2TB2;, intensity images are represented by an array of class uint/, uint9), or double. hile intensity images are not stored with color maps, M2TB2; uses a system color map to display them. e often use the variable name % to represent an intensity image in memory. This term is synonymous with the term Dgrayscale.D M#lti$!ame image 2n image file that contains more than one image, or frame. hen in M2TB2; memory, a multiframe image is a 8A&array where the fourth dimension specifies the frame number. This term is synonymous with the term Dmultipageimage.D RGB image 2n image in which each pixel is specified by three values AA one each for the red, blue, and green components of the pixelCs color. %n M2TB2;, an !?; image is represented by an mAbyAnAbyA7 array of class uint/, uint9), or double. e often use the variable name !?; to represent an !?; image in memory. IMAGE DIGITI%ATION 2n image captured by a sensor is expressed as a continuous function f"x,y# of two coordinates in the plane. %mage digiti$ation means that the function f"x,y# is sampled into a matrix with m rows and n coloumns. The image quanti$ation assigns to each continuous samples an integer value. The continuous range of image functions f"x,y# is split into k intervals. The finer the sampling"i.e the larger m and n# and quanti$ation"larger k# the nbetter the approximation of the continuous image f"x,y#. SAMP&ING AND 'UANTI%ATION To be suitable for computer processing an image function must be digiti$ed both spatially and in amplitude. &igiti$ation of spatial coordinates is called image sampling and amplitude digiti$ation is called gray level quanti$ation. IMAGE PROCESSING

The field of digital image processing refers to processing of digital image by means of a digital computer. 2 digital image is an image f"x,y# that has been discreti$ed both in spatial coordinates and brightness. 2 digital image can be considered as a matrix whose row and coloumn indices identifies a point in the image and corresponding matrix element value identifies the gray level at that point. The elements of such a digital array are called image elementd, picture elements, pixels or pels. The last two being commonly used abbreviations of Fpictures elementsG. The term digital processing generally refers to a two dimentional picture by a digital computer. %n a broader context it implies digital processing of any two dimensional data. %n the form in which they usually occur, images are not directly amenable to computer analysis. +ince computers work with numerical rather than pictorial data, an image must be converted to numerical form before processing.this conversion process is called Fdigiti$ation G . The image is divided into small regions called picture elements or Fpixels F. 2t each pixel location the image brightness is sample and quanti$ed. This step generates an integer at each pixel representing the brightness or darkness of the image at that point. hen this has been done for all pixels the image is represented by rectangular array of integers. each location has allocation or address ,and an integer value called Ggray levelG. This array digital data is now candidate for computer processing. APP&ICATIONS O( DIGITA& IMAGE PROCESSING 9.Office automationH optical character recognition> document processing cursive script recognition> logo ang icon recognition> (.Industrial automation: automation inspection system> non destructive testing> automatic assembling> procrss related to <B+% manufacturing> -C; checking> 7.!obotics> oil and natural gas exploration> etc 8.Bio-medicalH EC?,EE?,EM? analysis> cytological, histological and stereological applications> automated radiology and pathology> xAray image analysis> etc 0.Remote sensingH natural resources survey and management> estimation related to agriculture, hydrology foresty, mineralogy> urban planning> environment control and pollution control> etc ).CriminologyH finger print identification> human face registration and matching> forensic investigation etc.

*. Astronomy and space applicationsH restoration of images suffering from geometric and photometric distortions> etc. /.Information technologyH facsimilies image transmission, video text> <ideo conferencing and video phones> etc. ..Entertainment and consumer electronicsH 5&<T> multimedia and video editing. 9:.Military applicationsH missile guidance and detection> target identification> navigation of pilot less vehicle> reconnaissance> and range finding>etc. 99.Printing and graphics artH color fidelity in desktop publishing> art conservation and dissemination> etc.

IMAGE COMPRESSION PRINCIP&ES O( IMAGE COMPRESSION: 2n ordinary characteristic of most images is that the neighboring pixels are correlated and therefore hold redundant information. The foremost

task then is to find out less correlated representation of the image. Two elementary components of compression are redundancy and irrelevancy reduction. !edundancy reduction aims at removing duplication from the signal source image. %rrelevancy reduction omits parts of the signal that is not noticed by the signal receiver, namely the 5uman <isual +ystem "5<+#. %n general, three types of redundancy can be identifiedH "a# +patial !edundancy or correlation between neighboring pixel values, "b# +pectral !edundancy or correlation between different color planes or spectral bands and "c# Temporal !edundancy or correlation between ad'acent frames in a sequence of images especially in video applications. %mage compression research aims at reducing the number of bits needed to represent an image by removing the spatial and spectral redundancies as much as possible. DATA COMPRESSION )ERSUS BAND*IDT+ The mere processing of converting an analog signal into digital signal results in increased bandwidth requirements for transmission. @or example a 0 M5$ television signal sampled at nyquist rate with / bits per sample would require a bandwidth of 8: M5$ when transmitted using a digital modulation scheme. &ata compression seeks to minimi$e this cost and sometimes try to reduce the bandwidth of the digital signal below its analog bandwidth requirements. *,y "- .e ee" /-mp!essi- 0 The figures in T2;BE9 show the qualitative transition from simple text to full motion video data and the disk space needed to store such uncompressed data Ta1le 1 M#ltime"ia "ata types a " # /-mp!esse" st-!age spa/e !e2#i!e" M#ltime"ia Data Si3e4D#!ati- Bits4Pixel -! U /-mp!esse" Bits4Sample Si3e 2 page of text Telephone quality speech 99CC x /.0CC 9 sec <arying resolution 9)A7(Ibits /bps )8Ibits

?rayscale %mage Color %mage Medical %mage +5& %mage

09( x 09( 09( x 09( (:8/ x 9)/: (:8/ x (:8/

/ bpp (8 bpp 9( bpp (8 bpp (8 bpp

(.9Mbits ).(.Mbits 89.7Mbits 9::Mbits (.(9?bits

@ullAmotion <ideo )8: x 8/:, 9: sec

The examples above clearly illustrate the need for large storage space for digital image, audio, and video data. +o, at the present state of technology, the only solution is to compress these multimedia data before its storage and transmission, and decompress it at the receiver for play back.

(!ame.-!5 -$ Ge e!al Image C-mp!essi- Met,-"


2 typical lossy image compression system is shown in @ig. 7. %t consists of three closely connected components namely "a# +ource Encoder, "b# Juanti$er and "c# Entropy Encoder. Compression is achieved by applying a linear transform in order to decorrelate the image data, quanti$ing the resulting transform coefficients and entropy coding the quanti$ed values.

@ig. 7H 2 Typical Bossy %mage Encoder Source Encoder !inear "ransformer) 2 variety of linear transforms have been developed which include &iscrete @ourier Transform "&@T#, &iscrete Cosine Transform "&CT#, &iscrete avelet Transform "& T# and many more, each with its own advantages and disadvantages. #uanti$er 2 quanti$er is used to reduce the number of bits needed to store the transformed coefficients by reducing the precision of those values. 2s it is a manyAtoAone mapping, it is a lossy process and is the main source of compression in an encoder. Juanti$ation can be performed on each

individual coefficient,which is called +calar Juanti$ation "+J#. Juanti$ation canalso be applied on a group of coefficients together known as<ector Juanti$ation "<J# K.L. ;oth uniform and nonAuniform quanti$ers can be used depending on the problems. Entropy Encoder 2n entropy encoder supplementary compresses the quanti$ed values losslessly to provide a better overall compression. %t uses a model to perfectly determine the probabilities for each quanti$ed value and produces an appropriate code based on these probabilities so that the resultant output code stream is smaller than the input stream. The most commonly used entropy encoders are the 5uffman encoder and the arithmetic encoder, although for applications requiring fast execution, simple !un Bength Encoding "!BE# is very effective K9:L. %t is important to note that a properly designed quanti$er and entropy encoder are absolutely necessary along with optimum signal transformation to get the best possible compression.

1.6) *,at a!e t,e "i$$e!e t types -$ /-mp!essi- 0 7A) &-ssless 8s. &-ssy /-mp!essi- : There are different ways of classifying compression techniques. Two of these would be mentioned here. The first categori$ation is based on the information content of the reconstructed image. They are Clossless compressionC and Clossy compression schemes. %n lossless compression, the reconstructed image after compression is numerically identical to the original image on a pixel byApixel basis. 5owever, only a modest amount of compression is achievable in this technique. %n lossy compression on the other hand, the reconstructed image contains degradation relative to the original, because redundant information is discarded during compression. 2s a result, much higher compression is achievable, and under normal viewing conditions, no visible loss is perceived "visually lossless#. "B) P!e"i/ti8e 8s. T!a s$-!m /-"i gH The second categori$ation of various coding schemes is based on the CspaceC where the compression method is applied. These are Cpredictive

codingC and Ctransform codingC. %n predictive coding, information already sent or available is used to predict future values, and the difference is coded. +ince this is done in the image or spatial domain, it is relatively simple to implement and is readily adapted to local image characteristics. &ifferential -ulse Code Modulation "&-CM# is one particular example of predictive coding. Transform coding, also called block quanti$ation, is an alternative to predictive coding. 2 block of data is unitarily transformed so that a large fractionof its total energy is packed in relatively few transform coefficients, which are quanti$ed independently the optimum transform coder is defined as one that minimi$es the mean square distortion of the reproduced data for a given number of total bits. Transform coding, on the other hand, first transforms the image from its spatial domain representation to a different type of representation using some wellAknown transforms mentioned later, and then codes the transformed values "coefficients#. The primary advantage is that, it provides greater data compression compared to predictive methods, although at the expense of greater computations. OB9ECTI)E This process aims to study and understand the general operations used to compress a two dimensional gray scale images and to develop an application that allows the compression and reconstruction to be carried out on the images. The application developed aims to achieveH 9. Minimum distortion (. 5igh compression ratio 7. @ast compression time To compress an image the operations include linear transform, quanti$ation and entropy encoding. The thesis will study the wavelet and cosine transformation and discuss the superior features that it has over fourier transform. This helps to know how quanti$ation reduces the volume of an image data before packing them efficiently in the entropy coding operation. To reconstruct the image, an inverse operation is performed at every stage of the system in the reverse order of the image decomposition. DATA REDUNDANC: &ata redundancy is the central issue in digital image compression. %t is a mathematically quantifiable entity.

%f n9 and n( represent the number of information carrying units in two data sets that represent the same information, the relative data redundancy !d of the first data set can be defined as !dM9A9=Cr here Cr, commonly called the compression ratio, is CrMn9=n( @or the case n(Mn9, CrM9 and !dM: indicating that the first representation contains no redundant data. hen n(NNn9, CrOinfinite and !dO9 implying significant compression and highly redundant data. %n other case n(OOn9, CrO: and !dOinfinite, indicating that the second data set contains much more data then the original representation.

COMPRESSION RATIO The degree of data reduction as a result of the compression process is known as compression ratio. The ratio measures the quantity of compressed data. Compression ratio"C.!# M length of original data string
length of compressed data string

increase of CO! causes more efficient the compression technique employed and vice versa.

CONTENTS
1. Introduction

1.1 Image compression 1.2 Types of compression 1.3 Advantages 1.4 App ications

2.Compression tec!ni"ues
2.1 #ct 2.2 #$t

3.%ave ets
4.

I troduci ( W!9e"et& T!e fundamenta idea &e!ind $ave ets is to ana yse according to sca e. T!e $ave et ana ysis procedure is to adopt a $ave et prototype function ca ed an ana ysing $ave et or mot!er $ave et. Any signa can t!en &e represented &y trans ated and sca ed versions of t!e mot!er $ave et. %ave et ana ysis is capa& e of revea ing aspects of data t!at ot!er signa ana ysis tec!ni"ues suc! as 'ourier ana ysis miss aspects i(e trends) &rea(do$n points) discontinuities in !ig!er derivatives) and se f*simi arity. 'urt!ermore) &ecause it affords a different vie$ of data t!an

t!ose presented &y traditiona tec!ni"ues) it can compress or de*noise a signa $it!out apprecia& e degradatio De#i itio o# '!9e"et T!ere are a num&er of $ays of defining a $ave et +or a $ave et fami y,. Sc!"i ( #i"ter An ort!ogona $ave et is entire y defined &y t!e sca ing fi ter * a o$*pass finite impu se response +'I-, fi ter of engt! 2N and sum 1. In &iort!ogona $ave ets) separate decomposition and reconstruction fi ters are defined. 'or ana ysis $it! ort!ogona $ave ets t!e !ig! pass fi ter is ca cu ated as t!e "uadrature mirror fi ter of t!e o$ pass) and reconstruction fi ters are t!e time reverse of t!e decomposition fi ters. #au&ec!ies and Sym et $ave ets can &e defined &y t!e sca ing fi ter.

Sc!"i ( #u ctio %ave ets are defined &y t!e $ave et function .+t, +i.e. t!e mot!er $ave et, and sca ing function /+t, +a so ca ed fat!er $ave et, in t!e time domain. T!e $ave et function is in effect a &and*pass fi ter and sca ing it for eac! eve !a ves its &and$idt!. T!is creates t!e pro& em t!at in order to cover t!e entire spectrum) an infinite num&er of eve s $ou d &e re"uired. T!e sca ing function fi ters t!e o$est eve of t!e transform and ensures a t!e spectrum is covered. See for a detai ed e0p anation.

'or a $ave et $it! compact support) /+t, can &e considered finite in engt! and is e"uiva ent to t!e sca ing fi ter g. 1eyer $ave ets can &e defined &y sca ing function W!9e"et #u ctio T!e $ave et on y !as a time domain representation as t!e $ave et function .+t,. 'or instance) 1e0ican !at $ave et& can &e defined &y a $ave et function. See a ist of a fe$ Continuous $ave ets. C"!&&i#ic!tio o# '!9e"et& %ave et transforms are c assified into discrete $ave et transforms +#%Ts, and continuous $ave et transforms +C%Ts,. Note t!at &ot! #%T and C%T are continuous*time +ana og, transforms. T!ey can &e used to represent continuous*time +ana og, signa s. C%Ts operate over every possi& e sca e and trans ation $!ereas #%Ts use a specific su&set of sca e and trans ation va ues or representation grid. Li&t o# '!9e"et& Di&crete '!9e"et& 2ey (in +13, 2NC $ave ets Coif et +4) 12) 13) 24) 35, Co!en*#au&ec!ies*'eauveau $ave et +Sometimes referred to as C#' N67 or #au&ec!ies &iort!ogona $ave ets, #au&ec!ies $ave et +2) 4) 4) 3) 15) 12) 14) 14) 13) 25, 2inomia *81' +A so referred to as #au&ec!ies $ave et, 9aar $ave et

1at!ieu $ave et :egendre $ave et ;i asenor $ave et

Co ti uou& '!9e"et& Re!" 9!"ued 2eta $ave et 9ermitian $ave et 9ermitian !at $ave et 1e0ican !at $ave et S!annon $ave et Comp"e: 9!"ued Comp e0 me0ican !at $ave et 1or et $ave et S!annon $ave et 1odified 1or et $ave et %ave et vs. 'ourier ana ysis SI1I:A-ITIES T-ANS'O-1 2ET%EEN 'O<-IEAN# %A;E:ET

T!e fast 'ourier transform +''T, and t!e discrete $ave et transform +#%T, are &ot! inear operation t!at generate a data structure t!at contains og2 n segments of various engt!s) usua y fi ing and transforming it into a different data vector of engt! 2n . T!e mat!ematica properties of t!e matrices invo ved in t!e transforms are simi ar as $e . T!e inverse transform matri0 for &ot! t!e ''T and t!e #%T is t!e transpose of t!e origina . As a resu t)

&ot! transforms can &e vie$ed as a rotation in function space to a different domain. 'or t!e ''T) t!is ne$ domain contains &asis functions t!at are sines and cosines. 'or t!e $ave et transform) t!is ne$ domain contains more comp icated &asis functions ca ed $ave ets) mot!er $ave ets) or Ana y=ing $ave ets. 2ot! transforms !ave anot!er simi arity. T!e &asis functions are oca i=ed in fre"uency) ma(ing mat!ematica too s suc! as po$er spectra +!o$ muc! po$er is contained in a fre"uency interva , and Sca egrams +to &e dened ater, usefu at pic(ing out fre"uencies and ca cu ating po$er distri&utions. Ge er!" Co cept& In t!e $e *(no$n 'ourier ana ysis) a signa is &ro(en do$n into constituent sinusoids of different fre"uencies. T!ese sines and cosines +essentia y comp e0 e0ponentia s, are t!e &asis functions and t!e e ements of 'ourier synt!esis. Ta(ing t!e 'ourier transform of a signa can &e vie$ed as a rotation in t!e function space of t!e signa from t!e time domain to t!e fre"uency domain. Simi ar y) t!e $ave et transform can &e vie$ed as transforming t!e signa from t!e time domain to t!e $ave et domain. T!is ne$ domain contains more comp icated &asis functions ca ed $ave ets) mot!er $ave ets or ana y=ing $ave ets. 1at!ematica y) t!e process of 'ourier represented &y t!e Fourier transform: ana ysis is

%!ic! is t!e sum over a time of t!e signa f(t) mu tip ied &y a comp e0 e0ponentia . T!e resu ts of t!e transform are t!e 'ourier coefficients F(>)) $!ic! $!en mu tip ied 2y a sinusoid of fre"uency >) yie d t!e constituent sinusoida components of t!e origina signa . A $ave et prototype function at a sca e s and a spatia disp acement u is defined as?

-ep acing t!e comp e0 e0ponentia in E"uation 2.1 $it! t!is function yie ds t!e continuous $ave et transform +C%T,?

%!ic! is t!e sum over a time of t!e signa mu tip ied &y sca ed and s!ifted versions of t!e $ave et function .. T!e resu ts of t!e C%T are many $ave et coefficients C) $!ic! are a function of sca e and position. 1u tip ying eac! coefficient &y t!e appropriate y sca ed and s!ifted $ave et yie ds t!e constituent $ave ets of t!e origina signa . T!e &asis functions in &ot! 'ourier and $ave et ana ysis are oca i=ed in fre"uency ma(ing mat!ematica too s suc! as po$er spectra +po$er in a fre"uency interva , usefu at pic(ing out fre"uencies and ca cu ating po$er distri&utions.

T!e most important difference &et$een t!ese t$o (inds of transforms is t!at individua $ave et functions are oca ised in space. In contrast 'ourier sine and cosine functions are non* oca and are active for a time t. T!is oca isation feature) a ong $it! $ave ets oca isation of fre"uency) ma(es many functions and operators using $ave ets .sparse. $!en transformed into t!e $ave et domain. T!is sparseness) in turn resu ts in a num&er of usefu app ications suc! as data compression) detecting features in images and de*noisingt!is or

4-4-4 Time7Fre%ue c, Re&o"utio A ma@or dra$ &ac( of 'ourier ana ysis is t!at in transforming to t!e fre"uency domain) t!e time domain information is ost. %!en oo(ing at t!e 'ourier transform of a signa ) it is impossi& e to te $!en a particu ar event too( p ace. In an effort to correct t!is deficiency) #ennis Aa&or +1B44, adapted t!e 'ourier transform to ana yse on y a sma section of t!e signa at a time . a tec!ni"ue ca ed $indo$ing t!e signa C14D. Aa&or.s adaptation) ca ed t!e %indo$ed 'ourier Transform +%'T, gives information a&out signa s simu taneous y in t!e time domain and in t!e fre"uency domain To i ustrate t!e time*fre"uency reso ution differences &et$een t!e 'ourier transform and t!e $ave et transform consider t!e fo o$ing figures.

'igure 2.1 s!o$s a $indo$ed 'ourier transform) $!ere t!e $indo$ is simp y a s"uare $ave. T!e s"uare $ave $indo$ truncates t!e sine or cosine function to fit a $indo$ of a particu ar $idt!. 2ecause a sing e $indo$ is used for a fre"uencies in t!e %'T) t!e reso ution of t!e ana ysis is t!e same at a ocations in t!e time fre"uency p ane. An advantage of $ave et transforms is t!at t!e $indo$s vary. %ave et ana ysis a o$s t!e use of ong time interva s $!ere $e $ant more precise o$*fre"uency information) and s!orter regions $!ere $e $ant !ig!* fre"uency information. A $ay to ac!ieve t!is is to !ave s!ort !ig!*fre"uency &asis functions and ong o$*fre"uency ones.

'igure 2.2 s!o$s a time*sca e vie$ for $ave et ana ysis rat!er t!an a time fre"uency region. Sca e is inverse y re ated to fre"uency. A o$*sca e compressed $ave et $it! rapid y c!anging detai s corresponds to a !ig! fre"uency. A !ig!*sca e stretc!ed $ave et t!at is s o$ y c!anging !as a o$ fre"uency.

4-< E:!mp"e& o# W!9e"et& T!e figure &e o$ i ustrates four different types of $ave et &asis functions.

T!e different fami ies ma(e trade*offs &et$een !o$ compact y t!e &asis functions are oca i=ed in space and !o$ smoot! t!ey are. %it!in eac! fami y of $ave ets +suc! as t!e #au&ec!ies fami y, are $ave et su&c asses distinguis!ed &y t!e num&er of fi ter coefficients and t!e eve of iteration. %ave ets are most often c assified $it!in a fami y &y t!e num&er of vanishing moments. T!is is an e0tra set of mat!ematica re ations!ips for t!e coefficients t!at must &e satisfied. T!e e0tent of compactness of signa s depends on t!e num&er of vanis!ing moments of t!e $ave et function used. A more detai ed discussion is provided in t!e ne0t section.

T$e Di&crete W!9e"et Tr! &#orm= T!e #iscrete %ave et Transform +#%T, invo ves c!oosing sca es and positions &ased on po$ers of t$o. So ca ed dyadic sca es and positions. T!e mot!er $ave et is resca ed or di ated &y po$ers of t$o and trans ated &y integers. Specifica y) a function f(t) :2+R, +defines space of s"uare integra& e functions, can &e represented as

T!e function .+t, is (no$n as t!e mot!er $ave et) $!i e /+t, is (no$n as t!e sca ing 'unction. App"ic!tio & o# Di&crete W!9e"et Tr! &#orm Aenera y) an appro0imation to #%T is used for data compression if signa is a ready samp ed) and t!e C%T for signa ana ysis. T!us) #%T appro0imation is common y used in engineering and computer science) and t!e C%T in scientific researc!. %ave et transforms are no$ &eing adopted for a vast num&er of app ications) often rep acing t!e conventiona 'ourier Transform. 1any areas of p!ysics !ave seen t!is paradigm s!ift) inc uding mo ecu ar dynamics) a& initio ca cu ations) astrop!ysics) density*matri0 oca isation) seismic geop!ysics) optics) tur&u ence and "uantum mec!anics. T!is c!ange !as a so occurred) & ood*pressure) !eart*rate and ECA ana yses) #NA ana ysis in image processing) protein ana ysis) c imato ogy) genera signa

processing) speec! recognition) computer grap!ics and mu tifracta ana ysis. In computer vision and image processing) t!e notion of sca e*space representation and Aaussian derivative operators is regarded as a canonica mu ti*sca e representation. One use of $ave et appro0imation is in data compression. :i(e some ot!er transforms) $ave et transforms can &e used to transform data) t!en encode t!e transformed data) resu ting in effective compression. 'or e0amp e) E7EA 2555 is an image compression standard t!at uses &iort!ogona $ave ets. T!is means t!at a t!oug! t!e frame is overcomp ete) it is a tig!t frame +see types of 'rame of a vector space,) and t!e same frame functions +e0cept for con@ugation in t!e case of comp e0 $ave ets, are used for &ot! ana ysis and synt!esis) i.e.) in &ot! t!e for$ard and inverse transform. 'or detai s see $ave et compression. A re ated use is t!at of smoot!ing6denoising data &ased on $ave et coefficient t!res!o ding) a so ca ed $ave et s!rin(age. 2y adaptive y t!res!o ding t!e $ave et coefficients t!at correspond to undesired fre"uency components smoot!ing and6or denoising operations can &e performed. %ave et transforms are a so starting to &e used for communication app ications. %ave et O'#1 is t!e &asic modu ation sc!eme used in 9#*7:C +a po$er ine communications tec!no ogy deve oped &y 7anasonic,) and in one of t!e optiona modes inc uded in t!e IEEE 71B51 draft standard. T!e advantage of %ave et O'#1 over traditiona ''T O'#1 systems is t!at %ave et can ac!ieve deeper notc!es and t!at it does not re"uire a Auard Interva +$!ic! usua y represents significant over!ead in ''T O'#1 systems,C2D

IMAGE COMPRESSION TRANFORMS :

USING

DISCRETE

COSINE

In todayFs tec!no ogica $or d as our use of and re iance on computers continues to gro$) so too does our need for efficient $ays of storing arge amounts of data and due to t!e &and$idt! and storage imitations) images must &e compressed &efore transmission and storage. 9o$ever) t!e compression $i reduce t!e image fide ity) especia y $!en t!e images are compressed at o$er &it rates. T!e reconstructed images suffer from & oc(ing artifacts and t!e image "ua ity $i &e severe y degraded under t!e circumstance of !ig! compression ratios. In order to !ave a good compression ratio $it!out osing too muc! of information $!en t!e image is decompressed $e use #CT. A discrete cosine transform 1DCT, e0presses a se"uence of finite y many data points in terms of a sum of cosine functions osci ating at different fre"uencies. T!e .PEG proce&& is a $ide y used form of ossy image compression t!at centers on t!e Di&crete Co&i e Tr! &#orm. #CT and 'ourier transforms convert images from time*domain to fre"uency*domain to decorre ate pi0e s. T!e #CT transformation is reversi& e . T!e #CT $or(s &y separating images into parts of differing fre"uencies. #uring a step ca ed "uanti=ation) $!ere part of compression actua y occurs) t!e ess important fre"uencies are discarded) !ence t!e use of t!e term G ossyG. T!en) on y t!e most important fre"uencies t!at remain are used retrieve t!e image in t!e decompression process. As a resu t) reconstructed images contain some

distortionH &ut as $e s!a soon see) t!ese eve s of distortion can &e ad@usted during t!e compression stage. T!e E7EA met!od is used for &ot! co or and & ac(*and*$!ite images.

THE JPEG PROCESS: T!e fo o$ing is a genera overvie$ of t!e E7EA process. E7EA stands for Eoint 7!otograp!ic E0perts Aroup $!ic! is a common y used met!od of compression for p!otograp!ic images. T!e degree of compression can &e ad@usted) a o$ing a se ecta& e tradeoff &et$een storage si=e and image "ua ity. E7EA typica y ac!ieves 15?1 compression $it! itt e percepti& e oss in image "ua ity. 1ore compre!ensive understanding of t!e process may &e ac"uired as suc! given under? 1.T!e image is &ro(en into 303 & oc(s of pi0e s. 2. %or(ing from eft to rig!t) top to &ottom) t!e #CT is app ied to eac! & oc(. 3. Eac! & oc( is compressed t!roug! "uanti=ation. 4. T!e array of compressed & oc(s t!at constitute t!e image is stored in a drastica y reduced amount of space. I. %!en desired) t!e image is reconstructed t!roug! decompression) a process t!at uses t!e Inverse #iscrete Cosine Transform +I#CT,. THE DISCRETE COSINE TRANSFORM:

:i(e ot!er transforms) t!e #iscrete Cosine Transform +#CT, attempts to decorre ate t!e image data. After decorre ation eac! transform coefficient can &e encoded independent y $it!out osing compression efficiency. T!is section descri&es t!e #CT and some of its important properties. 1) The One-Dimensional DCT: T!e most common #CT definition of a 1*# se"uence of engt! N is

'or u J 5) 1) 2) K) N L1. Simi ar y) t!e inverse transformation is defined as

'or 0 J 5) 1) 2) K) N L1 In both equations as above, (u) is defined as

It is c ear from first e"uation t!at for

T!us) t!e first transform coefficient is t!e average va ue of t!e samp e se"uence. In iterature) t!is va ue is referred to as t!e DC Coefficient. A ot!er transform coefficients are ca ed t!e AC Coefficients. ) The T!o-Dimensional DCT: T!e #iscrete Cosine Transform +#CT, is one of many transforms t!at ta(es its input and transforms it into a inear com&ination of $eig!ted &asis functions. T!ese &asis functions are common y t!e fre"uency. T!e 2*# #iscrete Cosine Transform is @ust a one dimensiona #CT app ied t$ice) once in t!e 0 direction) and again in t!e y direction. One can imagine t!e computationa comp e0ity of doing so for a arge image. T!us) many a gorit!ms) suc! as t!e 'ast 'ourier Transform +''T,) !ave &een created to speed t!e computation.

entry

of

T!e #CT e"uation +E".1, computes t!e i) @t! t!e #CT of an image.

p +0) y, is t!e 0)yt! e ement of t!e image represented &y t!e matri0 p. N is t!e si=e of t!e & oc( t!at t!e #CT is done on. T!e e"uation ca cu ates one entry +i) @ t!, of t!e transformed image from t!e pi0e va ues of t!e origina image matri0. 'or t!e standard 303 & oc( t!at E7EA compression uses) N e"ua s 3 and 0 and y range from 5 to M. T!erefore # +i) @ , $ou d &e as in E"uation +3,.

2ecause t!e #CT uses cosine functions) t!e resu ting matri0 depends on t!e !ori=onta and vertica fre"uencies. T!erefore an image & ac( $it! a ot of c!ange in fre"uency !as a very random oo(ing resu ting matri0) $!i e an image matri0 of @ust one co or) !as a resu ting matri0 of a arge va ue for t!e first e ement and =eroes for t!e ot!er e ements. COMPRESSION Block Diagram:

The input is an image which consists of ata interms of pi!els" # gre$scale image is of resolution %&&!%&&" i"e it consists of '&(%& no of pi!el )alues" #n *!* DCT matri! is consi ere here" THE DCT MATRI": To get t!e matri0 form of E"uation +1,) $e $i fo o$ing e"uation) use t!e

'or an 303 & oc( it resu ts in t!is matri0?

T!e first ro$ +i ? 1, of t!e matri0 !as a t!e entries e"ua to 16 3 as e0pected from E"uation +4,.T!e co umns of T form an ort!onorma set) so T is an ort!ogona matri0. %!en doing t!e inverse #CT t!e ort!ogona ity of T is important) as t!e inverse of T is TF $!ic! is easy to ca cu ate.

DCT ON AN #$# %&OC':

2efore $e &egin) it s!ou d &e noted t!at t!e pi0e va ues of a & ac(*and*$!ite image range from 5 to 2II in steps of 1) $!ere pure & ac( is represented &y 5) and pure $!ite &y 2II. T!us it can &e seen !o$ a p!oto) i ustration) etc. can &e accurate y represented &y t!ese 2I4 s!ades of gray. Since an image comprises !undreds or even t!ousands of 303 & oc(s of pi0e s) t!e fo o$ing description of $!at !appens to one 303 & oc( is a microcosm of t!e E7EA processH $!at is done to one & oc( of image pi0e s is done to a of t!em) in t!e order ear ier specified. No$) etNs start $it! a & oc( of image pi0e va ues. T!is particu ar & oc( $as c!osen from t!e very upper* eft*!and corner of an image.

2ecause t!e #CT is designed to $or( on pi0e va ues ranging from *123 to 12M) t!e origina & oc( is G eve ed offG &y su&tracting 123 from eac! entry. T!is resu ts in t!e fo o$ing matri0.

%e are no$ ready to perform t!e #iscrete Cosine Transform) $!ic! is accomp is!ed &y matri0 mu tip ication. % & "M"' ----- () In E"uation +I, matri0 1 is first mu tip ied on t!e eft &y t!e #CT matri0 T from t!e previous sectionH t!is transforms t!e ro$s. T!e co umns are t!en transformed &y mu tip ying on t!e rig!t &y t!e transpose of t!e #CT matri0. T!is yie ds t!e fo o$ing matri0.

T!is & oc( matri0 no$ consists of 44 #CT coefficients) c +i) @,) $!ere i and @ range from 5 to M. T!e top* eft coefficient) c +5) 5,) corre ates to t!e o$ fre"uencies of t!e origina image & oc(. As $e move a$ay from c+5)5, in a directions) t!e #CT coefficients corre ate to !ig!er and !ig!er fre"uencies of t!e image & oc() $!ere c+M) M, corresponds to !ig!est fre"uency. 9ig!er fre"uencies are main y represented as o$er num&er and :o$er fre"uencies as !ig!er num&er. It is important to (no$ t!at !uman eye is most sensitive to o$er fre"uencies. ()ANTI*ATION: Our 303 & oc( of #CT coefficients is no$ ready for compression &y "uanti=ation. A remar(a& e and !ig! y usefu feature of t!e E7EA process is t!at in t!is step) varying eve s of image compression and "ua ity are o&taina& e t!roug! se ection of specific "uanti=ation matrices. T!is ena& es t!e user to decide on "ua ity eve s ranging from 1 to 155) $!ere 1 gives t!e poorest image "ua ity and !ig!est compression) $!i e 155 gives t!e &est "ua ity and o$est compression. As a resu t) t!e "ua ity6compression ratio can &e tai ored to suit different needs. Su&@ective e0periments invo ving t!e !uman visua system !ave resu ted in t!e E7EA standard "uanti=ation matri0. %it! a "ua ity eve of I5) t!is matri0 renders &ot! !ig! compression and e0ce ent decompressed image "ua ity.

If) !o$ever) anot!er eve of "ua ity and compression is desired) sca ar mu tip es of t!e E7EA standard "uanti=ation matri0 may &e used. 'or a "ua ity eve greater t!an I5 + ess compression) !ig!er image "ua ity,) t!e standard "uanti=ation matri0 is mu tip ied &y +155*"ua ity eve ,6I5. 'or a "ua ity eve ess t!an I5 +more compression) o$er image "ua ity,) t!e standard "uanti=ation matri0 is mu tip ied &y I56"ua ity eve . T!e sca ed "uanti=ation matri0 is t!en rounded and c ipped to !ave positive integer va ues ranging from 1 to 2II. 'or e0amp e) t!e fo o$ing "uanti=ation matrices yie d "ua ity eve s of 15 and B5.

8uanti=ation is ac!ieved &y dividing eac! e ement in t!e transformed image matri0 # &y corresponding e ement in t!e "uanti=ation matri0) and t!en rounding to t!e nearest integer va ue. 'or t!e fo o$ing step) "uanti=ation matri0 8I5 is used.

-eca t!at t!e coefficients situated near t!e upper* eft corner correspond to t!e o$er fre"uencies to $!ic! t!e !uman eye is most sensitive of t!e image & oc(. In addition) t!e =eros represent t!e ess important) !ig!er fre"uencies t!at !ave &een discarded) giving rise to t!e ossy part of compression. As mentioned ear ier) on y t!e remaining non=ero coefficients $i &e used to reconstruct t!e image. It is a so interesting to note t!e effect of different "uanti=ation matricesH use of 815 $ou d give C significant y more =eros) $!i e 8B5 $ou d resu t in very fe$ =eros. CODING: T!e "uanti=ed matri0 C is no$ ready for t!e fina step of compression. 2efore storage) a coefficients of C are converted &y an encoder to a stream of &inary data +51151511...,. In*dept! coverage of t!e coding process is &eyond t!e scope of t!is artic e. 9o$ever) $e can point out one (ey aspect t!at t!e reader is sure to appreciate. After "uanti=ation) it is "uite common for most of t!e coefficients to e"ua =ero. E7EA ta(es advantage of t!is &y encoding "uanti=ed coefficients in t!e =ig*=ag se"uence s!o$n in

'igure as under. T!e advantage ies in t!e conso idation of re ative y arge runs of =eros) $!ic! compress very $e . T!e se"uence in 'igure 1+404, continues for t!e entire 303 & oc(.

DECOMPRESSION: %lo+, -ia./am:

-econstruction of our image &egins &y decoding t!e &it stream representing t!e 8uanti=ed matri0 C. Eac! e ement of C is t!en mu tip ied &y t!e corresponding e ement of t!e "uanti=ation matri0 origina y used - i) @ J 8 i) @ O C i) @

T!e I#CT is ne0t app ied to matri0 -) $!ic! is rounded to t!e nearest integer. 'ina y) 123 is added to eac! e ement of t!at resu t) giving us t!e decompressed E7EA version N of our origina 303 image & oc( 1. N J round +TF-T, P 123 PROPERTIES OF DCT: Some properties of t!e #CT $!ic! are of particu ar va ue to image processing app ications: a)Decorrelation: T!e princip e advantage of image transformation is t!e remova of redundancy &et$een neig!&oring pi0e s. T!is eads to uncorre ated transform coefficients $!ic! can &e encoded independent y. It can &e inferred t!at #CT e0!i&its e0ce ent decorre ation properties. b)Energy Compaction: Efficacy of a transformation sc!eme can &e direct y gauged &y its a&i ity to pac( input data into as fe$ coefficients as possi& e. T!is a o$s t!e "uanti=er to

discard coefficients $it! re ative y sma amp itudes $it!out introducing visua distortion in t!e reconstructed image. #CT e0!i&its e0ce ent energy compaction for !ig! y corre ated images.

c) Separability: T!e #CT transform e"uation can &e e0pressed as

T!is property) (no$n as separa&i ity) !as t!e princip e advantage t!at # +i) @, can &e computed in t$o steps &y successive 1*# operations on ro$s and co umns of an image. T!e arguments presented can &e identica y app ied for t!e inverse #CT computation.

d) Symmetry+ Anot!er oo( at t!e ro$ and co umn operations in a&ove E"uation revea s t!at t!ese operations are functiona y identica . Suc! a transformation is ca ed a

symmetric transformation. A separa& e and symmetric transform can &e e0pressed in t!e form D = TMT where M is an N N symmetric transformation matrix T!is is an e0treme y usefu property since it imp ies t!at t!e transformation matri0 can &e precomputed off ine and t!en app ied to t!e image t!ere&y providing orders of magnitude improvement in computation efficiency.

COMPARISON OF MATRICES:

:et us no$ see !o$ t!e E7EA version of our origina pi0e & oc( compares)

CONC&)SION:

If $e oo( at t!e a&ove t$o matrices) t!is is a remar(a& e resu t) considering t!at near y M5Q of t!e #CT coefficients $ere discarded prior to image & oc( decompression6reconstruction. Aiven t!at simi ar resu ts $i occur $it! t!e rest of t!e & oc(s t!at constitute t!e entire image) it s!ou d &e no surprise t!at t!e E7EA image $i &e scarce y distinguis!a& e from t!e origina . -emem&er) t!ere are 2I4 possi& e s!ades of gray in a & ac(*and*$!ite picture) and a difference of) say) 15) is &are y noticea& e to t!e !uman eye. #CT ta(es advantage of redundancies in t!e data &y grouping pi0e s $it! simi ar fre"uencies toget!er. And moreover if $e o&serve as t!e reso ution of t!e image is very !ig!) even after sufficient compression and decompression t!ere is very ess c!ange in t!e origina and decompressed image. T!us) $e can a so conc ude t!at at t!e same compression ratio t!e difference &et$een origina and decompressed image goes on decreasing as t!ere is increase in image reso ution. Disa"8a tages -$ DCT On y spatia corre ation of t!e pi0e s inside t!e sing e 2*# & oc( is considered and t!e corre ation from t!e pi0e s of t!e neig!&oring & oc(s is neg ected Impossi& e to comp ete y decorre ate t!e & oc(s at t!eir &oundaries using #CT <ndesira& e & oc(ing artifacts affect t!e reconstructed images or video frames. +!ig! compression ratios or very o$ &it rates,

DISCRETE *A)E&ET TRANS(ORM

App"ic!tio to im!(e compre&&io

T!is is a picture of a famous mat!ematician? Emmy Noet!er compressed in different $ays

I troductio %!en retrieved from t!e Internet) digita images ta(e a considera& e amount of time to do$n oad and use a arge amount of computer memory. T!e 9aar $ave et transform t!at $e $i discuss in t!is app ication is one $ay of compressing digita images so t!ey ta(e ess space $!en stored and transmitted. As $e $i see ater) t!e $ord RR$ave etFF stands for an ort!ogona &asis of a certain vector space.

T!e &asic idea &e!ind t!is met!od of compression is to treat a digita image as an array of num&ers i.e.) a matri0. Eac! image consists of a fair y arge num&er of itt e s"uares ca ed pi0e s +picture e ements,. T!e matri0 corresponding to a digita image assigns a $!o e num&er to eac! pi0e . 'or e0amp e) in t!e case of a 2I402I4 pi0e gray sca e image) t!e image is stored as a 2I402I4 matri0) $it! eac! e ement of t!e matri0 &eing a $!o e num&er ranging from 5 +for & ac(, to 22I +for $!ite,. T!e E7EA compression tec!ni"ue divides an image into 303 & oc(s and assigns a matri0 to eac! & oc(. One can use some inear a ge&ra tec!ni"ues to ma0imi=e compression of t!e image and maintain a suita& e eve of detai

Vector tr! &#orm u&i ( *!!r W!9e"et& 2efore $e e0p ain t!e transform of a matri0) et us see !o$ t!e $ave ets transform vectors +ro$s of a matri0,. Suppose
r =

[ 8(:

)/: 88/ *:/ 9(): 98(: 9):: 9)::]

is one ro$ of an 303 image matri0. In genera ) if t!e data string !as engt! e"ua to 2() t!en t!e transformation process $i consist of k steps. In t!e a&ove case) t!ere $i &e 3 steps since 3J23.

%e perform t!e fo o$ing operations on t!e entries of t!e vector r: 1. 1. #ivide t!e entries of r into four pairs? +425) 435,) +443) M53,) +1245) 1415,) +1455) 455,. 2. 2. 'orm t!e average of eac! of t!ese pairs?
8(: + )/: = 00:, ( 88/ + *:/ 9(): + 98(: 9):: + 9):: = 0*/, = 978:, = 9):: ( ( (

T!ese $i form t!e first four entries of t!e ne0t step vector r1.

3. 3. Su&tract eac! average from t!e first entry of t!e pair to get t!e num&ers?
97:, 97:, *0, : .

T!ese $i form t!e ast four entries of t!e ne0t step vector r1.

4. 4.

'orm t!e ne$ vector?

r9 = [ 00: 0*/ 978: 9):: 97: 97: /: :] .

Note t!at t!e vector r1 can &e o&tained from r &y mu tip ying r on t!e rig!t &y t!e matri0?

W9

: : 9= ( : : : 9 = ( : 9 = ( : : : 9= ( : : : : 9= ( : : : 9= ( : : : 9= ( : : : 9= ( : : = : : 9= ( : : : 9= ( : : 9= ( : : : 9= ( : : : : : 9= ( : : : 9= ( : : 9= ( : : : 9 = ( :

T!e first four coefficients of r1 are ca ed t!e appro0imation coefficients and t!e ast four entries are ca ed t!e detai coefficients.

'or our ne0t step) $e oo( at t!e first four entries of r1 as t$o pairs t!at $e ta(e t!eir averages as in step 1 a&ove. T!is gives t!e first t$o entries? I44) 14M5 of t!e ne$ vector r2. T!ese are our ne$ appro0imation coefficients. T!e t!ird and t!e fourt! entries of r2 are o&tained &y su&tracting t!ese averages from t!e first e ement of eac! pair. T!is resu ts in t!e ne$ detai coefficients? *14) *135. T!e ast four entries of r2 are t!e same as t!e detai coefficients of r1?
r( = [ 0)8 98*: 98 97: 97: 97: /: :]

9ere t!e vector r2 can &e o&tained from r1 &y mu tip ying r1 on t!e rig!t &y t!e matri0?

W(

9= ( : 9 = ( : 9 = ( : 9 = ( : : 9= ( : 9= ( : 9= ( : 9= ( = : : : : : : : : : : : : : : : :

: : : : 9 : : :

: : : : : 9 : :

: : : : : : 9 :

: : : : : : : 9

'or t!e ast step) average t!e first t$o entries of r2) and as &efore su&tract t!e ans$er from t!e first entry. T!is resu ts in t!e fo o$ing vector?
r7 = [9:9* 807 98 97: 97: 97: /: :]

As &efore) r3 can &e o&tained from r1 &y mu tip ying r2 on t!e $rig!t &y t!e matri0?

W7

9 = ( 9 = ( 9 = ( 9 = ( : : : : = : : : : : : : :

: : 9 : : : : :

: : : 9 : : : :

: : : : 9 : : :

: : : : : 9 : :

: : : : : : 9 :

: : : : : : : 9

As a conse"uence) one gets r3 immediate y from r using t!e fo o$ing e"uation

r7

= W9W(W7 r

:et

9 = / 9 = / 9 = / 9= / = W9W(W7 = 9 = / 9 = / 9 = / 9 = /

9= / 9= 8 : 9= ( : : : 9= / 9= 8 : 9= ( : : : 9= / 9= 8 : : 9= ( : : 9= / 9= 8 : : 9= ( : : 9= / : 9= 8 : : 9= ( : 9= / : 9= 8 : : 9= ( : 9= / : 9= 8 : : : 9= ( 9= / : 9= 8 : : : 9 = ( .

Note t!e fo o$ing? T!e co umns of t!e matri0 W1 form an ort!ogona su&set of R +t!e vector space of dimension 3 over R,H t!at is t!ese co umns are pair $ise ort!ogona +try t!eir dot products,. T!erefore) t!ey form a &asis of R . As a conse"uence) W1 is inverti& e. T!e same is true for W2 and W3. As a product of inverti& e matrices) W is a so inverti& e and its co umns form an ort!ogona &asis of R . T!e inverse of W is given &y?
W 9 = W79W(9W99

T!e fact t!e W is inverti& e a o$s us to retrieve our image from t!e compressed form using t!e re ation

= W 9 r7 .

Suppose t!at A is t!e matri0 corresponding to a certain image. T!e 9aar transform is carried out &y performing t!e a&ove operations on eac! ro$ of t!e matri0 A and t!en &y repeating t!e same operations on t!e co umns of t!e resu ting matri0. T!e ro$*transformed matri0 is AW. Transforming t!e co umns of AW is o&tained &y mu tip ying AW on t!e eft &y t!e matri0 WT +t!e transpose of W,. T!us) t!e 9aar transform ta(es t!e matri0 A and stores it as WTAW. :et ! denote t!e transformed matri0?

= W T AW .

<sing t!e properties of inverse matri0) $e can retrieve our origina matri0?
A = "W T # 9 SW 9 = "W 9 # T SW 9 .

T!is a o$s us to see t!e origina image +decompressing t!e compressed image,.

:et us try an e0amp e.

E:!mp"e Suppose $e !ave an 303 image represented &y t!e matri0

0*) *:8 *)/ /7( A = /7( .): *)/ 88/

*:8 990( 9(/: 9788 98*( 907) 907) )8: 990) 9:// 9788 98:/ 907) 9):: /7( 9(9) 98*( 98*( 907) 9):: 9):: /7( .): 9788 907) 907) 9):: 907) /7( .): 9(9) 907) 9):: 907) 907) /.) /.) 9:// 9):: 9):: 9):: 907) *)/ /7( /7( 9(/: 98*( 9):: 9):: *)/ *:8 )8: 9(/: 98:/ 9):: 9)::

T!e ro$*transformed matri0 is

L =

AW

9(:: 99/0 979( 9(*( = 9(0) 9(*( 9988 9:0)

(*( (// (8: (/: (.) 79( 788 89)

(// )8 )8 )8 )8 : ((0 .) 7( 78 7( 7( (*( 8/ 7( 9(/ 7( : 9): 9) : 9.( : 7( 9(/ 9) : 9(/ 7( : 7( 9) 7( .) : 7( 7( 99( : : .) : 7( 9(/ 9): 7( )8 :

Transforming t!e co umns of " is o&tained as fo o$s

9(9( 7:) 98) 08 7: 7) .: ( 0: 9: (: (8 /( 7/ (8 )/ T = W L = / / 7( 9) (: 0) 9) (: / / 8/ : 7) : / 88

(8 / : 8/ 8/ 9) 9) /:

)/ (: *( )8 8/ 7( 9) 9)

8: 8 / 8 9) 9) 7( / 9) 9) 9) 9) 9) 9) 9) :

T!e point of doing 9aar $ave et transform is t!at areas of t!e origina matri0 t!at contain itt e variation $i end up as =ero e ements in t!e transformed matri0. A matri0 is considered sparse if it !as a G!ig! proportion of =ero entriesS. Sparse matrices ta(e muc! ess memory to store. Since $e cannot e0pect t!e transformed matrices a $ays to &e sparse) $e decide on a non*negative t!res!o d va ue (no$n as T) and t!en $e et any entry in t!e transformed matri0 $!ose a&so ute va ue is ess t!an T to &e reset to =ero. T!is $i eave us $it! a (ind of sparse matri0. If T is =ero) $e $i not modify any of t!e e ements.

Every time you c ic( on an image to do$n oad it from t!e Internet) t!e source computer reca s t!e 9aar transformed matri0 from its memory. It first sends t!e overa appro0imation coefficients and arger detai coefficients and a &it ater t!e sma er detai coefficients. As your computer receives t!e information) it &egins reconstructing in progressive y greater detai unti t!e origina image is fu y reconstructed.

&i ea! alge1!a /a ma5e t,e /-mp!essi- p!-/ess $aste!; m-!e e$$i/ie t :et us first reca t!at an n#n s"uare matri0 A is ca ed ort!ogona if its co umns form an ort!onorma &asis of Rn) t!at is t!e co umns of A are pair$ise ort!ogona and t!e engt! of eac! co umn vector is 1. E"uiva ent y) A is ort!ogona if its inverse is e"ua to its transpose. T!at atter property ma(es retrieving t!e transformed image via t!e e"uation

A = "W T # 9 SW 9

= "W 9 # T SW 9 = WSW T

muc! faster.

Anot!er po$erfu property of ort!ogona matrices is t!at t!ey preserve magnitude. In ot!er $ords) if v is a vector of Rn and

A is an ort!ogona matri0) t!en UUAvUUJUUv$$. 9ere is !o$ it $or(s?

PP A PP (

= " A #T " A # T T = A A T = ! T = = PP PP (

T!is in turns s!o$s t!at UUAvUUJUUv$$. A so) t!e ang e is preserved $!en t!e transformation is &y ort!ogona matrices? reca t!at t!e cosine of t!e ang e &et$een t$o vectors u and v is given &y?

cos

". PP " PP PP PP

so) if A is an ort!ogona matri0) . is t!e ang e &et$een t!e t$o vectors Au and Av) t!en

cos

= = = = = =

" A" #." A # PP A" PP PP A PP " A" # T " A # PP " PP PP PP " T AT A PP " PP PP PP "T PP " PP PP PP ". PP " PPPP PP cos

Since &ot! magnitude and ang e are preserved) t!ere is significant y ess distortion produced in t!e re&ui t image $!en an ort!ogona matri0 is used. Since t!e transformation matri0 W is t!e product of t!ree ot!er matrices) one can norma i=e W &y norma i=ing eac! of t!e t!ree matrices. T!e norma i=ed version of W is

/ = )8 / = )8 / = )8 / = )8 / = )8 / = )8 / = )8 / = )8

/ = )8 9= ( : (=8 : : / = )8 9= ( : (=8 : : / = )8 9 = ( : : (=8 : / = )8 9 = ( : : (=8 : / = )8 : 9= ( : : (=8 / = )8 : 9= ( : : (=8 / = )8 : 9= ( : : : / = )8 : 9= ( : : :

: : : : : : (=8 ( = 8

Rem!r; If you oo( c ose y at t!e process $e descri&ed a&ove) you $i notice t!at t!e matri0 W is not!ing &ut a c!ange of &asis for R . In ot!er $ords) t!e co umns of W form a ne$ &asis +a Gvery niceS one, of R . So $!en you mu tip y a vector v +$ritten in t!e standard &asis, of R &y W) $!at you get is t!e coordinates of v in t!is ne$ &asis. Some of t!ese coordinates can &e Gneg ectedS using our t!res!o d and t!is $!at a o$s t!e transformed matri0 to &e stored more easi y and transmitted more "uic( y.

Compre&&io r!tio If $e c!oose our t!res!o d va ue T to &e positive +i.e. greater t!an =ero,) t!en some entries of t!e transformed matri0 $i &e reset to =ero and t!erefore some detai $i &e ost $!en t!e image is decompressed. T!e (ey issue is t!en to c!oose T $ise y so t!at t!e compression is done effective y $it! a minimum GdamageS to t!e picture. Note t!at t!e compression ratio is defined as t!e ratio of

non=ero entries in t!e transformed matri0 +!%W&AW) to t!e num&er of non=ero entries in t!e compressed matri0 o&tained from ! &y app ying t!e t!res!o d T.

T,!es,-l"e! Once #%T is performed) t!e ne0t tas( is t!res!o ding) $!ic! is neg ecting certain $ave et coefficients. 'or doing t!is one !as to decide t!e va ue of a t!res!o d and !o$ to app y t!e same.

)al#e -$ t,e T,!es,-l" T!is is an important step $!ic! affects t!e "ua ity of t!e compressed image. T!e &asic idea is to truncate t!e in* significant coefficients) since t!e amount of information contained in t!em is neg igi& e. T!e "uestion of deciding t!e va ue of t!res!o d is a pro& em in itse f. Idea y) one s!ou d !ave a uniform recipe) $!ic! $ou d $or( satisfactori y for a given set of pro& ems) so t!at t!e procedure is automated. One suc! met!od &y #ono!o and co*aut!ors C4D gives an asymptotica y

optima formu a ca ed t!e universa t!res!o d t? tJV " +2 nN,? +1, 9ere) V J standard deviation of t!e N $ave et coefficient cients. T!e va ue of t s!ou d &e ca cu ated for eac! eve of decomposition and on y for t!e !ig! pass coefficients. T!e o$ pass coefficients are usua y (ept untouc!ed so as to faci itate furt!er decomposition. '#a ti3e! 9ig!er compression ratios can &e o&tained &y "uanti=ing t!e non*=ero $ave et coefficients) &efore t!ey are encoded. A "uanti=er is a many*to*one function 8+0 , t!at maps many input va ues into a +usua y muc!, sma er set of output va ues. 8uanti=ers are staircase functions c!aracteri=ed &y a set of num&ers W di) i J 5)K.)NX ca ed decision points and a set of num&ers Wri) iJ5)K..)N* 1X ca ed reconstruction eve s. An input va ue 0 is mapped to a reconstruction eve ri) if 0 ies in t!e interva +di)d+iP1,D. To ac!ieve &est resu ts) a separate "uanti=er s!ou d &e designed for eac! sca e) ta(ing into account statistica properties of t!e sca eYs coefficients and for images) properties of t!e !uman visua system. T!e coefficient statistics guide t!e "uanti=er design for eac! sca e) $!i e t!e !uman visua system guides t!e a ocation of &its

among t!e different sca es. 'or our present purpose) a simp e uniform "uanti=er +i.e.) constant step si=e, is used. T!e $ave et coefficients +'igure 4 on p.24,) after t!res!o ding $ere uniform y "uanti=ed into 2I4 different &ins. T!us t!e si=e of eac! &in $as + 0ma0*0min62I4, ) $!ere 0min and 0ma0 are t!e $ave et coefficients $it! minimum and ma0imum va ues) respective y. To minimi=e t!e ma0imum error +minima0 condition,) centroid of eac! &in is assigned to a t!e coefficients fa ing in t!at &in. 'or discussions on non*uniform "uanti=ers) interested readers can refer C3D. ENTROP: ENCODER

T!is is t!e ast component in t!e compression mode . Ti no$) $e !ave devised mode s for an a ternate representation of t!e image) in $!ic! its interpi0e redundancies $ere reduced. T!is ast mode ) $!ic! is a oss ess tec!ni"ue) t!en aims at e iminating t!e coding redundancies) $!ose notion $i &e c ear &y considering an e0amp e. Suppose) $e !ave a domain in an image) $!ere pi0e va ues are uniform or t!e variation in t!em is uniform. No$ one re"uires 3 &pp +&its per pi0e , for representing eac! pi0e since t!e va ues range from 5 to 2II. T!us

representing eac! pi0e $it! t!e same +or constant difference, va ue $i introduce coding redundancy. T!is can &e e iminated) if $e transform t!e rea va ues into some sym&o ic form) usua y a &inary system) $!ere eac! sym&o corresponds to a particu ar va ue. %e $i discuss a fe$ coding tec!ni"ues and ana yse t!eir performances.

R# &e gt, E /-"i g -un* engt! encoding +-:E, ma(es use of t!e fact t!at near&y pi0e s in an image $i pro&a& y !ave t!e same &rig!tness va ue. T!is redundancy can t!en &e coded as fo o$s) Origina image data +3*&it, 12M 12M 12M 12M 12B 12B 12B -un* engt! encoded image data 12M 4 12B 2 T!is tec!ni"ue $i &e usefu for encoding an on ine signa . 2ut data e0p osion pro& ems can occur and even a sing e data error $i o&struct fu decompression. Di$$e!e tial P#lse C-"e M-"#lati7redictive image compression tec!ni"ues assume t!at a pi0e Ys &rig!tness can &e predicted given t!e va ue of t!e preceding pi0e . #ifferentia pu se code modu ation +#7C1, codes t!e differences &et$een t$o ad@acent pi0e s.

#7C1 starts coding at t!e top eft*!and corner of an image and $or(s eft to rig!t) unti a t!e image is encoded as s!o$n? Origina Image #ata 34 34 34 34 33 3B 3B 3B 3B B5 B5 34*5*5*5*2*1*5*5*5*1*5 #7C1 Code T!is tec!ni"ue $i &e usefu for images t!at !ave arger runs of e"ua *va ue pi0e s.

+#$$ma C-"i g T!is is t!e most popu ar statistica data compression tec!ni"ue for removing coding redundancy. It assigns t!e sma est possi& e num&er of code sym&o s per source sym&o and !ence reduces t!e average code engt! used to represent t!e set of given va ues. T!e genera idea is to assign east num&er of &its to most pro&a& e +or fre"uent, va ues occurring in an image. T!e 9uffman code is an e0amp e of a code $!ic! is optima $!en a sym&o s !ave possi&i ities of occurrence $!ic! are integra po$ers of Z. A 9uffman code can &e &ui t in t!e fo o$ing manner? -an( a sym&o s in decreasing order of pro&a&i ity of occurrence. Successive y com&ine t!e t$o sym&o s of t!e o$est pro&a&i ity to form a ne$ composite sym&o +source reduction,H eventua y $e $i &ui d a &inary tree) $!ere eac! node is t!e pro&a&i ity of a nodes &eneat! it. Trace t!e pat! to eac! eaf) noticing t!e direction

at eac! node. 'or a given fre"uency distri&ution) t!ere are many possi& e 9uffman codes) &ut t!e tota compressed engt! $i &e t!e same. It is possi& e to define a canonica 9uffman tree) t!at is) pic( one out of many a ternative trees. Suc! a canonica tree can t!en &e represented very compact y) &y transmitting on y t!e &it engt! of eac! code.

Ad9! t!(e& o# DWT o9er DCT 1co t-2 9ig!er f e0i&i ity? %ave et function can &e free y c!osen No need to divide t!e input coding into non*over apping 2* # & oc(s) it !as !ig!er compression ratios avoid & oc(ing artifacts Transformation of t!e $!o e image introduces in!erent sca ing 2etter identification of $!ic! data is re evant to !uman perception !ig!er compression ratio +44?1 vs. I55?1,