Jpeg Image Compression and Decompression
Total Page:16
File Type:pdf, Size:1020Kb
1. INTRODUCTION 1.1 GENERAL INTRODUCTION In today’s digital world, when we see digital movie, listen digital music, read digital mail, store documents digitally, making conversation digitally, we have to deal with huge amount of digital data. So, data compression plays a very significant role to keep the digital world realistic. If there were no data compression techniques, we would have not been able to listen to songs over the Internet, see digital pictures or movies, or we would have not heard about video conferencing or telemedicine. How data compression made it possible? What are the main advantages of data compression in digital world? There may be many answers but the three obvious reasons are the saving of memory space for storage, channel bandwidth and the processing time for transmission. Every one of us might have experienced that before the advent MP3, hardly 4 or 5 songs of wav file could be accommodated. And it was not possible to send a wav file through mail because of its tremendous file size. Now, we can easily accommodate 50 to 60 songs of MP3 in a music CD of same capacity. Because, the uncompressed audio files can be compressed 10 to 15 times using MP3 format and we have no problem in sending any of our favorite music to our distant friends in any corner of the world. Also, we can download a song in MP3 in a matter of seconds. Similar compression schemes were developed for other digital data like images and videos. Videos are nothings but the animations of frames of images in a proper sequence at a rate of 30 frames per second or higher. A huge amount of memory is required for storing video files. The possibility of storing 4/5 movies in DVD CD now rather than we used 2/3 CDs for a movie file is because compression. We will consider here mainly the image compression techniques. 1.2 MOTIVATION Image compression is an important issue in digital image processing and finds extensive applications in many fields. This is the basic operation performed frequently by any digital photography technique to capture an image. For longer use of the portable photography device it should consume less power so that battery life will be more. To improve the Conventional techniques of image compressions 1 using the DW T have already been reported and sufficient literatures are available on this.The JPEG is a lossy compression scheme, which employs the DWT as a tool and used mainly in digital cameras for compression of images. In the recent past the demand for low power image compression is growing. As a result various research workers are actively engaged to evolve efficient methods of image compression using latest digital signal processing techniques. The objective is to achieve a reasonable compression ratio as well as better quality of reproduction of image with a low power consumption. Keeping these objectives in mind the research work in the present thesis has been undertaken. In sequel the following problems have been investigated. 1.3 OBJECTIVE OF THE PROJECT Image Compression addresses the problem of reducing the amount of data required to represent the digital image. Compression is achieved by the removal of one or more of three basic data redundancies: (1) Coding redundancy, which is present when less than optimal (i.e.the smallest length) code words are used; (2) Interpixel redundancy, which results from correlations between the pixels of an image; &/or (3) psycho visual redundancy which is due to data that is ignored by the human visual system (i.e. visually nonessential information).Huffman codes contain the smallest possible number of code symbols (e.g., bits) per source symbol (e.g., grey level value) subject to the constraint that the source symbols are coded one at a time. So, Huffman coding when combined with technique of reducing the image redundancies using Discrete Wavelet Transform (DWT) helps in compressing the image data to a very good extent. 1.4 ORGANIZATION OF DOCUMENTATION In this project documentation we have initially put the definition and objective of the project as well as the design of the project which is followed by the implementation and testing phases. Finally the project has been concluded successfully and also the future enhancements of the project were given in this Documentation. 1.5 JPEG IMAGE 2 JPEG is the most common image format used by digital cameras and other photographic image capture devices for storing and transmitting photographic images on the World Wide Web. JPEG compression is used in a number of image file formats these format variations are often not distinguished and are simply called JPEG. The term "JPEG" is an acronym for the Joint Photographic Experts Group which created the standard Image data compression is concerned with minimizing the number of bits required to represent an image with no significant loss of information. Image compression algorithms aim to remove redundancy present in the data (correlation of data) in a way which makes image reconstruction possible; this is called information preserving compression Perhaps the simplest and most dramatic form of data compression is the sampling of band limited images, where an infinite number of pixels per unit area are reduced to one sample without any loss of information. Transform based methods better preserve subjective image quality, and are less sensitive to statistical image property changes both inside a single images and between images. Prediction methods provide higher compression ratios in a much less expensive way. If compressed images are transmitted an important property is insensitivity to transmission channel noise. Transform based techniques are significantly less sensitivity to channel noise. If transform coefficients are corrupted during transmission, the resulting image is spread homogeneously through the image or image part and is not too disturbing. 2. LITERATURE SURVEY 3 2.1 INTRODUCTION For the past few years, a joint ISO/CCITT committee known as JPEG (Joint Photographic Experts Group) has been working to establish the first international compression standard for continuous-tone still images, both grayscale and color. JPEG’s proposed standard aims to be generic support a wide variety of applications for continuous-tone images. To meet the differing needs of many applications, the JPEG standard includes two basic compression methods, each with various modes of operation. A DWT-based method is specified for “lossy’’ compression, and a predictive method for “lossless’’ compression. JPEG features a simple lossy technique known as the Baseline method, a subset of the other DWT-based modes of operation. The Baseline method has been by far the most widely implemented JPEG method to date, and is sufficient in its own right for a large number of applications. This article provides an overview of the JPEG standard, and focuses in detail on the Baseline method. Advances over the past decade in many aspects of digital technology especially devices for image acquisition, data storage, and bitmapped printing and display - have brought about many applications of digital imaging. However, these applications tend to be specialized due to their relatively high cost. With the possible exception of facsimile, digital images are not commonplace in general-purpose computing systems the way text and geometric graphics are. The majority of modern business and consumer usage of photographs and other types of images take place through more traditional analog means. 2.2 EXISTING SYSTEM Discrete cosine transform (DCT) is widely used in image processing, especially for compression. Some of the applications of two-dimensional DCT involve still image compression and compression of individual video frames, while multidimensional DCTis mostly used for compression of video streams. DCT is also useful for transferring multi dimensional data to frequency domain, where different operations, like spread spectrum, data compression, data watermarking, can be performed in easier and more efficient manner. A number of papers discussing DCT algorithms is available in the literature that signifies its importance and application 4 2.3 DISADVANTAGES OF EXISTING SYSTEM 1. Assuming a periodic input, the magnitude of the DFT coefficients is spatially invariant .This is not true for the DCT. 2. Only spatial correlation of the pixels inside the single 2-D block is considered and the correlation from the pixels of the neighboring blocks is neglected 3. Impossible to completely decor relate the blocks at their boundaries using DCT 4. Undesirable blocking artifacts affect the reconstructed images or video frames. (high compression ratios or very low bit rates) 2.4 PROPOSED SYSTEM The Discrete wavelet transform (DWT) has gained widespread acceptance in signal processing and image compression. Because of their inherent multi-resolution nature, wavelet-coding schemes are especially suitable for applications where scalability and tolerable degradation are important. Recently the JPEG committee has released its new image coding standard, JPEG- 2000, which has been based upon DWT . DWT has a good localization property in the time domain and frequency domain. Number of encoding bits is less compare to existing method. 2.5 CONCLUSION Image compression is of prime importance in Real time applications like video conferencing where data are transmitted through a channel.Using JPEG standard DCT is used for mapping which reduces the inter pixel redundancies followed by quantization which reduces the psychovisual redundancies then coding redundancy is reduced by the use of optimal code word having minimum average length. 3. ANALYSIS 3.1 INTRODUCTION 5 The of the project is to compress the image the image by using SPIHT with entrophy encoder. Traditional image coding technology mainly uses the statistical redundancy between pixels to reach the goal of compressing. The research on wavelet transform image coding technology has made a rapid progress. Because of its high speed, low memory requirements and complete reversibility, digital wavelet transform (IWT) has been adopted by new image coding standard, JPEG 2000.