Keywords

1 Introduction

The approaches using the artificial neural networks [1, 9] for data intelligent processing seem to be very promising. Essentially, this is due to their structures which provide the opportunities for parallel computations and for the use of the learning process which allows the network to adapt to the data to be processed [2]. Again, the discrete wavelet transform [10, 11] can produce different size sub-images and can identify the relevant information from the details of an image. To improve the compression quality, we use a pretreatment step which employs the principle of Weber-Fechner law [4, 12] for the logarithmic quantization of the original image. In this article, we disclose the extent to which it is important to use the logarithmic quantization in the improvement of the compression quality by taking the wavelet transform and Kohonen’s networks [3] as a basis. To show how important the compression law is, we will, first, study the principle of Weber-Fechner law in quantifying the original image. Second, we will detail our approach to the compression of still images. Finally, we will compare the two approaches so as to assess our new method.

2 The Proposed Image Compression Approach

Our new image compression approach consists of three steps: the quantization of the original image by Weber-Fechner law, the discrete wavelet transform and the quantization by Kohonen’s network. Figure 1 elucidates the steps of compression by means of our approach.

Fig. 1.
figure 1

Image compression steps

2.1 Weber-Fechner Law

Sensitivity to contrast [12, 13] is the ability of the human visual system to detect the changes in luminance (achromatic) and the chromatic changes. Any measure of sensitivity to contrast depends on the level of luminance of the stimuli, their spatial frequencies, and their chrominance as well as the human observer adaptation level [5]. Indeed, contrast allows measuring the relative change in luminance with respect to the neighborhood. This property is known as Weber-Fechner law:

$$ C^{w} = \frac{\Delta L}{L} $$
(1)

Where ΔL is the difference in luminance between the stimulus and its neighborhood and L is the luminance of the neighborhood. The Contrast Sensitivity Functions (CFS) [13] is typically used to quantify these dependencies (Fig. 2).

Fig. 2.
figure 2

Contrast sensitivity functions

Weber law regards the sensitivity of the human eye to luminance as a logarithmic function [6, 18]. Weber developed a quantitative description of the relationship between the stimulus intensity and the discrimination which is now known as Weber law.

$$ \frac{\Delta S}{S} = K $$
(2)

Where ΔS is the perceived intensity difference with respect to a stimulus S and K which is a constant. Fechner-Weber applied the law to the sensory experience. He found that the intensity of sensation is proportional to the logarithm of the stimulus intensity.

$$ \Delta S = k*S \Rightarrow \Delta P = k' $$
(3)
$$ \Delta P = k' = k*\frac{\Delta S}{S} = k*\Delta (\log S) $$
(4)
$$ \Delta P = P_{1} - P_{0} = k*\log (\frac{{S_{1} }}{{S_{0} }}) $$
(5)

If the absolute threshold is S0 = 1 and the associated sensation is P0 = 0, Fechner assumes that the amplitude of sensation is proportional to the logarithm of the stimulus. This relationship is called Weber-Fechner law.

$$ P = k*\log (S) $$
(6)

Thus, according to Weber-Fechner law, the quality measurement must take into account the logarithmic sensitivity of the eye to light and the decreases in the image gray levels are considered imperceptible to the human eye [4]. On the other side of the coin, the logarithmic quantization reduces the entropy of the image which will lead to a higher compression ratio without noticeable degradation of the original image. We use the principle of Weber-Fechner law to quantify the image signal S (Fig. 3) as a pretreatment phase before the wavelet transform.

Fig. 3.
figure 3

Logarithmic quantization of the original image

2.2 Discrete Wavelet Transformation

The dimensional discrete wavelet transformation (DWT) [10] is based on the image multi-resolution analysis concept [14]. It is divided into a set of sub bands representing the information carried by the source image at different levels of resolution: the image approximation (LL) and the images of the horizontal details (HL), the vertical details (LH), the diagonal details (HH) [11]. The procurement of those pictures is the result of the following steps (Fig. 4):

Fig. 4.
figure 4

Decomposition steps of an image by the discrete wavelet

Figure 5 is an example of the wavelet transformation of the Lena image at two levels of decomposition.

Fig. 5.
figure 5

Representation of a wavelet transform of the Lena image at 2 levels

2.3 Kohonen’s Network

Kohonen’s network came into existence in 1990 (Self Organizing Map) [3, 15]. It is a competitive network. It is made up of a layer of neurons reflecting the input-data presented to the network and a topological map. Self organizing map is a neural network in a single layer in which the neurons are usually arranged on a matrix. Each of these neurons is connected to the input via variable synaptic weights. The general structure of Kohonen’s network is illustrated in Fig. 6. When an input is presented to the network via the input layer, the neurons of the self organizing map are activated differently and a competition starts between these neurons. The neuron with the closest weight value to that of the input value is deemed the winner [17].

Fig. 6.
figure 6

Self organizing map

