Lossy Image Compression Techniques

Annalakshmi N*

Department of Computer Science, Vidhya Sagar Women’s College, Chengalpattu, Tamil Nadu, India

*Corresponding Author:
Annalakshmi N Department of Computer Science, Vidhya Sagar Women’s College, Chengalpattu, Tamil Nadu, India E-mail: annalakshmin2021@gmail.com

Received Date: June 15, 2021; Accepted Date: June 29, 2021; Published Date: July 07, 2021

Citation: Lakshmi NA (2021) Lossy Image Compression Techniques. Am J Compt Sci Inform Technol Vol.9 No.7: 102.

Abstract

In recent years, domain image processing plays a most significant role in realtime applications. Due to reserved bandwidth and capacity, images are needed to be compressed, enhance, and noise-free to reduce the storage space as well as the transmission time. Compression overcomes the problem such as insufficient bandwidth of network and storage of memory device. Nowadays, many techniques are used to compress an image with a good quality. In this paper, I briefly discuss the concept of image compression and review the techniques which are used in loss image compression. This technique losses some data by using transform codes. Two codes are used to compress an image such as wavelet and fractal. The techniques scalar and vector quantization are used to quantize an input and partition into sub-images. I briefly discussed about the 2D-Discrete wavelet transform codes with examples which were done by Mat lab software.

Keywords

Continuous wavelet; Discrete wavelet; Scalar; Vector; Fractal

Introduction

Compression is the process of transforming the data description into a more concise and condensed. Storing images in less memory leads to a direct reduction in storage cost and faster data transmissions. Image data compression is concerned with reducing the number of bits required to represent an image. Compression techniques are developed rapidly to compress large files of data like images. With the rapid growth of the technology, a large quantity of image data should be managed to store those images properly by the use of effective techniques normally results in the compressing images. Compression methods are being rapidly developed to compress huge data files such as images.

Methodology

Image compression

Image compression is a method by which we can reduce the space for storing images, video which will be helpful in transmission performance [1]. Compression is achieved by eliminating any one or more of the three fundamental data redundancies:

Coding redundancy: The information is represented in the form of any codes. It is associated with the representation of information.

Psycho-visual redundancy: It is associated with real or quantifiable visual information. It exists because of the data which is neglected by the human visual system. i.e., the human perception does not involve quantitative analysis of each pixel.

Inter-pixel redundancy: This redundancy is directly related to the inter-pixel correlations within an image. The information carried by individual pixels is relatively small. It produces the results from the correlations between the neighboring pixels of an image [2].

There are two categories of image compression mainly used:

• Lossy compression

• Lossless compression

In the lossy compression technique, it neglects some important data. The replica of the original file can't be retrieved from the compressed file. While we decompress the compressed data, we can get a closer approximation of an original file. In these methods loss of information is acceptable. Deleting non-essential information from the source of data can save the storage area. Here, the compression ratio is high.

In lossless compression, no data will be lost, and also the replica of an original image can be retrieved by decompress the compressed image. Text compression is generally using the lossless technique. These types of compression are also known as noiseless as they never add noise to a signal or image. It is also termed entropy coding as it uses the techniques of decomposition/statistics to remove/reduce the redundancy. Compare into lossy compression, the compression ratio of lossless compression is low.

Various lossy compression techniques

Several methods are used to compress an image with some loss of data.

• Scalar quantization

Vector quantization

• Transform coding

Scalar quantization

Quantization is the process of representing a huge, possibly infinite, set of values with a large amount of smaller sets. The process of mapping an input value x into a finite number of output values, y. i.e., Q: x→y called as scalar quantization. It quantizes each value separately (Figure 1).

Example

Figure 1: Example of scalar quantization.

It is typically denoted as y=Q(x) is the process of using quantization function Q() to map a scalar input value x to scalar output value y. Figure 1 is an example of scalar quantization. There are two types of scalar quantization used in measuring, i.e., uniform and non-uniform.

A uniform scalar quantization using equal step sizes, a non- uniform quantization using unequal step sizes (Figure 2).

