Sei sulla pagina 1di 6

Wavelet-Based Image Compression using Mathematical

Morphology and Self Organizing Feature Map


Abdul Adeel Mohammed
Dept. of Electrical and Computer Engineering
Ryerson University
Toronto, ON, Canada
adeel@ee.ryerson.ca

Javad Alirezaie
Dept. of Electrical and Computer Engineering
Ryerson University
Toronto, ON, Canada
javad@ee.ryerson.ca

Abstract - Image compression using wavelet transform


results in an improved compression ratio as well as image
quality. Wavelet transform is the only method that provides
both spatial and frequency domain information. These
properties of wavelet transform greatly help in
identification and selection of significant and nonsignificant coefficients amongst the wavelet coefficients. In
this paper we present a wavelet based image compression
system using mathematical morphology and self organizing
feature map (MMSOFM). The significance map is
preprocessed using mathematical morphology operators to
identify and create clusters of significant coefficients. A
self-organizing feature map (SOFM) is then utilized to
encode the significance map. Experimental results and
comparisons with the JPEG are made to emphasize the
results of this compression system.

The greatest problem associated with the transform


coding techniques such as DCT based image compression
[3] is the presence of visually annoying blocking artifact
in the compressed image. This has caused an inclination
towards the use discrete wavelet transform (DWT) for all
image and video compression standards. DWT also
provides space-frequency decomposition of images [6],
energy compaction of low frequency sub-bands and space
localization of high frequency sub-bands.

Keywords: Wavelet, threshold, mathematical morphology,


self organizing feature map, huffman coding.

1. Introduction
The advent of high speed computing devices and
rapid development in the field of communication has
created a tremendous opportunity for various computer
based image applications. The amount of data required to
store a digital image is continually increasing and
overwhelming the storage devices.
Image compression is the representation of an image
in digital form with as few bits as possible while
maintaining an acceptable level of image quality [1]. The
simplest way of performing image compression is through
the use of transform coding techniques [2-4]. Transform
based coding techniques work by statistically dcor-relating
the information contained in the image so that the
redundant data can be discarded [5]. Therefore a dense
signal is converted to a sparse signal and most of the
information is concentrated on a few significant
coefficients.

In this paper a wavelet based image compression


system is presented. After eliminating the non-significant
coefficients, the resulting significant coefficient vector
along with their positions within an image (significance
map) is entropy encoded in order to ensure proper decoding
of the significant vector bit stream. The encoding method
proposed in this paper for the quantization of the
significance map does not require any parent-child
relationship to be defined as in Embedded Zero Wavelet
(EZW) [4, 7] and can be used in any case. A Self
Organizing feature map is used to perform the quantization
of the significance map and it is pre-processed with
mathematical morphology operators in order to create
clusters of significant coefficient and improve the quality of
compressed image.
The paper is organized as follows: The main elements
of the proposed hybrid image compression algorithm are
discussed in Section 2. The detailed description of the
proposed mathematical morphology and self organizing
feature map (MMSOFM) compression scheme to identify
and cluster the significant coefficients are given in Section
3. The implementation of self-organizing feature map
(SOFM) to perform the vector quantization of the
significance map is discussed in Section 4. The comparison
of results obtained using the proposed method and the
JPEG is given in Section 5. Finally, the discussion and
conclusion is presented in Section 6.

2.

Methodology and system overview

The Fourier transform is a method that is well suited


for studying stationary signal where all frequencies have
infinite coherence time. This method however fails to
exactly determine when or where a particular frequency
component occurred. To overcome the problems of Fourier
transform, a short time Fourier transform with a fixed sized
window was proposed by Gabor. However it does not
describe local changes in frequency content which
prompted the use of Wavelet transform for the purpose of
signal analysis. Wavelets are used as the basis function for
representing signals and images in wavelet transform
similar to sines and cosines in Fourier domain.
A wavelet filter that satisfies the following three
conditions should be used: finite filter length (FIR filter),
perfect reconstruction and regularity. A smooth wavelet
such as B-Spline wavelet is preferred when compared to a
non - continuous wavelet such as Haar wavelet. Smooth
wavelets in general provide better reconstruction of the
original image when compared to other wavelets. The
wavelet used in this paper is the Bi-orthogonal Spline
Wavelet, since it possess linear phase, a property that helps
in the preservation of important edge information in
images. The filter coefficients are as shown.
Table 1: Wavelet Filter Coefficients

H0

G0

0.0030
0.0313
0.9516
0.0747

-0.1768

-0.0091
-0.3012
-0.0265
-0.0168

-0.0168
-0.0265
-0.3012
-0.0091

0.5303 -0.5303

0.0747
0.9516
0.0313
0.0030

obtained after vector quantization (VQ) is then used to


obtain the significant coefficient from the original DWT
coefficients. The significant coefficients obtained are
quantized using a scalar quantization. The results of the
quantization process are Huffman encoded. The described
method (MMSOFM) reduces all forms of redundancies
present in an image: inter-pixel redundancy through a decorrelating transform, psycho visual redundancy through
quantization of both the significance map and significant
coefficients and finally coding redundancy by using
Huffman encoding. The block diagram of our complete
system is shown in Figure 1.
Original Image

Apply DWT on the


Original Image

Threshold the DWT


Coefficients and Create
a Significance Map
Use the Modified
Significance Map after
VQ to obtain
Significant
Coefficients

Quantize Significant
Coeffs using Uniform
Scalar Quantization

0.1768

Discrete wavelet transform is applied on the original


image in order to reduce the amount of inter pixel
redundancy using the filter coefficients mentioned in Table
1. As a result of the decomposition many coefficients with
in the high frequency (low scale) region are either zero or
very close to zero, therefore these coefficients can be
thresholded without appreciable loss of information (image
quality). A high percentage of the wavelet coefficients are
thresholded using a global threshold in order to determine
the significant coefficients and eventually create a
significance map. Once the significance map is created,
clusters of significant coefficients are formed using
mathematical morphology operator.
The significance map obtained after mathematical
morphology is vector quantized using a self-organizing
feature map (SOFM). The modified significance map

Huffman Encode the


Significant
Coefficients

Create Cluster of
Significant Coefficients
using Mathematical
Morphology

Vector Quantize the


Significance Map using
SOFM

Huffman Encode the


Significance Map

Compressed Image
Figure 1: Block Diagram of Compression System

3. Identification and clustering of


significant coefficients
After applying wavelet transform to an image the
most important factor is to correctly identify and cluster the
significant coefficients. Identification is done using a
thresholding function and clustering is performed using

mathematical morphology operators. Figure 3. shows the


significance map obtained by thresholding the wavelet
coefficients. The original image is shown in Figure 2.

d A ( x) = X A

(3)

e A ( x) = X QA

(4)

To create clusters of significant coefficient using


mathematical morphology operators the significance map is
dilated twice and then eroded. In this sequence of operation
[8] the first dilation clusters the significant coefficient
whereas the next dilation and erosion (closing) merely fills
in small holes. The effect of mathematical morphology on
initial significance map of Figure 3 is shown in Figure 4.

Figure 2: Original Lena Image

Figure 4: Significance Map after Mathematical


Morphology

4. Vector quantization using SOFM

Figure 3: DWT Coefficient after Threshold

SOFM performs vector quantization of the


significance map and improves the quality of reconstructed
image. A SOFM is used as it not only performs a mapping
from a continuous input space to a discrete output space and
preserves the topological properties of the input i.e., points
close to one another in the input space are mapped to same
or neighboring neurons in the output space. The SOFM is a
fully connected single-layer linear network as shown in
Figure 5.

3.1 Mathematical morphology operators


Mathematical morphology is the analysis of
signals/images in terms of their shape. It is used in image
processing applications so as to preserve edge information
and create clusters of significant coefficients. The basic
building blocks of mathematical morphology are dilations
and erosions. Dilation of an image X with a structuring
element A (fixed image) is denoted by A, defined by (3)
and erosion of X with A is denoted by A, defined by (4).

The weights connecting the input to the output


perform association between them. The output node that
results in a minimum Euclidean distance between its weight
vector and the present input vector wins the competition. A
neuron l wins if its weight vector is closest to the input
vector m as shown in (6).

N eu ronl =

i =1

( w li - x i )

(6)

Where Wli is the weight connecting input i and


neuron l. In a SOFM not only the winner of the competition
but also its neighbors has their weights updated according
to the Kohonen [10] rule given by (7).

W ( q ) = (1 - a ) iW ( q - 1) + a X ( q )

(7)

i N i* ( d )

Where the neighborhood Ni (d) contains indices for all


the neurons that lie within a radius d of the winning neuron
i* :

N i ( d ) = { j , d ij d }

(8)

Following are the steps involved in the quantization of


the significance map:
The significance map is divided into blocks of size m x m
and all the blocks except those that contain all zeros or all
ones are part of the training process. This is done to
reduce the training time.
The synaptic weights are randomly chosen, the blocks are
randomized and a neural network with only n-2 neurons
is selected.
Training of the network is carried out according to the
learning rule described above and weights are updated
according to (7).
After the training is done, two neurons one with weights
containing all zeros, and one with weights containing all
ones are appended so as to represent blocks that contain
all zeros and all ones respectively.
X1

XN

5. Results and comparison


