INTELLIGENT SYSTEM FOR IMAGE COMPRESSION

Adnan Khashman and Kamil Dimililer

Department of Electrical & Electronic Engineering, Near East University, Lefkosa, Northern Cyprus

Keywords: Intelligent Systems, Neural Network, DCT Image Compression, Optimum Compression.

Abstract: The parallel processing capability of neural networks provides efficient means for processing images with

large amount of data. Image compression using Discrete Cosine Transforms (DCT) is a lossy compression

method where at higher compression ratios the quality of the compressed images is reduced, thus the need

for finding an optimum compression ratio that combines high compression and good quality. This paper

suggests that the image intensity can affect the choice of an optimum compression ratio. A neural network

will be trained to establish the non-linear relationship between the image intensity and its compression ratios

in search for an optimum ratio. Experimental results suggest that a trained neural network can relate image

intensity or pixel values to its compression ratio and thus can be successfully used to predict optimum DCT

compression ratios for different images.

1 INTRODUCTION

Image compression is one of these commonly used

image processing applications where the rapid

advance in multimedia applications has made data

compression more vital and compression methods

are being developed to compress large data files

such as images (Nadenau etal., 2003). Efficient

methods usually succeed in compressing images,

while retaining high image quality and marginal

reduction in image size (Ratakonda and Ahuja,

2002).

Recently, adaptive prediction was suggested for

data compression and still image coding (Robinson,

2006), and oriented wavelet transform for image

compression was proposed (Chappelier and

Guillemot, 2006). The use of wavelet transforms and

Discrete Cosine Transform (DCT), when applied to

image compression, was also investigated

(Khashman and Dimililer, 2005). The usability and

efficiency of these methods depend on the

application areas that require either high

transmission rate or high quality decompression.

Lossless compression algorithm provides a

compression which, when decompressed the exact

original data can be obtained. This is the case when

binary data such as executables and documents are

compressed. On the other hand, images might not be

reproduced 'exactly', but an approximation of the

original image is enough for most purposes as long

as the error between the original and the compressed

image is tolerable. The general purpose of

compression programs is to compress images, but

the result is less than optimal.

DCT-based image compression is a simple

compression method that was first applied in 1974

(Ahmed etal., 1974). The disadvantage of using

DCT image compression is the high loss of quality

in compressed images, which is more notable at

higher compression ratios. Recent work on finding

optimum compression suggested a criterion based on

visual inspection and computed analysis of the

reconstructed images (Khashman and Dimililer,

2005). Visual inspection and observation by humans

is an empirical analysis that involves a number of

people who observe the smoothness and edge

continuity of certain objects within reconstructed

images and then decide which compression ratio

provides a compromise between high compression

ratio and minimal loss of quality (Jahne, 2002),

(Khashman and Dimililer, 2005), i.e. the optimum

compression ratio.

The use of neural networks for image processing

applications has marginally increased in recent

years, where image compression using DCT and a

neural network was suggested previously (Ng and

Cheng, 1997). More recently, different image

compression techniques were combined with neural

network classifiers for various applications (Zhou

etal., 2006), (Milani, 2006). However, none of these

methods suggested using a neural network to

451

Khashman A. and Dimililer K. (2007).

INTELLIGENT SYSTEM FOR IMAGE COMPRESSION.

In Proceedings of the Ninth International Conference on Enterprise Information Systems - AIDSS, pages 451-454

DOI: 10.5220/0002402204510454

Copyright

c

SciTePress

determine optimum compression using the original

image intensity.

The aim of the work presented within this paper

is to develop an intelligent system for optimum DCT

image compression using a neural network. Our

hypothesis is that a trained neural network can learn

the non-linear relationship between the image

intensity (pixel values) and its optimum compression

ratio. Once trained, the neural network would predict

the optimum compression ratio of an image upon

presenting the image to the neural network by using

its intensity values. The prediction parameters here

are the image intensity (global pixel values) and the

experience (training) of the neural network.

2 THE INTELLIGENT SYSTEM

The development and implementation of the

proposed intelligent system for optimum DCT image

compression uses 80 images that have different

objects, brightness and contrast. The novel system is

implemented in two phases: the image processing

phase and the neural network arbitration phase.

2.1 Image Pre-Processing Phase

DCT-based image compression is firstly applied to

all 80 images using 9 compression ratios (10%,

20%,… 90%) as shown in an example in Figure 1.

The optimum DCT compression ratios for the 80

images are then determined using the optimum

compression criteria based on visual inspection as

suggested by (Khashman and Dimililer, 2005).

The image database is then organized as follows:

40 images in the training image set and 40 images in

the testing image set which will be used to verify the

efficiency of the proposed method. Figure 2 shows

the examples of original images and their

compressed versions using optimum compression

ratios prior to training the neural network.

2.2 Neural Network Phase

The intelligent image compression system uses a

supervised neural network based on the back

propagation learning algorithm due to its

implementation simplicity, and the availability of

sufficient database for training this supervised

learner. The neural network consist of an input layer

with 4096 neurons, one hidden layer with 82

neurons and an output layer with 9 neurons. Training

the neural network uses 40 images which are grey

and of size (256x256) pixels. Using Adobe

Photoshop, the size of each image is initially

reduced to (64x64) pixels prior to presenting the

whole reduced image to the neural network, thus

resulting in 4096 pixel values per image. Further

reduction to the size of the images was attempted in

order to reduce the number of input layer neurons

and consequently the training time, however,

meaningful neural network training could not be

achieved, thus the use of whole images of size

(64x64) pixels. The hidden layer of the neural

network contains 82 neurons and he output layer has

nine neurons according to the number of possible

compression ratios (10% - 90%). Figure 3 shows the

topology of this neural network where ODCR stands

for optimum DCT Compression Ratio.

3 RESULTS AND DISCUSSION

The successful implementation of the proposed

intelligent image compression system relies mainly

on the learning capability of the neural network

within the intelligent system. Meaningful learning

and correct association of original images to their

optimum compression ratios relies on the provision

of sufficient input data patterns to the neural

network during training and later on during

generalization.

3.1 Neural Network Performance

The neural network learnt after 4447 iterations and

within 3300 seconds. The running time for the

generalized neural network after training and using

Original Image 10% 20% 30% 40%

50% 60% 70% 80% 90%

Figure 1: An image and its compression at nine ratios.

a- b- (30%) a- b- (50%)

Figure 2: (a) Original images and (b) their optimum

compressions.

ICEIS 2007 - International Conference on Enterprise Information Systems

452

Table 1: Neural Network Final Training Parameters.

Input nodes 4096

Hidden nodes 82

Output nodes 9

Learning rate

0.0051

Momentum rate

0.49

Error

0.001

Iterations 4447

Training time (seconds) 3300

Run time (seconds)

0.003

Table 2: Accuracy and recognition rates for OCD.

OCD

Accuracy Rate

(RA

ODC

)

Recognition Rate

(RR

ODC

)

0 100 % 12/40 (30 %)

1 89 % 31/40 (78 %)

2 78 % 40/40 (100 %)

one forward pass was 0.003 seconds. These results

were obtained using a 2.0 GHz PC with 2 GB of

RAM, Windows XP OS and Matlab 7.1 software.

Table 1 list the final parameters of the successfully

trained neural network.

3.2 Evaluation Method

The evaluation of the training and testing results was

performed using two measurements: the recognition

rate and the accuracy rate. The recognition rate is

defined as follows:

100∗

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

=

T

ODC

ODC

I

I

RR

(1)

where RR

ODC

is the recognition rate for the neural

network within the intelligent system, I

ODC

is the

number of optimally compressed images, and I

T

is

the total number of images in the database set.

The accuracy rate RA

ODC

for the neural network

output results is defined as follows:

(

)

100*

10

1

⎟

⎟

⎠

⎞

⎜

⎜

⎝

⎛

∗−

−=

T

ip

ODC

S

SS

RA

(2)

where S

P

represents the pre-determined (expected)

optimum compression ratio, S

i

represents the

optimum compression ratio as determined by the

trained neural network and S

T

represents the total

number of compression ratios.

Table 2 shows the three considered OCD values

and their corresponding accuracy rates and

recognition rates.

The Optimum Compression Deviation (OCD) is

another term that is used in our evaluation. OCD is

the difference between the the pre-determined or

expected optimum compression ratio (S

P

) and the

optimum compression ratio (S

i

) as determined by the

trained neural network, and is defined as follows:

(

)

10∗−=

ip

SSOCD

(3)

The OCD is used to indicate the accuracy of the

system, and depending on its value the recognition

rates vary.

The evaluation of the intelligent system

implementation results in this work uses (OCD = 1)

and (OCD = 2) as they assure accuracy rates of 89%

and 78% respectively, which is considered sufficient

for this application. The trained neural network

recognized correctly the optimum compression

ratios for all 40 images in the training set as would

be expected, thus yielding 100% recognition of the

training set. Testing the trained neural network using

40 images that were not presented to the network

before, yielded 78% recognition rate with 89%

Original Image

(256x256) pixels

Input Hidden Output

La

y

er La

y

er La

y

e

r

O

D

C

R

1

2

4096

1

2

82

1

9

Reduced Size

Image (64x64)

pixels

Figure 3: The intelligent optimum image compression system (ODCR: Optimum DCT Compression Ratio).

Compressed Image

INTELLIGENT SYSTEM FOR IMAGE COMPRESSION

453

Original 20% Original 40% Original 50% Original 30%

Image Compression Image Compression Image Compression Image Compression

Figure 4: Examples of Optimum DCT compression results obtained using the trained neural network.

accuracy rate (using OCD=1), and 100% recognition

rate with 78% accuracy rate (using OCD=2). Figure

4 shows examples of the optimally compressed

images as determined by the trained neural network.

4 CONCLUSIONS

This paper proposed a novel method for optimum

image compression that uses DCT compression and

a neural network. The method suggests that a trained

supervised neural network can learn the non-linear

relationship between the intensity (pixel values) of

an image and its optimum compression ratio, and

thus can predict the optimum DCT compression

ratio of an image upon presenting the original image

to the trained neural network. The implementation of

the proposed method uses lossy DCT image

compression where the quality of the compressed

images degrades at higher compression ratios. The

aim of an optimum ratio is to combine high

compression ratio with quality compressed image.

The proposed intelligent system that is presented

within this paper was implemented using 80 images

of various objects, contrasts and intensities. The

neural network within the intelligent system learnt to

associate 40 images with their different optimum

compression ratios within 3300 seconds. Once

trained, the neural could predict the optimum

compression ratio of an image within 0.003 seconds

upon presenting the image to the network.

The trained system uses three minimum

accuracy levels which are determined depending on

the application. In this work, minimum accuracy

levels of 78% and 89% were used, where; 100% and

78% recognition rates of correct optimum

compression ratio were obtained, respectively. This

successful implementation of our proposed method

was shown throughout the high recognition rate and

the minimal time cost when running the trained

neural network.

Future work will include the development of an

intelligent optimum image compression system

using Haar and Biorthogonal wavelet transform

compressions which produce higher quality

compressed images. Additionally, the intelligent

system development will use larger image database.

REFERENCES

Ahmed, N., Natarajan, T., Rao, K.R., 1974. On Image

Processing and a Discrete Cosine Transform. In IEEE

Trans. Computers, C-23(1), 90-93.

Chappelier, V., Guillemot, C., 2006. Oriented Wavelet

Transform for Image Compression and Denoising. In

IEEE Trans. Image Processing, 15(10), 2892-2903.

Jahne, B., 2002. Digital Image Processing. New York:

Springer-Verlag.

Khashman, A., Dimililer, K., 2005. Image Compression

Using Biorthogonal Wavelet & Discrete Cosine

Transforms. In EMO Bilim Journal of the Chamber of

Electrical Engineers, Northern Cyprus, 5(16), 37-39.

Khashman, A., Dimililer, K., 2005. Comparison Criteria

for Optimum Image Compression. In IEEE

International Conference EUROCON’05, 935-938.

Milani, F.M., 2006. A Co-evolutionary Competitive

Multi-expert Approach to Image Compression with

Neural Networks. In IEEE International Conference

Engineering of Intelligent Systems, ICEIS’2006, 1-5.

Nadenau, M.J., Reichel, J., Kunt, K., 2003. Wavelet Based

Color Image Compression: Exploiting the Contrast

Sensitivity Function. In IEEE Trans. Image

Processing, 12(1), 58-70.

Ng, K.S., Cheng, L.M., 1997. Artificial Neural Network

for Discrete Cosine Transform and Image

Compression. In 4th International Conference

ICDAR’97, 675-678.

Ratakonda, K., Ahuja, N., 2002. Loseless Image

Comrpession with Multiscale Segmentation. In IEEE

Trans. Image Processing, 11(11), 1228-1237.

Robinson, J.A., 2006. Adaptive Prediction Trees for Image

Compression. In IEEE Trans. Image Processing,

15(8), 2131-2145.

Zhou, Y., Zhang, C., Zhang, Z., 2006. Improved Variance-

Based Fractal Image Compression Using Neural

Networks. In Lecture Notes in Computer Science, Vol.

3972, Springer-Verlag, Berlin Heidelberg New York,

575-580.

ICEIS 2007 - International Conference on Enterprise Information Systems

454