Uniform

Figure 2: Uniform and non-uniform scalar quantization.

Vector quantization

The vector quantization is basically used to create a dictionary of vectors of constant size, called code vectors. Values of pixels composed the blocks called code vector. A given image is then partitioned into non-recurring vectors called image vectors. Dictionary is made out of this information and it is indexed. Further, it is used for encoding the original image. Thus, every image is then entropy coded with the help of these indices [3]. The vector quantization is more effective because it reduce the number of reconstruction levels when distortion is held constant (Figure 3).

vector

Figure 3: Example of vector quantization.

The amount of compression will be illustrated in terms of the rate, which will be measured in bits per sample. Suppose we have a codebook of size k, and the input vector is of dimension L, we need to use [log2 k] bits to specify which of the code vectors was selected. The rate for L-dimensional vector quantize with a codebook of size k is determined by [log 2 k]/L. An image is quantized by blocks using vectors.

First, construct a codebook that is composed of a code vector. One vector being encoding, it finds the nearest vector in the codebook which is determined by Euclidean distance. Then, replace the vector with an index in the codebook. When decoding, find the vector corresponding by an index in the codebook. It quantizes several values jointly. It is more complex compare to scalar quantization [4].

Transform coding

The transform coding is used for converting natural data such as audio signals and photographic images. The purpose of this is to convert the data such as images and videos into a form where they could be easily compressed.

Transform coding is performed by taking an image and breaking it down into sub-images (blocks) of size N × N. The transform is then applied to each sub-image and the resulting transform coefficients are quantized and entropy coded.

The coding operation involves the following set of operations:

• An invertible transform is applied to the input vector.

• The coefficients of the transform are quantized.

• The quantized coefficients are transmitted and received.

• The transform is inverted with quantized coefficients.

The block transform coding breaks the images into a set of smaller sub-images called blocks. It applies image transform on the sub- images independently. It removes the redundancy from an image and also reduces the bandwidth of data. JPEG is an example of transform coding [5].

Benefits of compression

• The size reduction is the most important benefit of image compression. . It saves computing power as the execution of image transmission takes less time if the size is smaller.

• It reduces transmission errors since fewer bits are transferred.

• The compressed image transmission cost is reduced since the cost depends upon the duration for which data is being transmitted.

• It allows for the faster loading of data on slow devices. i.e., some electronic devices may load large compressed images slowly.

• Compressed images can be retrieval easily from the database.

• It also provides a level of shield against illicit monitoring [6].

• A secure level of transmission is possible due to the encoding and compressing of an image.

Types of transform codes

Several transform codes are used to compress an image by using the code blocks in lossy compression. Some transform codes are,

• Wavelet transforms codes

• Fractal transforms codes

Wavelet transform codes: Wavelets are mathematical functions that help in representing the original image into an image in the frequency domain, which can else be divided into sub-band images of different frequency components. It is a well-known transform used for some of the image compression standards in lossy compression methods.

In a transform-based compression system two-dimensional (2-D) images are transformed from the spatial domain to the frequency domain [7]. Wavelet coder transmits wavelet transformed image in bit-plane order with the MSBs first. Compression happens when only some of the bit planes are transmitted. Wavelet Transform (WT) represents an image as a sum of wavelet functions (wavelets) with different locations and scales. Two types of wavelet transform codes are mainly used to compress an image.

• Discrete wavelet

• Continuous wavelet

The advantage of wavelet compression is that, in contrast to JPEG, the wavelet algorithm does not partition an image into blocks, but it can analyze the whole image. It is directly applied to sub-images.

Discrete wavelet: The wavelet transform decomposes a signal into a set of basic functions. These functions are called as wavelets. The Discrete Wavelet Transform (DWT) is discrete in time and scale, meaning that the DWT coefficients may have real (floating-point) values, but the time and scale values used to index these coefficients are integers. A signal is decomposed by DWT into one or more levels of resolution (also called octaves).