Variety of images including still images (Lena,
Barbara, etc) and medical images (CT scans) were
compressed with this method and good quality of
compressed image was obtained. The measure of image
quality was in terms of Peak signal to noise ratio (PSNR).
Mean squared error and PSNR are calculated according to
(9) and (10) respectively.

MSE =

^
1 N N
[
X
(
i
,
j
)
X
(i, j)]2

N 2 i=1 j=1

PSNR = 10log10
C2

2552
MSE

X represents the original image


compressed image.

X2
X3

Figure 6: Significance Map after Vector Quantization

C2

Cm

Figure 5: Architecture of Kohonen Neural Network


Result of the vector quantization of the significance map
performed with blocks of size 4 x 4 and using 32 codewords
is shown in Figure 6.

(9)

(10)
and represents the

A comparison of the PSNR values obtained with this


method and the JPEG for Lena image is shown in Table 2.
Based on the visual quality of the compressed Lena image
with the JPEG and the proposed method, the result obtained
with this method is much better when with that of JPEG.
There is a large discrepancy between the images obtained
using JPEG and the proposed method as shown in Figure 713. In the JPEG compressed image blocking artifacts,
ringing artifacts and other visible differences are much
more pronounced when compared with the results obtained
using our proposed method.

6. Conclusion
Application of mathematical morphology self
organizing feature map based image compression system to

broad classes of images resulted in a satisfactory PSNR to


the compression ratio. Quantization using a self-organizing
feature map efficiently represents the map using fewer bits
and preserves the input topology. This method does not
need any special relationships to be defined and is more
general unlike embedded zero wavelet (EZW). Using a
smoother wavelet filter and implementing DWT via lifting
could further improve the results. Performance of proposed
MMSOFM is similar to JPEG 2000 in terms of visual
image quality but the PSNR achieved using MSOFM is
lower than that obtained using JPEG 2000. However the
proposed algorithm is simple and computationally less
complex than JPEG 2000 which is based on lifting based
integer wavelet transform and embedded block coding with
optimal truncation. The proposed method could be
effectively employed for compressing medical images i.e.
CT-scan and MRI images where there is a lot of textual
similarity. The similarity amongst these images could be
exploited for achieving better compression and image
quality.

Figure 7: Original Lena Image.

Table 2: Comparisons for Lena Image


Compression
Method

JPEG

Compression
Ratio

10
15
20
25

PSNR

20.1
20.0
19.8
19.5
Figure 8: Lena Image compressed using JPEG with a
compression ratio of 25.

MMSOFM

MMSOFM

10
15
20
25

38.9
37.1
35.4
34.7

10
15
20
25

36.8
33.7
31.5
29.8

Figure 9: Lena Image compressed using MMSOFM with a


compression ratio of 25.

Figure 10: Lena Image compressed using JPEG 2000 with


a compression ratio of 25.

Figure 11: Original CT image

7. References
[1] J.D.Gibson, T.Berger, T.Lookabaugh, D.Linghbergh
and R.L.Baker, Digital Compression for Multimedia,
Morgan Kaufmann, 1998.
[2] R.A.DeVore, B.Jawerth, B.Lucier, Image compression
through wavelet transforms coding, IEEE Trans. Info.
Theory 38 (1992) 719-746.
[3] M.Vetterli, J.Kovavcevic, Wavelets and subband
coding, Ist Edition, Prentice-Hall, Englewood Cliffs, NJ
1995.
[4] J.M.Shapiro, Embedded image coding using zerotrees
of wavelet coefficients, IEEE Trans. Signal Process. 41
(1993), pp. 3445-3462.
[5] R.C.Gonzalez and R.E.Woods, Digital Image
Processing, Addison-Wesley, 2000.
[6] I.Daubechies, Orthonormal bases of compactly
supported wavelets, Comm. Pure Applied Math. 41(7)
(1998), pp. 909-996.
[7] J.M.Shapiro, Smart compression using zerotree
wavelet (EZW) algorithm, Proc of 27th Asilomar Conf. on
Signals, Systems and Computers, vol.1 (1993), pp. 486-490.
[8] E.Morales, F.Y.Shih, Wavelet coefficients clustering
using morphological operations and pruned quadtree,
Pattern Recognition, vol. 33 (2000).
[9] Wedson T.de.Almeida Filho, Adriao D.Doria Neto,
Agostinho M.Brito Junior, A neural and morphological
method for wavelet based image compression, Proc. of the
International Join Conference on Neural Networks 2002.
[10] Kohonen T., Physiological interpretation of the selforganizing map algorithm Neural Networks, 6(7), pp. 895905.

Figure 12: CT image compressed with JPEG with a


compression ratio of 20

Figure 13: CT image compressed with MMSOFM with a


compression ratio of 20

Potrebbero piacerti anche