My Project
My Project
My Project
INTRODUCTION
1.1 BACKGROUND
IMAGE COMPRESSION
2.1 0VERVIEW
Some of these methods can easily be modified to be lossy. Lossy element fits
perfectly into 1D/2D run length search. Also, logarithmic quantisation may be inserted to
provide better or more effective results.
Run length encoding is a very simple method for compression of sequential data.
It takes advantage of the fact that, in many data streams, consecutive single tokens are
often identical. Run length encoding checks the stream for this fact and inserts a special
token each time a chain of more than two equal input tokens are found. This special input
advises the decoder to insert the following token n times into his output stream. Run
length coding is easily implemented, either in software or in hardware. It is fast and very
well verifiable, but its compression ability is very limited.
Area coding is an enhanced form of run length coding, reflecting the two
dimensional character of images. This is a significant advance over the other lossless
methods. For coding an image it does not make too much sense to interpret it as a
sequential stream, as it is in fact an array of sequences, building up a two dimensional
object. Therefore, as the two dimensions are independent and of same importance, it is
obvious that a coding scheme aware of this has some advantages. The algorithms for area
coding try to find rectangular regions with the same characteristics. These regions are
coded in a descriptive form as an Element with two points and a certain structure. The
whole input image has to be described in this form to allow lossless decoding afterwards.
The possible performance of this coding method is limited mostly by the very high
complexity of the task of finding largest areas with the same characteristics. Practical
implementations use recursive algorithms for reducing the whole area to equal sized sub
rectangles until a rectangle does fulfill the criteria defined as having the same
characteristic for every pixel.
This type of coding can be highly effective but it bears the problem of a nonlinear
method, which cannot be implemented in hardware. Therefore, the performance in terms
of compression time is not competitive, although the compression ratio is.
Each of these operations is in some part responsible for the compression. Image
modelling is aimed at the exploitation of statistical characteristics of the image (i.e. high
correlation, redundancy). Typical examples are transform coding methods, in which the
data is represented in a different domain (for example, frequency in the case of the
Fourier Transform, the Discrete Cosine Transform ,the Kahrunen-Loewe Transform, and
so on), where a reduced number of coefficients contains most of the original information.
In many cases this first phase does not result in any loss of information.
The aim of quantisation is to reduce the amount of data used to represent the information
within the new domain. quantisation is in most cases not a reversible operation: therefore,
it belongs to the so called 'lossy' methods.
Encoding is usually error free. It optimises the representation of the information (helping,
sometimes, to further reduce the bit rate), and may introduce some error detection codes.
A general transform coding scheme involves subdividing an NxN image into smaller nxn
blocks and performing a unitary transform on each sub image. A unitary transform is a
reversible linear transform whose kernel describes a set of complete, orthonormal discrete
basic functions. The goal of the transform is to decorrelate the original signal, and this
decorrelation generally results in the signal energy being redistributed among only a
small set of transform coefficients. In this way, many coefficients may be discarded after
quantisation and prior to encoding. Also, visually lossless compression can often be
achieved by incorporating the HVS contrast sensitivity function in the quantisation of the
coefficients.
• image subdivision
• image transformation
• coefficient quantisation
• Huffman encoding.
For a transform coding scheme, logical modelling is done in two steps: a segmentation
one, in which the image is subdivided in bidimensional vectors (possibly of different
sizes) and a transformation step, in which the chosen transform (e.g. KLT, DCT,
Hadamard) is applied.
Quantisation can be performed in several ways. Most classical approaches use 'zonal
coding', consisting in the scalar quantisation of the coefficients belonging to a predefined
area (with a fixed bit allocation), and 'threshold coding', consisting in the choice of the
coefficients of each block characterised by an absolute value exceeding a predefined
threshold. Another possibility, that leads to higher compression factors, is to apply a
vector quantisation scheme to the transformed coefficients.
This algorithm, developed by D.A. Huffman, is based on the fact that in an input stream
certain tokens occur more often than others. Based on this knowledge, the algorithm
builds up a weighted binary tree according to their rate of occurrence. Each element of
this tree is assigned a new code word, where at the length of the code word is determined
by its position in the tree. Therefore, the token which is most frequent and becomes the
root of the tree is assigned the shortest code. Each less common element is assigned a
longer code word. The least frequent element is assigned a code word which may have
become twice as long as the input token.
2.4.3Vector quantisation
• subdivide the training set into N groups (called 'partitions' or 'Voronoi regions'),
which are associated with the N codebook letters, according to a minimum
distance criterion;
• the centroids of the Voronoi regions become the updated codebook vectors;
• compute the average distortion: if the percent reduction in the distortion (as
compared with the previous step) is below a certain threshold, then STOP.
Once the codebook has been designed, the coding process simply consists in the
application of the T operator to the vectors of the original image. In practice, each group
of n pixels will be coded as an address in the vector codebook, that is, as a number from 1
to N.
2.4.4 Segmentation and approximation methods
During the last years, some standardization processes based on transform coding, such as
JPEG, have been started. Performances of such a standard are quite good if compression
factors are maintained under a given threshold (about 20 times). Over this threshold,
artifacts become visible in the reconstruction and tile effect affects seriously the images
decoded, due to quantisation effects of the DCT coefficients.
On the other hand, there are two advantages: first, it is a standard, and second, dedicated
hardware implementations exist. For applications which require higher compression
factors with some minor loss of accuracy when compared with JPEG, different
techniques should be selected such as wavelets coding or spline interpolation, followed
by an efficient entropy encoder such as Huffman, arithmetic coding or vector
quantisation. Some of these coding schemes are suitable for progressive reconstruction
(Pyramidal Wavelet Coding, Two Source Decomposition, etc). This property can be
exploited by applications such as coding of images in a database, for previewing purposes
or for transmission on a limited bandwidth channel.
2. 5 WAVELET COMPRESSION
The fundamental idea behind wavelets is to analyze the signal at different scales
localize a given signal in both space and scaling domains. A family of wavelets can be
wavelet is stretched or compressed to change the size of the window. In this way, big
wavelets give an approximate image of the signal, while smaller and smaller wavelets
zoom in on details. Therefore, wavelets automatically adapt to both the high frequency
and the low-frequency components of a signal by different sizes of windows. Any small
original signal, which means local mistakes are not influence the entire transform. The
wavelet transform is suited for nonstationary signals, such as very brief signals and
Wavelets are functions generated from one single function ψ, which is called
decomposition is
In image compression, the sampled data are discrete in time. It is required to have
discrete representation of time and frequency, which is called the discrete wavelet
transform (DWT).
Wavelet Transform (WT) was used to analyze non-stationary signals, i.e., whose
frequency response varies in time. Although the time and frequency resolution problems
are results of a physical phenomenon and exist regardless of the transform used, it is
possible to analyze any signal by using an alternative approach called the multi resolution
analysis (MRA). MRA analyzes the signal at different frequencies with different
resolutions. MRA are basically designed to give good time resolution and poor frequency
resolution at high frequencies and good frequency resolution and poor time resolution at
low frequencies. This approach is useful especially when the signal considered has high
frequency components for short durations and low frequency components for long
---------- (1)
Where * denotes complex conjugation. From this equation it can be seen how a function f
(t) is decomposed into a set of basis functions, Ψ s, τ (t) called the wavelets. The variables
s and t , scale and translation, are the new dimensions after the wavelet transform. For
--------- (2)
The wavelets are generated from a single basic wavelet (t), the so-called mother
---------- (3)
In (3) s is the scale factor is the translation factor and the factor s-1/2 is for energy
normalization across the different scales. It is important to note that in (1), (2) and (3) the
wavelet basis functions are not specified. This is a difference between the wavelet
transform and the Fourier transform, or other transforms. The theory of wavelet
transforms deals with the general properties of the wavelets and wavelet transforms only.
It defines a framework within one can design wavelets to taste and wishes.
2. 7 DISCRETE WAVELETS
The wavelet transform has three properties that make it difficult to use directly in
the form of (1). The first is the redundancy of the CWT. In (1) the wavelet transform is
calculating the correlation between the two. It is seen that these scaled functions is
nowhere near an orthogonal basis and the obtained wavelet coefficients is therefore be
Even without the redundancy of the CWT one still have an infinite number of
wavelets in the wavelet transform and would like to see this number reduced to a more
The third problem is that for most functions the wavelet transforms have no
analytical solutions and they can be calculated only numerically or by an optical analog
computer. Fast algorithms are needed to be able to exploit the power of the wavelet
transform and it is in fact the existence of these fast algorithms that have put wavelet
product of the CWT is the square of that of the signal and for most applications, which
seek a signal description with as few components as possible, this is not efficient. To
Discrete wavelets are not continuously scalable and translatable but can only be
scaled and translated in discrete steps. This is achieved by modifying the wavelet
---------- (4)
function. In (4) j and k are integers and s0 > 1 is a fixed dilation step. The translation
factor τ0 depends on the dilation step. The effect of discretizing the wavelet is that the
the sampling of the frequency axis corresponds to dyadic sampling. This is a very natural
choice for computers, the human ear and music for instance. For the translation factor the
value is usually chosen τ0 = 1 so that a dyadic sampling of the time axis is obtained.
When discrete wavelets are used to transform a continuous signal the result is be a
reconstruction. It is all very well to sample the timescale joint representation on a dyadic
grid, but if it is not be possible to reconstruct the signal it is not be of great use. As it
turns out, it is indeed possible to reconstruct a signal from its wavelet series
decomposition. It is proven that the necessary and sufficient condition for stable
reconstruction is that the energy of the wavelet coefficients must lie between two positive
bounds, i.e.
------- (5)
Where || f ||2 is the energy of f(t), A > 0, B < and A, B are independent of f(t). When (5) is
satisfied, the family of basis functions ψ j, k (t) with j, k € Z is referred to as a frame with
frame bounds A and B. When A = B the frame is tight and the discrete wavelets behave
exactly like an orthonormal basis. When A≠B exact reconstruction is still possible at the
expense of a dual frame. In a dual frame discrete wavelet transform the decomposition
The last step that has to taken is making the discrete wavelets orthonormal. This
can be done only with discrete wavelets. The discrete wavelets can be made orthogonal to
their own dilations and translations by special choices of the mother wavelet, which
means:
--------- (6)
--------- (7)
Equation (7) shows the inverse wavelet transform for discrete wavelets, which is not yet
seen. Orthogonal is not essential in the representation of signals. The wavelets need not
be orthogonal and in some applications the redundancy can help to reduce the sensitivity
discrete wavelets: the resulting wavelet transform is no longer shift invariant, which
means that the wavelet transforms of a signal and of a time-shifted version of the same
In many practical applications the signal of interest is sampled. In order to use the
results one have achieved so far with a discrete signal that have to make our wavelet
transform discrete too. Remember that our discrete wavelets are not time-discrete, only
the translation- and the scale step are discrete. Simply implementing the wavelet filter
bank as a digital filter bank intuitively seems to do the job. But intuitively is not good
enough.
Stated that the scaling function could be expressed in wavelets from minus
spectrum that is get a new scaling function, with a spectrum twice as wide as the first.
The effect of this addition is that one can express the first scaling function in terms of the
second, because all the information that is need to do this is contained in the second
scaling function. It can express this formally in the so-called multiresolution formulation
or two-scale relation
----------- (8)
The two-scale relation states that the scaling function at a certain scale can be
expressed in terms of translated scaling functions at the next smaller scale. Do not get
confused here: smaller scale means more detail. The first scaling function replaced a set
of wavelets and therefore one can also express the wavelets in this set in terms of
translated scaling functions at the next scale. More specifically it can be written for the
wavelet at level j. Which is the two-scale relation between the scaling function and the
wavelet.
--------- (9)
a scale j-1, this leads to the result that f (t) can also be expressed in terms of dilated and
--------- (10)
To be consistent in the notation discrete scaling functions are to be considered,
since only discrete dilations and translations are allowed. If in this equation one step up a
scale to j-1, it had to add wavelets in order to keep the same level of detail. It can then
-------- (11)
If the scaling function φ j, k (t) and the wavelets ψ j, k (t) are orthonormal or a tight
frame, then the coefficients λ j-1(k) and γ j-1(k) are found by taking the inner products
----------- (12)
If φ j ,k (t) and ψ j ,k (t) are replaced in the inner products by suitably scaled and
translated versions of manipulate a bit, keeping in mind that the inner product can also
be written as an integration,
--------- (13)
--------- (14)
These two equations state that the wavelet- and scaling function coefficients on a
certain scale can be found by calculating a weighted sum of the scaling function
coefficients from the previous scale. Now recall from the section on the scaling function
that the scaling function coefficients came from a low pass filter and recall from the
section on sub band coding how it is iterated a filter bank by repeatedly splitting the low-
pass spectrum into a low-pass and a high-pass part. The filter bank iteration started with
the signal spectrum, so if the signal spectrum is the output of a low-pass filter at the
previous (imaginary) scale, then the sampled signal can be considered as the scaling
function coefficients from the previous (imaginary) scale. In other words, the sampled
As known from signal processing theory a discrete weighted sum are the same as
a digital filter and since the coefficients λ j (k) come from the low-pass part of the splitted
signal spectrum, the weighting factors h (k) must form a low-pass filter. And since the
coefficients γ j (k) come from the high-pass part of the splitted signal spectrum, the
This means that they form one stage of an iterated digital filter bank and from
now on the coefficients h (k) is referred as the scaling filter and the coefficients g(k) as
filter bank is possible and from now on one can speak of the discrete wavelet transform
or DWT. Our intuition turned out to be correct. Because of this one are rewarded with a
useful bonus property of (13) and (14), the sub sampling property. One last look at these
two equations one see that the scaling and wavelet filters have a step-size of 2 in the
variable k. The effect of this is that only every other λ j(k) is used in the convolution, with
the result that the output data rate is equal to the input data rate. Although this is not a
new idea, it has always been exploited in sub band coding schemes, it is kind of nice to
of the section on the scaling function, of how to choose the width of the scaling function
spectrum. Because, every time the iterate the filter bank the number of samples for the
next stage is halved so that in the end one are left with just one sample (in the extreme
case). It is be clear that this is where the iteration definitely has to stop and this
Normally the iteration is stop at the point where the number of samples has
become smaller than the length of the scaling filter or the wavelet filter, whichever is the
longest, so the length of the longest filter determines the width of the spectrum of the
scaling function.
2. 8 WAVELET FILTER
With the redundancy removed, one still have two hurdles to take before, the wavelet
needed in the wavelet transform and save the problem of the difficult analytical solutions
Even with discrete wavelets it still needs an infinite number of scalings and
translations to calculate the wavelet transform. The easiest way to tackle this problem is
simply not to use an infinite number of discrete wavelets. Of course this poses the
question of the quality of the transform. Is it possible to reduce the number of wavelets to
The translations of the wavelets are of course limited by the duration of the signal
theory the compression in time is equivalent to stretching the spectrum and shifting it
upwards:
This means that a time compression of the wavelet by a factor of 2 is stretch the
frequency spectrum of the wavelet by a factor of 2 and also shift all frequency
components up by a factor of 2. Using this insight one can cover the finite spectrum of
our signal with the spectra of dilated wavelets in the same way as that one covered our
signal in the time domain with translated wavelets. To get a good coverage of the signal
spectrum the stretched wavelet spectra should touch each other, as if they were standing
Fig : Touching Wavelet Spectra resulting from scaling of mother wavelet in the time
domain
dilated wavelets can be seen as a band-pass filter bank. If one look at the ratio between
the center frequency of a wavelet spectrum and the width of this spectrum it is seen that it
is the same for all wavelets. This ratio is normally referred to as the fidelity factor Q of a
filter and in the case of wavelets one speaks therefore of a constant-Q filter bank
2. 9 SCALING FUNCTION
The scaling function was introduced by Mallat. It is sometimes referred to as the
averaging filter Because of the low-pass nature of the scaling function spectrum.
If the scaling function is considered as being just a signal with a low-pass spectrum,
---------- (15)
Since the scaling function (t) is selected in such a way that its spectrum neatly fitted
in the space left open by the wavelets, the expression (15) uses an infinite number of
wavelets up to a certain scale j as shown in figure 2.2. This means to analyze a signal
using the combination of scaling function and wavelets, the scaling function by itself
takes care of the spectrum otherwise covered by all the wavelets up to scale j, while the
rest is done by the wavelets. In this way limited the number of wavelets from an infinite
infinite number of wavelets and set a lower bound for the wavelets. Of course when using
a scaling function instead of wavelets, information is lost. That is to say, from a signal
representation point of view one do not loose any information, since it is still be possible
to reconstruct the original signal, but from a wavelet analysis point of view possible
valuable scale information is discarded. The width of the scaling function spectrum is
therefore an important parameter in the wavelet transform design. The shorter its
spectrum the more wavelet coefficients you is have and the more scale information. But,
as always, there is be practical limitations on the number of wavelet coefficients you can
handle. Later on, in the discrete wavelet transform this problem is more or less
automatically solved. The low-pass spectrum of the scaling function allows us to state
Which shows that the 0th moment of the scaling function cannot vanish.
Summarizing once more, if one wavelet can be seen as a band-pass filter and a
scaling function is a low pass filter, then a series of dilated wavelets together with a
2. 10 SUB-BAND ANALYSIS
A time-scale representation of a digital signal is obtained using digital filtering
Techniques. Recall that the CWT is a correlation between a wavelet at different scales
and the signal with the scale (or the frequency) being used as a measure of similarity. The
continuous wavelet transform was computed by changing the scale of the analysis
window, shifting the window in time, multiplying by the signal, and integrating over all
times. In the discrete case, filters of different cutoff frequencies are used to analyze the
signal at different scales. The signal is passed through a series of high pass filters to
analyze the high frequencies, and it is passed through a series of low pass filters to
information in the signal, is changed by the filtering operations, and the scale is changed
by up sampling and down sampling (sub sampling) operations. Sub sampling a signal
corresponds to reducing the sampling rate, or removing some of the samples of the signal.
For example, sub sampling by two refers to dropping every other sample of the signal.
Sub sampling by a factor n reduces the number of samples in the signal n times.
adding new samples to the signal. For example, up sampling by two refers to adding a
new sample, usually a zero or an interpolated value, between every two samples of the
signal by a factor of n.
Although it is not the only possible choice, DWT coefficients are usually sampled
from the CWT on a dyadic grid, i.e., s0 = 2 and ∏ 0 = 1, yielding s=2j and ∏ =k*2j . Since
the signal is a discrete time function, the terms function and sequence is be used
n is an integer.
The procedure starts with passing this signal (sequence) through a half band digital
low pass filter with impulse response h [n]. Filtering a signal corresponds to the
mathematical operation of convolution of the signal with the impulse response of the
A half band low pass filter removes all frequencies that are above half of the
highest frequency in the signal. For example, if a signal has a maximum of 1000 Hz
component, then half band low pass filtering removes all the frequencies above 500 Hz.
Nyquist’s rate (which is twice the maximum frequency that exists in the signal); that is,
the Nyquist’s rate corresponds to ∏ rad/s in the discrete frequency domain. Therefore
Hz. It should always be remembered that the unit of frequency for discrete time signals is
radians.
After passing the signal through a half band low pass filter, half of the samples
can be eliminated according to the Nyquist’s rule, since the signal now has a highest
frequency of ∏/2 radians instead of ∏ radians. Simply discarding every other sample is
sub sample the signal by two, and the signal is then have half the number of points. The
scale of the signal is now doubled. Note that the low pass filtering removes the high
frequency information, but leaves the scale unchanged. Only the sub sampling process
changes the scale. Resolution, on the other hand, is related to the amount of information
in the signal, and therefore, it is affected by the filtering operations. Half band low pass
filtering removes half of the frequencies, which can be interpreted as losing half of the
information. Therefore, the resolution is halved after the filtering operation. Note,
however, the sub sampling operation after filtering does not affect the resolution, since
removing half of the spectral components from the signal makes half the number of
samples redundant anyway. Half the samples can be discarded without any loss of
information. In summary, the low pass filtering halves the resolution, but leaves the scale
unchanged. The signal is then sub sampled by 2 since half of the number of samples is
Having said that, now looking at how the DWT is actually computed: The DWT
decomposing the signal into coarse approximation and detail information. DWT employs
two sets of functions, called scaling functions and wavelet functions, which are
associated with low pass and high pass filters, respectively. The decomposition of the
signal into different frequency bands is simply obtained by successive high pass and low
pass filtering of the time domain signal. The original signal x[n] is first passed through a
half band high pass filter g[n] and a low pass filter h[n]. After the filtering, half of the
samples can be eliminated according to the Nyquist’s rule, since the signal now has a
highest frequency of ∏ /2 radians instead of ∏. The signal can therefore be sub sampled
by 2, simply by discarding every other sample. This constitutes one level of
Where yhigh [k] and ylow [k] are the outputs of the high pass and low pass filters,
respectively, after sub sampling by 2. This decomposition halves the time resolution since
only half the number of samples now characterizes the entire signal. However, this
operation doubles the frequency resolution, since the frequency band of the signal now
spans only half the previous frequency band, effectively reducing the uncertainty in the
frequency by half. The above procedure, which is also known as the sub band coding, can
be repeated for further decomposition. At every level, the filtering and sub sampling is
result in half the number of samples (and hence half the time resolution) and half the
frequency band spanned (and hence double the frequency resolution). Figure 2.3
illustrates this procedure, where x [n] is the original signal to be decomposed, and h[n]
and g[n] are low pass and high pass filters, respectively. The bandwidth of the signal at
The Sub band Coding Algorithm as an example, suppose that the original signal
x[n] has 512 sample points, spanning a frequency band of zero to ∏ rad/s. At the first
decomposition level, the signal is passed through the high pass and low pass filters,
followed by sub sampling by 2. The output of the high pass filter has 256 points (hence
half the time resolution), but it only spans the frequencies ∏/2 to ∏ rad/s (hence double
the frequency resolution). These 256 samples constitute the first level of DWT
coefficients. The output of the low pass filter also has 256 samples, but it spans the other
half of the frequency band, frequencies from 0 to ∏/2 rad/s. This signal is then passed
through the same low pass and high pass filters for further decomposition. The output of
the second low pass filter followed by sub sampling has 128 samples spanning a
frequency band of 0 to ∏/4 rad/s, and the output of the second high pass filter followed
by sub sampling has 128 samples spanning a frequency band of ∏/4 to ∏/2 rad/s. The
second high pass filtered signal constitutes the second level of DWT coefficients. This
signal has half the time resolution, but twice the frequency resolution of the first level
signal. In other words, time resolution has decreased by a factor of 4, and frequency
resolution has increased by a factor of 4 compared to the original signal. The low pass
filter output is then filtered once again for further decomposition. This process continues
until two samples are left. For this specific example there would be 8 levels of
decomposition, each having half the number of samples of the previous level. The DWT
of the original signal is then obtained by concatenating all coefficients starting from the
last level of decomposition (remaining two samples, in this case). The DWT is then have
The frequencies that are most prominent in the original signal is appear as high
amplitudes in that region of the DWT signal that includes those particular frequencies.
The difference of this transform from the Fourier transform is that the time localization of
these frequencies is not be lost. However, the time localization is have a resolution that
depends on which level they appear. If the main information of the signal lies in the high
frequencies, as happens most often, the time localization of these frequencies is be more
precise, since they are characterized by more number of samples. If the main information
lies only at very low frequencies, the time localization is not be very precise, since few
samples are used to express signal at these frequencies. This procedure in effect offers a
good time resolution at high frequencies, and good frequency resolution at low
Two of the three problems mentioned in above section have now been resolved,
but one still does not know how to calculate the wavelet transform. If regarded the
wavelet transform as a filter bank, then considering the wavelet transforming a signal as
passing the signal through this filter bank. The outputs of the different filter stages are
the wavelet and scaling function transform coefficients. Analyzing a signal by passing it
through a filter bank is not a new idea and has been around for many years under the
name sub band coding. It is used for instance in computer vision applications.
The filter bank needed in sub band coding can be built in several ways. One way
is to build many band pass filters to split the spectrum into frequency bands. The
advantage is that the width of every band can be chosen freely, in such a way that the
spectrum of the signal to analyze is covered in the places where it might be interesting.
The disadvantage is that to design every filter separately and this can be a time
consuming process. Another way is to split the signal spectrum in two (equal) parts, a
low pass and a high-pass part. The high-pass part contains the smallest details that are
interested in and could stop here. However, the low-pass part still contains some details
and therefore it can be split again. And again, until a satisfactory number of bands are
Usually the number of bands is limited by for instance the amount of data or
computation power available. The process of splitting the spectrum is shown in figure
2.5. The advantage of this scheme is to design only two filters whereas the disadvantage
conditions and these are the properties, which gave wavelets their name. It can be shown
can be used to first analyze and then reconstruct a signal without loss of information. In
(17) Ψ(ω) stands for the Fourier transform of ψ (t) the admissibility condition implies
that the Fourier transform of (t) vanishes at the zero frequency, i.e.
----------- (18)
This means that wavelets must have a band-pass like spectrum. This is a very
A zero at the zero frequency also means that the average value of the wavelet in the time
dimensional. The time-bandwidth product of the wavelet transform is the square of the
input signal and for most practical applications this is not a desirable property. Therefore
one imposes some additional conditions on the wavelet functions in order to make the
wavelet transform decrease quickly with decreasing scale s. These are the regularity
conditions and they state that the wavelet function should have some smoothness and
concentration in both time and frequency domains. Regularity is a quite complex concept
0 for simplicity):
------- (20)
Here f (p) stands for the pth derivative of f and O(n+1) means the rest of the expansion.
Now, if the moments of the wavelet is defined by Mp, Mp = ∫ t p ψ(t) dt ------- (21) then it
-------- (22)
From the admissibility condition, already has that the 0th moment M0 = 0 so that the
first term in the right-hand side of (22) is zero. If it is now manage to make the other
moments up to Mn zero as well, then the wavelet transform coefficients (s, ) is decay as
fast as sn+2 for a smooth signal f(t). If a wavelet has N vanishing moments, then the
approximation order of the wavelet transform is also N. The moments do not have to be
exactly zero, a small value is often good enough. In fact, experimental research suggests
that the number of vanishing moments required depends heavily on the application.
Summarizing, the admissibility condition gave us the wave, regularity and vanishing
moments gave us the fast decay or the let, and put together they give us the wavelet.
2.12 MEASURING FREQUENCY CONTENT BY WAVELET
TRANSFORM
Wavelet transform is capable of providing the time and frequency information
interested in knowing what spectral component exists at any given instant of time, to
know the particular spectral component at that instant. In these cases it may be very
beneficial to know the time intervals these particular spectral components occur.
Wavelets (small waves) are functions defined over a finite interval and having an average
value of zero. The basic idea of the wavelet transform is to represent any arbitrary
function ƒ(t) as a superposition of a set of such wavelets or basis functions. These basis
functions are obtained from a single wave, by dilations or contractions (scaling) and
translations (shifts). The discrete wavelet transform of a finite length signal x(n) having N
transform .
widely used.
The procedure is as follows: wavelet has two functions “wavelet “and “scaling
function”. They are such that there are half the frequencies between them. They act like a
low pass filter and a high pass filter. Figure 2-6 shows a typical decomposition scheme.
The decomposition of the signal into different frequency bands is simply obtained by
successive high pass and low pass filtering of the time domain signal. This filter pair is
called the analysis filter pair. First, the low pass filter is applied for each row of data,
thereby getting the low frequency components of the row. But since the low pass filter is
a half band filter, the output data contains frequencies only in the first half of the original
that the output data now contains only half the original number of samples. Now, the
high8 pass filter is applied for the same row of data, and similarly the high pass
This is a non-uniform band splitting method that decomposes the lower frequency
part into narrower bands and the high-pass output at each level is left without any further
decomposition. This procedure is done for all rows. Next, the filtering is done for each
and HH (high-high). The LL band can be decomposed once again in the same manner,
thereby producing even more sub bands. This can be done up to any level, thereby
(a)
(b)
(c) (d)
(e)
Fig : (a) (b) (c) (d) (e) Pyramidal Decomposition of ‘Barbara’ image
The LL band is decomposed thrice as shown in figure 2.7(d). The compression ratios
iterations. The LL band at the highest level is most important, and the other 'detail' bands
are of lesser importance, with the degree of importance decreasing from the top of the
filters. The figure below shows the required synthesis or reconstruction filter bank, which
reverses the process of the analysis or decomposition filter bank of the forward process.
At each iteration, four scale j approximation and detail sub images are up sampled and
convolved with two one dimensional filters-one operating on the sub images columns and
the other on its rows. Addition of the results yields the scale j +1 approximation, and the
process is repeated until the original image is reconstructed. The filters used in the
Rows
Fig : The Inverse wavelet Transform
representations to each other. The direct Fourier transform (or simply the Fourier
variant. The inverse Fourier transform finds the time-domain representation from the
frequency domain.
exist.
is called the inverse Fourier transform of F(ω).
The Fourier transform of f is therefore a function F{f(t)} of the new variable ω. This
function, evaluated at ω, is F(ω).
Wavelet algorithms are recursive. The output of one step of the algorithm becomes the
input for the next step. The initial input data set consists of 2n elements. Each successive
step operates on 2n-i elements, were i = 1 ... n-1. For example, if the initial data set
contains 128 elements, the wavelet transform will consist of seven steps on 128, 64, 32,
16, 8, 4, and 2 elements.
On this web page stepj+1 follows stepj. If element i in step j is being updated, the notation
is stepj,i. The forward lifting scheme wavelet transform divides the data set being
processed into an even half and an odd half. In the notation below even i is the index of
the ith element in the even half and oddi is the ith element in the odd half . Viewed as a
continuous array (which is what is done in the software) the even element would be a[i]
and the odd element would be a[i+(n/2)].
Another way to refer to the recursive steps is by their power of two. This notation is used
in Ripples in mathematics. Here stepj-1 follows stepj, since each wavelet step operates on
a decreasing power of two. This is a nice notation, since the references to the recursive
step in a summation also correspond to the power of two being calculated.
The wavelet Lifting Scheme is a method for decomposing wavelet transforms into a set
of stages. Lifting scheme algorithms have the advantage that they do not require
temporary arrays in the calculation steps, as is necessary for some versions of the wavelet
algorithm. Lossless compression is a compression technique that does not lose any data in
the compression process. Lossless compression "packs data" into a smaller file size by
using a kind of internal shorthand to signify redundant data. If an original file is 1.5MB
(megabytes), lossless compression can reduce it to about half that size, depending on the
type of file being compressed. This makes lossless compression convenient for
transferring files across the Internet, as smaller files transfer faster. Lossless compression
is also handy for storing files as they take up less room. The zip convention, used in
programs like WinZip, uses lossless compression. For this reason zip software is popular
for compressing program and data files. That's because when these files are
decompressed, all bytes must be present to ensure their integrity. If bytes are missing
from a program, it won't run. If bytes are missing from a data file, it will be incomplete
and garbled. GIF image files also use lossless compression. Lossless compression has
advantages and disadvantages.
The advantage is that the compressed file will decompress to an exact duplicate of the
original file, mirroring its quality. The disadvantage is that the compression ratio is not all
that high, precisely because no data is lost. To get a higher compression ratio -- to reduce
a file significantly beyond 50% -- you must use lossy compression. Lossy compression
will strip a file of some of its redundant data. Because of this data loss, only certain
applications are fit for lossy compression, like graphics, audio, and video. Lossy
compression necessarily reduces the quality of the file to arrive at the resulting highly
compressed size, but depending on the need, the loss may acceptable and even
unnoticeable in some cases. JPEG uses lossy compression, which is why converting a
GIF file to JPEG will reduce it in size. It will also reduce the quality to some extent.
Lossless and lossy compression have become part of our every day vocabulary largely
due to the popularity of MP3 music files. A standard sound file in WAV format,
converted to a MP3 file will lose much data as MP3 employs a lossy, high-compression
algorithm that tosses much of the data out.
This makes the resulting file much smaller so that several dozen MP3 files can fit, for
example, on a single compact disk, verses a handful of WAV files. However the sound
quality of the MP3 file will be slightly lower than the original WAV, noticeably so to
some. As always, whether compressing video, graphics or audio, the ideal is to balance
the high quality of lossless compression against the convenience of lossy compression.
Choosing the right lossy convention is a matter of personal choice and good results
depend heavily on the quality of the original file.
CHAPTER 3
WAVELET-LIFTING SCHEME
The lifting scheme is a new method for constructing wavelets. The main difference with
classical constructions is that it is does not rely on the Fourier transform. This way,
lifting can be used to construct second generation wavelets, i. e., wavelets which are not
necessarily translations and dilations of one function. The latter we refer to as first
generation wavelets or classical wavelets. Since the lifting scheme does not depend on
the Fourier transform, it has applications in the following examples:
- γ j,k
λ j+1,k
split Predict Update
+
λ j,k
+
+
Figure : Lifting scheme
where negative indices are used because the convention is that the smaller the data set,
the smaller the index. Information lost should also be kept track of. In other words, which
extra information is needed to recover the original set{λ0,k}from the set{ λ-1,k}.
Coefficients {γ-1,k}are used to encode this difference and refer to them as wavelet
coefficients. Many different choices are possible and, depending on the statistical
behavior of the signal, one will be better than the other. Better means smaller wavelet
coefficients. The most naive trivial choice would be to say that the lost information is
simply contained in the odd coefficients, γ-1,k = λ0,2k+1 for k Є Z. This choice corresponds
to the Lazy wavelet. Indeed, not much is done except for sub sampling the signal in even
and odd samples. Obviously this will not decorrelate the signal. The wavelet coefficients
are only small when the odd samples are small and there is no reason what so ever why
this should be the case. No restriction should be imposed on how the data set should be
split, nor on the relative size of each of the subsets. Simply a procedure is needed to join
{λ-1,k} and {γ-1,k} again into the original data set {λ0,k}. The easiest possibility for the split
is a simply brutal cut of the data set into two disjoint parts, but a split between even and
odd samples is a better choice. Choice of Lazy wavelet is better. The next step, the
predict, will help to find a more elaborate scheme to recover the original samples {λ 0,k}
from the sub sampled coefficients {λ-1,k}.
3.1.2 Predict phase
A more compact representation of {λ0,k}should be obtained. Consider the case where
{λ-1,k} does not contain any information (e. g. that part of the signal is equal to zero).
Then a more compact representation is obtained since {λ0,k}can be replaced with the
smaller set {λ-1,k}.Indeed, the extra part needed to reassemble {λ0,k} does not contain any
information. The previous situation hardly ever occurs in practice. Therefore, a way is
needed to find the odd samples {γ-1,k}.The even samples {λ0,2k} can immediately be found
as λ0,2k = λ-1,k. On the other hand the odd samples {λ0,2k+1}are predicted based on the
correlation present in the original data. If prediction operator P can be found independent
of the data, so that
γ-1.k = P(λ-1,k)
then again original data set can be replaced with {λ-1,k}, now missing part can be
predicted to reassemble {λ0,k}. The construction of the prediction operator is typically
based on some model of the data which reacts its correlation structure. Obviously, the
prediction operator P cannot be dependent on the data, otherwise the information would
be hidden in P.
Again, in practice, it might not be possible to exactly predict {γ-1,k} based on {λ-1,k}.
However, P(λ-1,k) is likely to be close to {γ-1,k}. Thus, {γ-1,k} is replaced with the
difference between itself and its predicted value P(λ-1,k). If the prediction is reasonable,
this difference will contain much less information than the original {γ-1,k} set. This
abstract difference operator is represented with a - sign and thus get
γ-1,k := λ0,2k+1 - P(λ-1,k)
The wavelet subset now encodes how much data deviates from the model on which P was
built. If the signal is some how correlated, the majority of the wavelet coefficients is
small. An insight is obtained on how to split the original data set. Indeed, in order to get
maximal data reduction from prediction, subsets {λ-1,k} and {γ-1,k}should be maximally
correlated. Cutting the signal into left and right parts might not be the best idea since
values on the far left and the far right are hardly correlated. Predicting the right half of the
signal based on the left is thus a tough job. A better method is to interlace the two sets, as
done in the previous step. Now , the original data set can be replaced with the smaller set
{λ-1,k} and the wavelet set {γ-1,k}. With a good prediction, the two subsets {λ-1,k,γ-1,k} yield
a more compact representation than the original set {λ0,k}.To find a good prediction
operator, again maximal correlation is assumed among neighboring samples. Hence odd
sample λ0,2k+1 can be predicted as the average of its two (even) neighbors: λ-1,k and λ-1,k+1.
The model used to build P is a function piecewise linear over intervals of length 2. If the
original signal complies with the model, all wavelet coefficients in {γ-1,k} are zero. In
other words, the wavelet coefficients measure to which extent the original signal fails to
be linear. Their expected value is small. In terms of frequency content, the wavelet
coefficients capture high frequencies present in the original signal. These wavelet
coefficients are used. They encode the detail needed to go from the {λ-1,k}coefficients to
the{λ0,k}. They capture the high frequencies present in the original signal while the
{λ-1,k}some how capture the low frequencies. This scheme can now be iterated . Split
{λ-1,k} into two subsets {λ-2,k}and{γ-2,k} (by sub sampling) and then replace {γ-2,k}with the
difference between {γ-2,k}and P(λ-2,k. After n steps, the original data set is replaced with
the wavelet representation. {λ-n,k ,γ-n,k …….,γ-1,k}Given that the wavelet sets encode the
difference with some predicted value based on a correlation model, this is likely to give a
more compact representation.
Different prediction functions
The prediction does not necessarily have to be linear. Failure can be found to be cubic
and any other higher order. This introduces the concept of interpolating subdivision. An
extension of original sampled function is defined to a function defined on the whole real
line. Some value N is used to denote the order of the subdivision (interpolation) scheme.
For instance, to find a piecewise linear approximation, use N equal to 2. To find a cubic
approximation N should be equal to 4. It can be seen that N is important because it sets
the smoothness of the interpolating function used to find the wavelet coefficients (high
frequencies). This function is referred as the dual wavelet and to N as the number of dual
vanishing moments.
value is then simply given by the evaluation of this polynomial at the new, refined
location. The algorithm that best adapts to the interpolating subdivision scheme is
Neville's algorithm. Notice also that nothing in the definition of this procedure requires
the original samples to be located at integers. This feature can be used to define scaling
functions over irregular subdivisions, which is not part of the scope of this paper. This
interpolation scheme allows to easily accommodate interval boundaries for finite
sequences. For the cubic construction described 1 sample is taken on the left and 3 on the
right at the left boundary of an interval. The cases are similar at the right boundary. As
soon the calculation of new γ values start near the right boundary, will be having less λ
coefficients on the right side and more on the left. If the γ coefficient is at the right
boundary, there are no λ coefficients on the right. All of them will be on the left. A list of
all the possible cases when N = 4 is the following:
Case 1: Near Left Boundary: More λ coefficients on the right side of the γ coefficient
than on the left side.
1λ on the left and 3 λ's on the right (remember that due to the splitting, always λ is in the
first position)
Case 2: Middle: Enough λ coefficients on either side of the γ coefficient.
2 λ's on the left and 2 λ's on the right
Case 3: Near Right Boundary: More λ coefficients on the left side of the λ coefficient
than on the right side.
3 λ's on the left and 1 λ on the right
4 λ's on the left and 0 λ's on the right
Using the interpolation scheme and Neville's algorithm, a set of coefficients are generated
that will help to find the correct approximation using a function of order N -1. For
example, if N = 2, then two coefficients are needed for the two possible cases (one λ on
the left and one on the right, and 2 λ's on the left and none on the right).If N = 4, four
coefficients are needed for each one of the four cases as mentioned. These coefficients
will be called filter coefficients.
Due to symmetry, it is known that all the cases on the right side are the opposite to the
cases on the left side .For example, the coefficients used for the case 3 λ's on the left and
1 λ on the right are the same as the ones used in the case 1λ on the left and 3λ's on the
right", but in opposite order. Thus, a total of N/2+1 different cases (one for the middle
case and N=2 for the symmetric boundary cases. That is, when there are two λ's on either
side and when there are one λ on the left and three λ's on the right. They are referred as
cases (a) and (b).Since there is a unique cubic interpolation (it does not matter how
separated the samples are, always they have the same interpolating cubic function), the
set of coefficients that will help to predict any γ every time should be known.
The basic idea is the following: N is equal to 4; therefore, there are 4 coefficients for
every case. To calculate, c1 put its value to 1 and all the other three, c2, c3 and c4, to
zero. Construct the polynomial that best fits the available resources and start evaluating
the function at the points. For case (a) evaluate the function where two coefficients are to
the left and two to the right. For case (b) evaluate the function where there is one
coefficient on the left and three on the right. The procedure is the same with the other
coefficients. Tables list the filter coefficients needed for the interpolation with N = 2 and
4. One property of these filter coefficients is that every set of N coefficients for every
case adds up to 1.The prediction phase thus gets reduced to a lookup in the previous
tables in order to be able to calculate the wavelet coefficients. For example, if to predict a
γ value using N = 4 and three λ coefficients on the left and one λ on the right, we would
perform the following operation
γ-j,k = λ-j+1,k = (0.0625*λ-j,k-3 – 0.3125*λ-j,k-2 + 0.9375 * λ-j,k-1 + 0.3125*λ-j,k+1)
The prediction of other γ coefficients would be a similar process except the use of the
neighboring λ coefficients and the corresponding filter coefficients.
cases coefficients
The wavelet coefficients have been calculated. However, we are not very pleased with
the choice of the{λ-1,k}. The reason is the following. Suppose we are given 2n +1 original
samples {λ0,k 0≤׀k≤2n}. This scheme could be applied (split and predict) n times thus
obtaining{γj,k׀-n≤j≤-1,0≤k≤2n+j}and two (coarsest level) coefficients λ-n,0 and λ-n,1.These
are the first (λ-n,0=λ0,0) and the last (λ-n,1=λ0.2n)original samples. This introduces
considerable aliasing. Some global properties of the original data set should be
maintained in the smaller version{λ-j,k} . For example, in the case of an image, the smaller
images {λ-j,k}should have the same overall brightness, i.e., the same average pixel value.
Therefore the last values should be the average of all the pixel values in the original
image. Part of this problem can be solved by introducing a third stage: the update.
3.1.3 Update phase
Lift the λ-1,k with the help of the wavelet coefficients γ-1,k. Again neighboring wavelet
coefficients are used. The idea is to find a better λ-1,k so that a certain scalar quantity Q(),
e. g., the mean, is preserved, or
Q(λ-1,k)=Q(λ0,k)
This could be done by finding a new operator to extract λ-1,k directly from λ0,k but not
done for two reasons. First, this would create a scheme which is very hard to invert.
Secondly, it would be better to reuse the work already done maximally. Therefore, the
proposed system uses the already computed wavelet set {γ-1,k} to update{ λ-1,k }so that the
latter preserves Q(). In other words, an operator U is constructed and update { λ-1,k } as
λ-1,k = λ-1,k +U(γ-1,k )
find a scaling function using the previously calculated wavelet coefficients in order to
maintain some properties among all the λ coefficients throughout all levels. One way is to
set all λ0,k to zero except for λ0,0 which is set to one. Then, the interpolating subdivision ad
infinitum. The resulting function is φ(x), the scaling function, which will help to create a
real wavelet that will maintain some desired properties from the original signal. This
function will have an order depending of some (even) value Ñ, which is not necessarily
equal to N. We will call Ñ the number of real vanishing moments. The higher the order of
this function, the less aliasing effect is seen in the resulting transform. The basic
properties to be preserved are the moments of the wavelet function, ψ at every level. One
of the things known from the properties of wavelets, is that the integral of ψ along the
real line from must be equal to zero. This is also true for higher moments. Thus,
Basically want to preserve up to Ñ-1 moments of the λ's at every level and use this
information to see how much of every coefficient is needed to update every λ. These
update values are named lifting coefficients. Before starting the algorithm to calculate the
lifting coefficients, first need to initialize the moments information for every coefficient
at the first level. The integral is set to one for all the coefficients because all the filter
coefficients for each λ add to one. The initial values for the higher order moments are
calculated using the coefficient indices as shown in the table below. Table 2: Initial
moments using index k
Once the moments are initialized, the following steps can be applied.
1.Check for the λ's that contributed to predicting every γ and see how much this
contribution was. (These values are given by the filter coefficients found in the prediction
stage.)
2. Update the moments for every λ at the current level with the following equation,
mj,k=mj,k + fj*ml,k
where j is the index relative to a λ coefficient, f(j) is its corresponding filter coefficient
(0 < j ≤ N), k is the moment being updated (0 < k ≤ Ñ), and l is the index relative to a
coefficient.
3. Knowing that all the moments must be zero at every level, a linear system can be
constructed to find the lifting coefficients for every . The steps are:
(a) Put a one in a γ coefficient and zero in all the remaining γ's.
(b) Apply an inverse transform one step up to see how much this is contributing to the λ's
that update it and create a linear system of Ñ x Ñ variables
(c) Solve the system and find the set of lifting coefficients for the γ coefficient with value
set to one.
This linear system is built and solved for every coefficient to find its corresponding set
of lifting coefficients. After applying the previous steps, we have a set of Ñ lifting
coefficients for every at every level. These values are used to apply the update operator,
U, to the λ coefficients before iterating to the next level. To update the λ's, position at a
λj,k coefficient and take its corresponding lifting coefficients, e.g. (a,b) for Ñ= 2.Identify
the λ's which were affected by this γ , e. g. λ-j,k-1 and λ-j,k+1. Now,
Then, move to the next and do the same. An example of the split, predict and update
phases for a 1-D signal with length L = 8, N = 2 and Ñ= 2 follows. First, consider the
split and predict:
λ1 λ2 λ3 λ4 λ5 λ6 λ7 λ8
γ1 γ2 γ3 γ4
γ1 uses λ1 and λ3 for prediction. Similarly, γ2 uses λ3 and λ5, γ3 uses λ5 and λ7, and γ4 uses
λ5 and λ7. The second stage, the update, is performed. In this example, the following
lifting coefficients ((a,b) pairs) are obtained,
γ1 γ2 γ3 γ4
(2/5,1/5) (0,2/3) (4/15,1/5) (-2/15,2/5)
λ1 λ3 λ5 λ7
λ1 uses a from γ1 for updating. Similarly, λ3 uses b from γ1 and a from γ2; λ5 uses b from
γ2 a from γ3, and a from γ4; and λ7 uses b from γ3 and b from γ4.
At the next level, the coefficients get organized as follows after the split and predict
stages.
λ1 λ3 λ5 λ7
γ1 γ3
γ1 uses λ1 and λ5, and γ2 uses λ1 and λ5 for prediction.
γ1 γ2
(1/2,0.214286) (-1/3,0.476190)
λ1 λ5
In the update stage ,λ1 uses a from γ1 and a from γ2, and λ5 uses b from γ1 and b from γ2
for updating.
It is important to note that for a longer signal, the lifting coefficients are going to be
(1/4,1/4) for all the λ's unaffected by the boundaries. Using these values, the λ
coefficients can be updated with the following equation,
λ-1,k= λ-1,k + ¼* γ-1,k-1 + ¼ * γ-1,k
The three stages of lifting described by Equations and depicted in the block diagram are
combined and iterated to generate the 1-D fast lifted forward wavelet transform
algorithm:
{λj,k, γj,k = split(λj+1,k )
For j= -1 down to –n γj,k -= P (λj,k )
λj,k +=U (γj,k )
one of the nice properties of lifting can be illustrated: once forward transform is
performed, immediately inverse can be derived. Just have to reverse the operations and
toggle + and -. This leads to the following algorithm for the inverse transform:
λj,k -=u(γj,k )
For j= -n to-1 γj,k +=p(λj,k )
λj+1,k =join(λj,k ,γj,k )
To calculate the total number of iterations of this transform, three factors have to be
considered: the signal length (L), the number of dual vanishing moments (N), and the
number of real vanishing moments (Ñ). It can be proven that the total number of
iterations is given by,
N=[log2((L-1)/(Nmax -1))]
where Nmax = max(N,Ñ). It can be seen from Equation 6 that the size of the signal does
not matter, i.e., signals do not necessarily have to have dyadic dimensions. The
interpolating subdivision guarantees correct treatment of the boundaries for every case.
An extension of the 1-D algorithm for 2-D signals is a simple repetitive scheme of the 1-
D transform through rows and columns, as the transform is separable. For better support
of frequencies, the application of the square 2-D method is proposed. The basic idea is to
apply the 1-D transform to all the rows first and, afterwards, to all the columns. This is
done at every level in order to create a square window transform that gives better
frequency support than a rectangular window transform. Different filter and lifting
coefficients are used for each dimension (X,Y ) if they are different. Using the filter
coefficients (1/2,1/2) and lifting coefficients (1/4,1/4), the wavelet transform presented
here is the (N = 2, Ñ= 2) biorthogonal wavelet transform of Cohen-Daubechies-
Feauveau. This simple example already shows how the lifting scheme can speed up the
implementation of the wavelet transform. Classically, the {λ-1,k}coefficients are found as
the convolution of the {λ0,k} coefficients with the filter
H={-1/8,1/4,3/4,1/4,-1/8}
This step would take 6 operations per coefficient while lifting only needs 3.
λj,k
+
Design approach
4.1 DESIGN CONSIDERATION
major parts;
transforms.
back.
The design unit implements the Embedded zero-tree wavelet coding system for
data compression. The coding system reads the multiresolution component of the image
obtain from the transformation module and pass the data to the decoder unit to retrive the
image back. Figure below shows the implemented embedded zero tree wavelet coding
Fig 4.9 shows the block diagram of JPEG 2000 coding system used for
Source Image
Wavelet Quantizer
Encoder
transformation
Compressed data
Retrieved Image
To perform the forward DWT the JPEG2000 system uses a one-dimensional (1-
D) subband decomposition of a 1-D set of samples into low-pass and high-pass samples.
and High-pass samples represent a down-sampled residual version of the original set.
The transformation uses the convolution based filering mode with the process
in the image data with a finite (preferably small) set of values. The input to a quantizer is
the original data, and the output is always one among a finite number of levels. The
quantizer is a function whose set of output values are discrete, and usually finite.
grayscale and color information are discarded. Each transformed coefficient is divided by
its corresponding element in a scaled quantization matrix, and the resulting numerical
value is rounded. The default quantization matrices for luminance and chrominance are
specified in the JPEG standard, and were designed in accordance with a model of human
perception. The scale factor of the quantization matrix directly affects the amount of
image compression, and the lossy quality of JPEG compression arises as a direct result of
A quantizer can be specified by its input partitions and output levels (also called
reproduction points). If the input range is divided into levels of equal spacing, then
Uniform Quantizer. A uniform quantizer can be easily specified by its lower bound
and the step size. Also, implementing a uniform quantizer is easier than a non-
uniform quantizer. For example in Fig 4.11 if the input falls between n*r and (n+1)*r,
Just the same way a quantizer partitions its input and outputs discrete levels, a
Dequantizer is one which receives the output levels of a quantizer and converts them into
normal data, by translating each level into a 'reproduction point' in the actual range of
data. It can be seen from literature, that the optimum quantizer (encoder) and optimum
• Given the output levels or partitions of the encoder, the best decoder is one that
puts the reproduction points x' on the centers of mass of the partitions. This is
• Given the reproduction points of the decoder, the best encoder is one that puts the
partition boundaries exactly in the middle of the reproduction points, i.e. each x is
translated to its nearest reproduction point. This is known as nearest neighbour
condition.
(Range) R = max (I)-min (I). ‘b’ indicate the number of bit outputted for every step. The
quantization carried out on thresholding operation. For every value of the image element
fed to the quantizer an equivalent binary sequence is passed as output which is passed to
using an Entropy Coder to give additional compression. By entropy, it means the amount
of information present in the data, and an entropy coder encodes the given set of symbols
with the minimum number of bits required to represent them. Various algorithms were
proposed for the coding of image among which huffman coding is found to be more
repetition. The general concept is to assign the most used bytes fewer bits, and the least
used bytes more bits. First, the most used bytes in the image are assigned a variable
length binary code. The more often the byte is used the shorter the control code. The less
The decoder unit decodes the encoded data bit stream from the encoder module.
The decoder unit performs the reverse operation to the encoder process. This unit shares
the same code word used under encoding from the code book.
The Huffman decoder block carries out decoding reading the unique code bits passed in
place of the data bit. The data bits are received in serial format and compared with the
unique word. Equivalent data bits are passed out whenever there is a matching of the
unique word. For decoding of ‘m’ block of data bits a minimum of 2 m-1 iterations are
4.2.5 DEQUANTIZER
The dequantizer unit dequantizer the decoded data bits. The dequantization
operation is carried in the reverse manner to the quantization. The dequantizer takes the
same step sizes as in quantization from the quantization table. The reconstructed data are
not exactly recovered to the original image which makes the system a lossy compression
system.
4.2.6 INVERSE TRANSFORMATION
The inverse Transforamtion is carried out in a similar fashion to the one explained
PROPOSED SYSTEM:
Source Image
Wavelet Lifting
Pre-Processor Transformation Coding
Compressed data
Retrieved image
Before the processing of image data the image are preprocessed to improve the
rate of operation for the coding system. Under preprocessing tiling on the original image
is carried out. The term “tiling” refers to the partition of the original (source) image into
though they were entirely distinct images. All operations, including component mixing,
wavelet transform, quantization and entropy coding are performed independently on the
image tiles. The tile component as shown in Fig 4.2 is the basic unit of the original or
reconstructed image. Tiling reduces memory requirements, and since they are also
reconstructed independently, they can be used for decoding specific parts of the image
instead of the whole image. All tiles have exactly the same dimensions, except maybe
those at the boundary of the image. Arbitrary tile sizes are allowed, up to and including
the entire image (i.e., the whole image is regarded as one tile).
Original imageC
This unit Transforms the input image from time domain to frequency domain and
decomposes the original image into its fundamental components. The transformation is
performed using Debuchie wavelet transform. Wavelet transform is a very useful tool for
dimensional discrete wavelet transform (1-D DWT) decomposes an input sequence into
two components (the average component and the detail component) by calculations with
a low-pass filter and a high-pass filter. Two-dimensional discrete wavelet transform (2-D
DWT) decomposes an input image into four sub-bands, one average component (LL) and
The wavelet transform uses filter banks shown in Fig 4.5 for the decomposition of
preprocessed original image into 3 details and 1 approximate coefficient. 2-D DWT is
achieved by two ordered 1-D DWT operations (row and column). Initially the row
The filtering is carried out by convolving the input image with the filter
coefficients passed. Each decomposing stage consists of a pair of high pass and a low
pass filter. These filters isolate the highly varying and low varying components from the
given image. Fig 4.5 (a) shows the original image used for decomposition into
fundamental subbands using filter bands as shown in Fig 4.4. Fig 4.5 (d) shows the 3level
decomposition of the original image. The approximate coefficient obtained at each level
2nd level
detailed
coefficient
It should be possible to represent the detail more efficiently. Note that if the original
signal is a constant, then all details are exactly zero.
4.5.3 Update:
One of the key properties of the coarser signals is that they have the same average value
as the original signal, i.e., the quantity
is independent of j. This results in the fact that the last coefficients s0,0 is the DC
component or overall average of the signal. The update stage ensures this by letting
All this can be computed in-place: the even locations can be overwritten with the
averages and the odd ones with the details. An abstract implementation is given by:
These three stages are depicted in a forward lifting scheme we can immediately build the
inverse scheme, Again we have three stages:
4.5.6 Merge:
Now that we have the even and odd samples we simply have to zipper them together to
recover the original signal. This is the inverse Lazy wavelet:
sj = Merge(evenj-1, oddj-1)
assuming that the even slots contain the averages and the odd ones contain the difference,
the implementation of the inverse transform is:
evenj-1 -= U(oddj-1);
oddj-1 += P(evenj-1);
sj := Merge(oddj-1, evenj-1)
The inverse transform is thus always found by reversing the order of the operations and
flipping the signs.
obtained image values. The image data trasnformed and decomposeed under encoding
side is rearranged from higher level decomposition to lower level with the highest
decomposed level been arranged at the top. From the highest level of decomposition the
LL2 HL2
LL1 HL1
LH2 HH2 HL1
Retrieved Image
The reconstuction of the decompsed image is carried out by iteratively repeating the filter
banks followed by upsampling by 2 and then combining the two obained filtered
components, each sub level addition gives the approximate coefficient of the upper level
on a total reconstruction the final addition gives the reconstructed image back. Fig 4.7
shows the reconstuction of the obtained decomposed component for a two level scaling.
D1
D2
Retrieved
Image
D11 D3
D22
D23
APP3
This unit reforms the image from the obtained tiles by placing them in sequence
as 8x8 blocks for the complete image dimension. These tiles are aligned in same
Reconstructed tile
Reconstructed image
Fig : Reconstruction of Image from tile
Wavelet transform
Separate Even
even value
values matrix
Mat
rix
valu Split Predict Update
es
Separate
Odd value Prediction
odd
matrix function
values
Transformed
matrix
Inverse wavelet transform using lifting scheme FLOW CHART
Inverse Wavelet
transform
Even
value
matrix
Trans
forme
d Update Predict Merge
matri
x
Prediction Odd value
function matrix
Original
matrix
CHAPTER 5
RESULTS AND DISCUSSION
In the above screen first the input image is read or taken. In this case tif image is taken as
input
Read input button is clicked to get the input image.
The input image which is taken is shown above. It is 256 x 256 tif image.
After reading the image wavelet method button is pressed and the compressed image
after applying wavelet transform is obtained.
The above image is the retrieved image after lifting scheme method is applied on original
image.
The error rate of the wavelet compression method and the lifting scheme is compared in
the above graph.
5.2 Case II: A 307 x 593 tif image
This project implements a method to optimize wavelet function for lossless data
compression using lifting scheme. The project work realized a optimal data compression
system using lifting scheme which compress the image in a lossless manner retaining the
accuracy. The lifting scheme is realized in a modular approach in Matlab platform with
three major blocks mainly split, predict, update. The observations were carried out for
various types of images with different formats and observed that the lifting scheme
provides a considerable accuracy as compared to its counterpart wavelet transform with
quantization. The lifting scheme retains the level of compression compared to wavelet
transformation. From all made observations it is concluded that the proposed lifting
scheme for lossless compression provides considerable accuracy maintaining
compression level as compared to wavelet transform.
The proposed scheme can be further enhanced for high rate of compression for more
accuracy using advances methods such as genetic algorithm .The method could also be
extended for analysis of this method for various bitrate applications.
CHAPTER 7
REFERENCES
1. A.Alecu, A.Munteanu, P.Schelkens, J.Cornelis, and S.Dewitte,"Wavelet-based
infinite scalable coding," IEE Electronics Letters, vol. 38, no. 22, pp. 1338-1340,
2002.
2. R. Ansari, N. Memon, and E. Ceran, "Near-lossless Image Compression
Techniques," Journal of Electronic Imaging, vol. 7, no. 3, pp. 486-494, July 1998.
3. M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, "Image Coding Using
Wavelet Transform," IEEE Transactions on Image Processing, vol. 1, pp. 205-
220, April 1992.
4. A. R. Calderbank, I.Daubechies, W.Sweldens, and B.L.Yeo, "Wavelet
Transforms that Map Integers to Integers," Journal of Applied Computational
Harmonics Analysis,vol. 5, pp. 332-369, 1998.
5. I.Daubechies,"Orthonormal bases of compactly supported wavelets,"
Communications on Pure and Applied Mathematics, vol. 41, pp. 909-996, 1988.
6. I Daubechies and W.Sweldens, "Factoring Wavelet Transforms into Lifting
Steps," Journal of Fourier Analysis and Applications, vol. 4, no. 3, pp. 247-269,
1998.
7. A. Munteanu, J. Cornelis, G. V. d. Auwera, and P. Cristea, "Wavelet-based
lossless compression scheme with progressive transmission capability,"
International Journal of Imaging Systems and Technology, vol. 10, no. 1, pp. 76-
85, 1999.
8. A. Munteanu, J. Cornelis, and P. Cristea, "Wavelet-Based Lossless Compression
of Coronary Angiographic Images," IEEE Transactions on Medical Imaging,
vol.18, no. 3, pp. 272-281, 1999.
9. W. Sweldens and P. Schróder: Building your own wavelets at home, In “Wavelets
in Computer Graphics”,ACM SIGGRAPH Course Notes (1996).