Digital Video Compression Using DCT-Based Iterated Function System (IFS)

Large video files processing involves a huge volume of data. The codec, storage systems and network needs resource utilization, so it becomes important to minimize the used memory space and time to distribute these videos over the Internet using compression techniques. Fractal image and video compression falls under the category of lossy compression. It gives best results when used for natural images. This paper presents an efficient method to compress an AVI (Audio Video Interleaved) file with fractal video compression(FVC). The video first is separated into a sequence of frames that are a color bitmap images, then images are transformed from RGB color space to Luminance/Chrominance components (YIQ) color space; each of these components is compressed alone with Enhanced Partition Iterated Function System (EPIFS), then fractal codes are saved. The classical IFS suffers from a very long encoding time that needed to find the best matching for each range block when compared with the domain image blocks. In this work, the (FVC) is enhanced by enhancing the IFS of the fractal image compression using a classification scheme based on the Discrete Cosine Transform (DCT). Experimentation is performed by considering different block sizes and jump steps to reduce number of the tested domain blocks. Results shows a significant reduction in the encoding time with good quality and high compression ratio for different video files.


Introduction
Data rates have to be reduced in order to transmit video data over networks.The main idea of video compression is to exploit redundancies that are present in the video.The Audio Video Interleave file format was originally developed by Microsoft for Intel.The AVI format is now marketed as "Video for Windows".In general, AVI files contain multiple streams of different types of data.Most AVI sequences will use both audio and video streams a standard package to allow its simultaneous playback [1].Fractal image compression (FIC), is a loosy compression method based on the self similarity property of an image, some image parts called the range block are similar to a large part of another image called domain block.Barnsley and Jacquin[2][3], were the first to used the idea of Iterated Function System(IFS).IFS is a collection of contractive affine transformations, and each set of these transformations defines a unique image or what is called fractal [4].Jacquin proposed a new fractal image compression method based on image block, and the method can conduct automatically without manual intervention [5], He improved the IFS proposing the partitioned iterated function system (PIFS), where the image is partitioned into number of ranges that are non-overlapping, and range-wise IFS are found and can be automatically done.Currently, fractal image compression has got extensive attention because of its novel ideas, high compression ratio, besides it can be applied to audio and video compression

Partitioned Iterated Function System (PIFS)
The scheme of PIFS implies partitioning the image into non-overlapped blocks; these blocks are assembled in range pool.While, the extracted blocks from the down-sampled copy of the image are put in the domain pool [9].The sizes and shapes selection for image cells depends on several factors.Small image blocks less than (4x4) are easy to analyze and to classify geometrically [10].The IFS encoding of each range block implies choosing the most resemble domain block listed in the domain pool, and approximating the range by linearly mapping (affine transform) the selected domain block [11].Fractal algorithms convert these parts into mathematical data called fractal codes.In a given input color image, similar blocks are identified using FIC (i.e. the matched domain blocks for each range block in an image).Given two blocks of pixel intensities, first from the domain pool (D i ), the second from range pool (R i ), and using metric optimal values s k for contrast setting and offset o k , brightness setting are computed as following to minimize equation (1): Where s k and o k are calculated as: For each domain block contrast scaling and brightness shift are calculated by using equation ( 2) & (3), the domain block which minimizes equation (1) will be the best matched domain block.The fractal affine transformation for domain block is expressed as: In practice, tx, ty, sk, ok , and k are encoded using 8, 8, 5, 7 and 3 bits, respectively, that are regarded as the compression code of r i [12].