The low-pass filter applies a scaling function to a signal, while the high-pass filter applies the wavelet function. The scaling function allows approximation of any given signal with a variable amount of precision. For a lossy compression of an on-line source signal, speed will be more important than power consumption or space savings [8,9].

In DWT, images are decomposing into four sub-bands: Approximate Image (LL), Horizontal Details (HL), Vertical Details (LH) and Diagonal Details (HH). The sub-band LL retrieves a coarse approximation of an image and removes all high frequency information. The sub-band LH removes the high frequency information along with the rows and emphasizes the high frequency information along with columns and produces a vertical edges emphasized image. The sub-band HL emphasizes the horizontal edges. The sub-band HH emphasizes the diagonal edges.

To compute the DWT of an image at the next level, the process is applied again to the LL sub-band (Figure 4).

decomposition

Figure 4: Three levels of image decomposition in 2D-DWT.

In each level of decomposition, four images are created from an original image (N × N). The size of these images is reduced to ¼ of an original image size. In DWT, only the LL sub-band image is used to produce the next level of decomposition.

The DWT is mainly used for compression, noise removing and data transmission. Two types of DWT are used, 1-Dimensional and 2-Dimensional. The concept of image decomposition is carried out in 2D DWT. It will decompose an image and extract the image for next level. In these three levels of image decomposition in 2D-Discrete wavelets examples are done by the method of haar wavelet using MATLAB software.

Continuous wavelet

The CWT calculates the wavelet coefficient at every possible scale and shift. Wavelets are obtained from a single prototype wavelet y(t) called mother wavelet by dilations and shifting. ѱ_(a,b) (t)=1/√a ѱ((t-b)/a) (1)

Whereas, is the scaling parameter and b is the shifting parameter. The continuous wavelet transform is used in several applications such as pattern recognition, feature extraction and detection. It easily detects the image direction and orientation [10].

Fractal transforms codes

Fractal image coding has the advantage of a higher compression ratio but is a lossy compression scheme. Fractal dimension was used in a fractal image coder for adjusting the error threshold. Also, fractal dimension was used for image segmentation. After segmentation, fractal dimension was used as a measure of the complexity of the segment to determine how the segments should be coded [11].

FIC is a technique that is used to encode the image in such a way that it reduces the storage space by using a self-similar portion of the same image. Fractal Image Compression (FIC) is a lossy compression technique for a digital image, based on fractals. When an image is reconstructed at the same resolution as the original, in the decoding process the domain blocks are shrunk, which eliminates some of the details of the domain blocks.

The fractal code is a resolution-independent representation of the image and theoretically represents a continuous image approximating the original image. A decoder may decode the code to generate a digital image at any resolution. The resolution of the decoded image may be higher than the original image. The increase in resolution is sometimes referred to as the fractal zoom [12,13]. The higher resolution obtained is not created by a simple technique such as repeating the pixels of the image, but more detail is generated in the decoded images (Figures 5-8).

Original

Figure 5: Original image.

level

Figure 6: Image decomposition of 2D-DWT in level 1.

Image

Figure 7: Image decomposition of 2D-DWT in level 2.

2D

Figure 8: Image decomposition of 2D-DWT in level 3.

Results

The fractal transform codes used to reduce the storage by using a self-similar portion of the same image. In scalar quantization, the compression should be applied in a smaller or finite number of input values. In vector quantization, the amount of compression will be declared in terms of the rate which will be measured in bps (bits per sample). JPEG is the image file format which is using lossy image compression technique.

Conclusion

The image compression technique is used to compress an image with or without the loss of data. In this paper, I had discussed with the concept of lossy image compression techniques as well as the transform codes which are used to compress an image. This technique loss some data during compression but the compression ratio is high. The methods wavelet and fractal transform codes are used to compress an image by using code blocks. I had discussed the concept of Discrete Wavelet Transform (2D-DWT) with an example which is done by Mat lab software. In transform coding; the given image will be separated into a set of sub-images and applies the compression independently.

References

Select your language of interest to view the total content in your interested language

Viewing options

Flyer image
journal indexing image

Share This Article