The adaptation of the network weight to learning is done according to the following rules:

  1. 1.

    Find the winner neuron in the competition as:

    $$ d(X,w_{c} ) \le d(X,w_{i} ),\forall i \ne c $$
    (7)

    Where

    X: input vector

    \( w_{c} \): the weight vector of the winner neuron c

    \( w_{i} \): the weight vector of the neuron i

  2. 2.

    Update weight \( w_{i} \) of the network:

    $$ w_{i} (t + 1) = w_{i} (t) + h(c,i,t)*\left[ {X - w_{i} (t)} \right] $$
    (8)

    where \( w_{i} (t) \) is the weight vector of the neuron i at time t, h is a function defined by:

    $$ h(c,i,t) = \left\{ \begin{array}{l} \alpha (t),i \in N(c,t) \hfill \\ 0,\text{si} {\text{ non}} \hfill \\ \end{array} \right.avec\alpha (t) \in \left[ {0,1} \right] $$
    (9)

    The function h defines the magnitude of the correction made to the winner neuron c and its neighborhood. The neighborhood, at time t, of the winner neuron c is determined by the function \( N(c,t) \) which is a decreasing function over time. The final neighborhood of a neuron consists of the neuron itself. The function \( h(c,i,t) \) allows assigning the same correction \( \alpha (t) \) to all the neurons belonging to the neighborhood of the winner neuron at time t.

3 Image Compression by the Proposed Approach

To compress the gray level image, we first apply a logarithmic quantization to the original image using Weber-Fechner law. Second, we apply a discrete wavelet transformation to the quantified image according to the decomposition level (j) and the type of wavelet. Then, we cut the three detail sub-images (LH, HL, and HH) in a block (BS) in a definite block width (e.g. 4 × 4, 8 × 8 or 16 × 16) by keeping the approximation sub-image (LL). Third, we look for the codebook for each block representing the code-word with the minimum distance from the block. The index of the selected word is added to the index vector, and then we encode this vector by Huffman coding [7, 8]. The last step is to save the index vectors coded in Huffman and the approximation sub-image representing the compressed image.

4 Experimental Study and Results

In our work, we compare two compression methods: the classic method and the new method using Weber-Fechner law. We change the compression parameters: the wavelet decomposition level (j), the size of the input block (BS) and the size of Self Organization map (SOM). To evaluate our new approach, we use three compression evaluation criteria: the compression ratio (CT), the means square error (MSE) and the Peak Signal to Noise Ratio (PSNR).

  • The compression ratio gives a measurement of the performance of the compression methods of still images. Also, it is an evaluation criterion for the compression algorithms. The compression ratio is defined by:

    $$ TC = \left( {1 - \frac{{k^{'} }}{k}} \right)*100 $$
    (10)

    where TC: the compression ratio, \( k^{'} \): the number of bits per pixel in the compressed image and \( k \):the number of bits per pixel in the original image (k = 8 for the images in gray level).

  • MSE (Means Square Error), in the context of the compression method with losses, can measure the quality of the reconstructed image with respect to the original image.

    $$ MSE = \frac{1}{m*n}\sum\limits_{i = 1}^{m} {\sum\limits_{j = 1}^{n} {\left( {I(i,j) - J(i,j)} \right)} }^{2} $$
    (11)

    where m and n represent the dimensions of the image, I and J stand for the original image as well as the reconstructed image.

  • PSNR (Peak Signal to Noise Ratio) measures the signal to noise ratio. The signal represents the original image, whereas the noise represents the difference between the original image and the image reconstructed after compression.

    $$ PSNR = 10*\log_{10} \left( {\frac{{(2^{n} - 1)^{2} }}{MSE}} \right) $$
    (12)

The following tables correspond to the tests carried out on Einstein, House, Boat and Lena gray level images of the size 512*512 pixels (Fig. 7). We use the Haar wavelet transform because we show in [16] it is better for the reconstructed image quality by the comparison to other types of wavelets.

Fig. 7.
figure 7

Original Images.

By using the same compression parameters, the analysis of the Tables 1, 2, 3 and 4 show that the compression ratio (the number of bits per pixel) of the image compressed by the new approach is improved with respect to the former approach. In this work, we present a subjective comparison between the synthetic images compressed by the classic approach and our new approach which utilizes Weber-Fechner law. Both compressions are made at the same compression ratio.

Table 1. Experimental compression results of einstein image
Table 2. Experimental compression results of house image
Table 3. Experimental compression results of boat image
Table 4. Experimental compression results of lena image

The reconstructed images are compared with the original images in terms of PSNR according to the number of bits per pixel (Nbpp). Actually, Figs. 8, 9, 10 and 11 indicate that the visual quality metric (PSNR) of the compressed images of the approach using Weber-Fechner law (green curve) in terms of the compression ratio (Nbpp) improves with respect to the classic approach (blue curve). We notice that there is a significant improvement in the quality of the reconstructed image if the compression ratio is higher than 1 bits per pixel since the shape of the green curve (new approach) is going up for the four images. Also, there is a little improvement if the compression ratio is less than 0.5 bits per pixel. According to the four figures, we notice a significant drop in the image quality metric (30.6 to 28 for the image Instein, 26.5 to 23 for the image House and 27.5 to 23.3 for the image Boat) if the number of bits per pixel (NBPP) is between, approximately, 1 and 1.7 and the second drop if the NBPP is less than 0.5 for the reconstructed images. This significant degradation of the image quality is due to the change of the wavelet transform level to another level.

Fig. 8.
figure 8

PSNR = F(Nbpp) of Einstein image

Fig. 9.
figure 9

PSNR = F(Nbpp) of house image

Fig. 10.
figure 10

PSNR = F(Nbpp) of boat image

Fig. 11.
figure 11

PSNR = F(Nbpp) of lena image

5 Conclusion and Future Scope

In this paper, we have enhanced the compression quality of a still-image-compression approach based on the discrete wavelet transformation and neural networks by adding a new pre-treatment phase to quantify the signals of the original image through the use of the principle of Weber-Fechner law. We notice that the new approach is better than the classic approach in terms of quality according to the compression ratio feature if the number of bits per pixel is higher than 0.5. To boost our approach, we will quantify the original image in a semi-logarithmic manner by using the law of compression ‘A’ which is used in mobile telephone networks.