The Proposed Video Compression
Compression basically means reducing the image data with a little affection on their quality.Often more than 50% compression can be achieved without visible difference in quality.Because of the unique features of the fractal coding, this paper, proposed Fractal Video Compression method using PIFS used in fractal coding and DCT transform to compress the AVI videos files.As mentioned above, the main disadvantage of classical IFS scheme is the long time needed to encode the images which lead to slow video compression.So an efficient enhancements have been made on the IFS searching scheme to speed up the encoding time with a very little effect the image quality.In the encoding stage, the AVI video file is loaded and the sequence of frames are extracted as a bitmap image files.These images are converted from RGB to YIQ color components (Y is the luminance component, I and Q are the chromatic components of the image).Each of these components which is considered as the range image, is compressed using the enhanced partitioned iterated function system (EPIFS) encoder separately.The enhanced encoder consists of a set of transforms applied to create the domain image pool from the range image by downsampling it by 2 because the domain preferred to have block patterns similar to the range blocks, although it is possible to use any other image as domain pool.The range image is partitioned to non overlapped blocks of length (L) and partition the domain image to overlapped blocks of the same length to increase the search region.
A set of contractive affine transforms are applied to each range block to find the most similar domain block.The enhancement is done to the classical IFS uses a DCT based descriptor(R) to classify the domain and range blocks.The descriptor is computed for the range and domain blocks depending on the energy compaction property of the low frequency coefficients of the DCT transform.The energy decreases when moving to high frequency part of the DCT domain, this part of coefficients holds the minimal information.The even coefficients like T 20 & T 02 are invariant to block reflection and they will be the same as without reflection.For this reason, they are ignored, so only the coefficients T 10 or T 01 are enough to be used to find DCT based descriptor from the following equations: The domain blocks are sorted according to their Rdescriptor values in an ascending order to reduce the matching time for each range block, and instead of testing all domain blocks for the best match, only the domain blocks with same R values are tested.Another enhancement is done by the Boolean relation of the low DCT coefficients that is used to predict the isometric(or symmetry) operation to avoid testing all the eight symmetry cases, this reduces the searching time to 1/8.The matched domain block parameters are: scale(s), offset(o), symmetry, and domain location, as mentioned above, these parameters are recorded for each range block.
To increase the compression gain at the encoding stage, the best matched domain block parameters is quantized and then Differential Pulse Code Modulation (DPCM) is applied to them.The DPCM encoding records the difference of every two adjacent values (except the first value) to reduce their values before saving them into the compressed video file.
The IFS parameters of the encoded video frames are recorded sequentially into the compressed file.
The proposed video compression encoding steps are explained in the following algorithm: Step 1: Load the AVI file Step2: Extract frames from the video into a series of frames (color bitmap images).
Step3: For each extracted frame do the following: Step 4: Convert the RGB image into YIQ components.
Step End for (of step5) End for (of step 3) End encoding Decompression each frame is simpler to the coding process using a reverse steps but it is faster.The fractal codes stored in the compressed AVI file of each frame components(Y, I, and Q) are decoded using the inverse fractal coding, Using the stored transform data, the reconstruction of the image is obtained by iterating the mapping, typically ten iterations are enough to obtain the final image component of YIQ color space, these components then are transformed back to RGB color space image.
The resulting decoded images are combined together as a frames to create the reconstructed AVI video file.
These videos runs at rate of (30) frame/second.

Experimental Results
The proposed approach is suggested for enhancing the PIFS compression process using the DCT transform to reduce the encoding time.In order to test the performance of the proposed algorithm, experimental results are carried out on the four AVI video files (Kid, Bird, Dance and Car) shown in table (1), each has different number of frames and sizes.
The video frames are extracted as uncompressed bitmap images (BMP).Performance parameters (size of the video before and after the compression, average PSNR, Compression ratio, encoding and decoding time) were registered.
The algorithm is used to compress each video many times with different fractal parameters like block sizes and jump step.

Conclusions
The video compression test results proved that the proposed scheme was very efficient in compressing videos, and from the results of the tested parameters, conclusions could be summarized as the following: 1.The sizes of the AVI videos were the same after the reconstruction with very good quality because of using the high quality bitmap images and the efficient IFS method.2. Using the DCT transform in the affine transformation gives low encoding time because of prediction of the symmetry cases to reducing it to one, and classifying tested domain blocks.3. Low encoding time is obtained by increasing the jump step which helped to avoid testing all domain blocks to find the attractive, while increasing the block size was inversely effected on the encoding time by increasing the search time for bigger blocks.4. The decoding time was little affected in all cases because it only use the stored transform data to reconstruct the image.5.The quality was little affected when increasing the jump step, and does not appear in the video motion.Also using a very big jump step is not preferred because it will increase the time needed to find the attractive.6. Compression ratio is proportional to the block size, the maximum CR obtained was when block length is 8, but it is not recommended to increase the block size more than 8 to avoid increasing time.
[6].Different techniques like DCT, DWT, etc. are used reduce the PIFS long encoding time.The Discrete Cosine Transform (DCT) is an example of transform coding.The DCT coefficients are all real numbers unlike the Fourier Transform[7].DCT technique is most commonly used in the compression of the images.Most of the visually significant information about the image is concentrated in a few coefficients of the Discrete Cosine Transform[8].
or range element , L is the length of domain and range element.R descriptor is calculated based on the ratio difference of the low DCT coefficients into categories or classes.Number of classes is determined by the parameter (Nc ).The R-descriptor is calculated from the following equation: