Image Compression, Comparison Between Discrete Cosine Transform and Fast Fourier Transform and the Problems Associated with DCT
Total Page:16
File Type:pdf, Size:1020Kb
Image Compression, Comparison between Discrete Cosine Transform and Fast Fourier Transform and the problems associated with DCT Imdad Ali Ismaili 1, Sander Ali Khowaja 2, Waseem Javed Soomro 3 1Institute of Information and Communication Technology, University of Sindh, Jamshoro, Sindh, Pakistan 2Institute of Information and Communication Technology, University of Sindh, Jamshoro, Sindh, Pakistan Abstract - The research article focuses on the Image much higher than the calculations mentioned above; this Compression techniques such as. Discrete Cosine Transform increases the bandwidth requirement of the channel which is (DCT) and Fast Fourier Transform (FFT). These techniques very costly. This is the challenging part for the researchers to are chosen because of their vast use in image processing field, transmit theses digital signals through limited bandwidth JPEG (Joint Photographic Experts Group) is one of the communication channel, most of the times the way is found to examples of compression technique which uses DCT. The overcome this obstacle but sometimes it is impossible to send Research compares the two compression techniques based on these digital signals in its raw form. Though there has been a DCT and FFT and compare their results using MATLAB revolution in the increased capacity and decreased cost of software, Graphical User Interface (GUI). These results are storage over the past years but the requirement of data storage based on two compression techniques with different rates of and data processing applications is growing explosively to out compression i.e. Compression rates are 90%, 60%, 30% and space this achievement.[8] 5%. The technique allows compressing any picture format to JPG format. The result shows that DCT is better technique 2 Fourier Theory than FFT; however the compression results are same as that of Conversion of Time domain or spatial description 30% compression to 5% compression reflecting not i.e. pixel by pixel description of an image into frequency significant change in visual results excepting the file size domain which applies to the entire image is called the Fourier varying to small fraction. The compression technique works Transform. The conversion of frequency domain to the real fine with the images having little noise but the compression space description is called its inverse Fourier Transform. We technique due to its lossy nature don’t work very well in can easily study the function as it is represented as the series medical images such as CT, X-ray etc. of sum of Sines and Cosines but it has a disadvantage of very complex computation. [4] Keywords: Image Compression, JPEG, Discrete Cosine Transform, Fast Fourier Transform, Image Processing 3 Discrete Fourier Transform The Discrete Fourier Transform (DFT) is the study 1 Introduction of Fourier analysis of finite-domain discrete time signals. The DFT is central to many kinds of signal processing, including As we can analyze that demand for multimedia the analysis of compression of video and sound information. data through the mobile network and conveniently accessing DFT requires large number of multiplications and additions the concerned data through mobile services is growing day by for the calculation. For example a 8-point DFT, there are 8 day. In order to make the multimedia data usage efficient and complex multiplications and 7 complex additions, that’s why insidious it is essential that the data representation and DFT is computed efficiently using a Fast Fourier Transform techniques for encoding the data at different platforms or in (FFT) algorithm. [4] all applications should follow the same standard. In all multimedia data categories image data has got the highest 4 Fast Fourier Transform preference because of its usage and lion’s share in terms of the bandwidth consumption for multimedia communication. Due To find the N-DFT of a given sequence, we only to this it is very necessary as well as a challenge for the need to compute the N/2 complex coefficients, while the researchers to develop efficient methods for image second N/2 complex coefficients can be achieved by compression for effective and efficient use of bandwidth. manipulating the data from the first calculation. Hence N- point DFT requires N2 additions. But with Decimation in In spite of many disadvantages of analog Time algorithms, it requires computing two times N/2-point representation of signals compared to digital counterpart, they DFT. Therefore, number of additions required is need smaller number of bits for storage and transmission. For example, a low-resolution television quality color video of 36 frames/sec where each frame comprises of 800 x 600 pixels need more than 240 Mbps for storage, so the digitized color (1) video for the duration of 1 hour will almost require 96 Gbps for storage. Similarly, the requirement for the HDTV will be Therefore, the complexity is halved. This is how 8 JPEG Algorithm FFT uses Decimation in Time algorithm to reduce the computational time for DFT computation. So, we can say that Discrete Cosine Transform is the real transform FFT is a faster version of DFT. which makes it more attractive then Fourier Transform. The DCT has excellent energy compaction properties. For a Most of the information is contained in low typical image, most of the visually significant information is frequency components as they are associated with the pattern present in just a few coefficients of the DCT. For this reason, in the image. Details in the image are provided by high the DCT is often used in image compression applications. frequency components, but they are very susceptible to noise DCT is defined for 1-D as well as 2-D signals as shown in which causes spurious effects, it is easier to remove the noise below equations 1 & 4 respectively. in frequency domain by just applying the masks to the image within the frequency domain. Many filters in image processing are based on FFT. (2) 5 Discrete Cosine Transform The transformation of two-dimensional matrix of pixel values into an equivalent matrix of spatial frequency Whereas (3) components can be carried out using a mathematical technique known as the discrete cosine transform (DCT). The transformation operation itself is lossless, apart from some small rounding errors in mathematics but once the equivalent matrix of spatial frequency components, known as (4) coefficients, has been derived then any threshold can be dropped. It is only at this point that the operation becomes lossy. (5) 6 Methodology (6) One of the most popular standards used for compression is JPEG standard. It is also known as baseline Where as a(u) is defined as above in equation (3) & (4) and mode or lossy sequential mode which is based on DCT and is u,v=0,1,…..,N-1 adequate for most compression applications, the input and output images are limited to eight bits, while the quantized DCT coefficient values are restricted to 11 bits. The DCT is a mathematical function that transforms image data from the 9 Quantization spatial (pixel by pixel processing) to the frequency domain. In theory, providing the forward DCT is For an M x N image, the spatial domain represents the color computed to a high precision using say, floating point value of each pixel. The frequency domain considers the arithmetic, there is a very little loss of information during the image data as 2-dimensional waveform and represents the DCT phase. Although in practice small losses occur owing to wave form in terms of its frequency components. use of fixed point arithmetic, the main source of information loss occurs during the quantization and entropy encoding 7 Image Processing stages, where the compression takes place. Image processing is the field in which an image is The sensitivity of the eye varies with spatial processed to extract some of the information or features frequency, which implies that the amplitude threshold below embedded in it. These features or information can be fetched which the eye will detect a particular spatial frequency also by processing photographs or video frames. Digital Image varies. In practice, therefore, the threshold values used vary processing refers to the processing applied on to the digital for each of the 64 DCT coefficients. These are held in a 2- image which contains finite number of elements at a particular dimensional matrix known as the quantization table with the location and value and are referred as Pixel or Picture threshold value to be used with a particular DCT coefficient in elements. Pixel is said to be the smallest element in the image. the corresponding position in the matrix, so the threshold Monochrome images varies in intensity from black to white value is important and in practice it is compromise between and the color image stores 3 numbers for each pixel which are the level of compression that is required and the resulting red, green and blue. amount of information loss that is acceptable. 13 Results Results are shown below in the following figures using DCT and FFT Respectively. (7) 10 Need for Compression The importance of these compression techniques are discussed above. However there are always preferences to these applications. Bandwidth availability is not the same everywhere, sometimes it is very difficult to arrange the internet facility or establish a communication network in an area where the infrastructure is not meeting our needs. By allowing such rates of compression we are giving flexibility as to what extent they can bear the loss of information. These areas may include Flood affected areas, areas which are recently struck by a storm etc. 11 Applications Following are the applications in which these Fig. 1 Image Compression using DCT and FFT compression techniques can be used. 1. E-Health Systems 2. Telemedicine 3. Video Conferencing 4. Monitoring and Surveillance These are the major applications where these compression techniques can be used and the need for using is a compulsion because remote areas have limited resources, bandwidth limitation is one of the limited resources which need more financial requirements.