• No results found

EXPERIMENTNO6

N/A
N/A
Protected

Academic year: 2020

Share "EXPERIMENTNO6"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

EXPERIMENT NO:06

AIM : TO IMPLEMENT IMAGE COMPRESSION USING MATLAB

APPARATUS : MATLAB 7

THEORY : In today’s technological world as our use of and reliance on computers continues to grow, so too does our need for efficient ways of storing large amounts of data and due to the bandwidth and storage limitations, images must be compressed before transmission and storage.For example, someone with a web page or online catalog that uses dozens or perhaps hundreds of images will more than likely need to use some form of image compression to store those images. This is because the amount of space required to hold unadulterated images can be prohibitively large in terms of cost. Fortunately, there are several methods of image compression available today. This fall into two general categories: lossless and lossy image compression.

However, the compression will reduce the image fidelity, especially when the images are compressed at lower bit rates. The reconstructed images suffer from blocking artifacts and the image quality will be severely degraded under the circumstance of high compression ratios. In order to have a good compression ratio without losing too much of information when the image is decompressed we use DCT.

(2)

THE JPEG PROCESS: The following is a general overview of the JPEG process. JPEG stands for Joint Photographic Experts Group which is a commonly used method of compression for photographic images. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. More comprehensive understanding of the process may be acquired as such given under:

1. The image is broken into 8x8 blocks of pixels.

2. Working from left to right, top to bottom, the DCT is applied to each block. 3. Each block is compressed through quantization.

4. The array of compressed blocks that constitute the image is stored in a drastically

reduced amount of space.

5. When desired, the image is reconstructed through decompression, a process that uses the Inverse Discrete Cosine Transform (IDCT).

THE DISCRETE COSINE TRANSFORM: Like other transforms, the Discrete Cosine Transform (DCT) attempts to decorrelate the image data. After decorrelation each transform coefficient can be encoded independently without losing compression efficiency. This section describes the DCT and some of its important properties.

1) The One-Dimensional DCT:

The most common DCT definition of a 1-D sequence of length N is

For u = 0, 1, 2, …, N −1

(3)

For x = 0, 1, 2, …, N −1. In both equations as above,α (u) is defined as

It is clear from first equation that for

Thus, the first transform coefficient is the average value of the sample sequence. In literature, this value is referred to as theDCCoefficient. All other transform coefficients are called the AC Coefficients

2) The Two-Dimensional DCT:

The Discrete Cosine Transform (DCT) is one of many transforms that takes its input and transforms it into a linear combination of weighted basis functions. These basis functions are commonly the frequency. The 2-D Discrete Cosine Transform is just a one dimensional DCT applied twice, once in the x direction, and again in the y direction. One can imagine the computational complexity of doing so for a large image. Thus, many algorithms, such as the Fast Fourier Transform (FFT), have been created to speed the computation.

(4)

p (x, y) is the x,yth element of the image represented by the matrix p. N is the size of theblock that the DCT is done on. The equation calculates one entry (i, j th) of the transformedimage from the pixel values of the original image matrix. For the standard 8x8 block thatJPEG compression uses, N equals 8 and x and y range from 0 to 7. Therefore D (i, j ) wouldbe as in Equation (3).

Because the DCT uses cosine functions, the resulting matrix depends onthe horizontal and vertical frequencies. Therefore an image black with a lot of change infrequency has a very random looking resulting matrix, while an image matrix of just onecolor, has a resulting matrix of a large value for the first element and zeroes for the otherelements.

THE DCT MATRIX:

To get the matrix form of Equation (1), we will use the following equation

For an 8x8 block it results in this matrix:

PROPERTIES OF DCT:

Some properties of the DCT which are of particular value to image processing applications:

a) Decorrelation: The principle advantage of image transformation is the removal of redundancy between neighboring pixels. This leads to uncorrelated transform coefficients which can be encoded independently. It can be inferred that DCT exhibits excellent decorrelation properties.

(5)

c) Separability:This property, known as separability, has the principle advantage that D (i, j) can be computed in two steps by successive 1-D operations on rows and columns of an image. The arguments presented can be identically applied for the inverse DCT computation.

d) Symmetry: Another look at the row and column operations in above Equation reveals that these operations are functionally identical. Such a transformation is called a symmetric transformation. A separable and symmetric transform can be expressed in the formD = TMT where M is an N ×N symmetric transformation matrix This is an extremely useful property since it implies that the transformation matrix can be precomputed offline and then applied to the image thereby providing orders.

References

Related documents

So flexibility coefficients of individual members along with force and deformation transformation technique and principle of Contra-gradience can be used to develop the