Image Compression System Using H.264 Encoding
Image Compression System Using H.264 Encoding
R H Goudar
Associate Professor
Department of Computer Network Engineering
Visvesvaraya Technological University Belagavi- 590018,
Karnataka
Abstract
The proposed method for image compression using reference images stored in the disk. For each newly uploaded picture which
is in the raw data format, the system does compression by utilizing the massive images already existing in the disk. Weber Local
Descriptor (WLD) is employed for feature extraction. The images in the disk will also be represented in the form of these
features. The features of current image are compared with the image features in the disk to retrieve similar images. A reference
image is selected among the retrieved images. Finally, the current image is treated as a frame in a video sequence by referencing
the image retrieved from disk. This frame is encoded using standard video coding technique which largely compresses the image.
Keywords: Image compression, Current image, Reference image
________________________________________________________________________________________________________
I.
INTRODUCTION
Nowadays the evolution and requirement of multimedia outcome is growing fast, which is added to storage of memory device
and insufficient bandwidth of network. To reduce data redundancy the theory of data compression has become more and more
significant, which in term saves transmission bandwidth and save space. The process of encoding information using lesser bits is
called as data compression in computer science. Hard disk space or transmission bandwidth is considered as expensive resources
that can be reduced using data compression.
The usage of digital cameras and mobile phones are more in demand nowadays. Since more number of images is obtained by
using mobile phones and these images require more space to store. As a result, there is more demand for storage devices to store
images. So to deal with this insufficient of storage devices some of the companies are emerged such as Google drive, drop box
etc. but using this storage space shifts the storage pressure from an individual to a company.
Data compression is one of the technology in multimedia transformation without data compression it could not be possible to
provide communication with clarity by cellular phones. Therefore data compression is a technique where the information is
represented in compact form. Image compression can be one of the important solutions available for file sizes that can be created
with manageable dimensions. In the selection of compression or decompression technique platform portability is important.
To overcome less storage space for images the image compression method is used which minimize the size of the image in
bytes without losing the quality of the image. Compressing the images reduce the cost of taking picture, people tend to take more
images in the same place or of the same objects and these images have different orientations and illumination etc., if these
pictures are uploaded to disk or space the correlations between them can be exploited for compression.
Types of image compression
Lossy image compression:
Lossy compression decreases a file by forever taking out certain data, particularly repetitive data, and particularly repetitive data
like duplicated pixels. Lossy compression is by and large utilized, where a specific measure of data loss will not be distinguished
by users. The JPEG picture file, regularly utilized for photos and other complex still pictures on the web, these pictures that has
lossy compression the creator can choose how much loss to represent and make an exchange off between document size and
picture quality.
Applications that do not need high reliability in picture and video quality are normally achieved using lossy compression
methods. The worthy loss in quality is determined by the utilization case. Typical example of lossy compression identifies with
pictures and recordings caught by advanced cameras or portable telephones, in which information from the picture sensor is
handled to a compacted configuration of either GIF on the other hand JPEG of wanted quality. Lossy pressure can decrease the
digital content size from 5% to very nearly 95% depending on business necessity. So it is called lossy compression.
Lossless compression:
With lossless compression, each and every piece of information that was initially in the file stays after the file is decompressed.
The majority of the data is totally restored. This is generally the technique decision for content or spreadsheet. Applications that
order zero misfortune in the nature of pictures examples by using this technique in medical services commercial ventures which
manage radiographic pictures and assembling commercial enterprises which utilize machine drawings pictures and whose
complex points of interest are noteworthy. Also, pictures of circuit charts and so on are another case that request zero loss in
quality and henceforth utilize lossles.
351
352
Input images
Preprocessing
Query image
Preprocessing
Feature
Extraction
(WBL)
Feature
Extraction
(WBL)
Distance based
image retrieval
Selection of
reference image
Entropy Coding
Quantization
Integer
Transformation
Motion estimation
and compensation
Encoded Bits
Fig. 1: Architecture of compression image system
353
pixel (eg 3 x 3)square regions by using the component of differential excitation for a input image local salient patterns are
extracted and gradient orientation of a current pixel is also calculated. Here we calculate two components of WLD; they are
gradient orientation and differential excitation for every pixel in the given image.
Euclidean distance algorithm:
For the query image feature vector is calculated. The Euclidean distance method used to compare two vector features and it is the
default method of implementation. After the feature vector comparison the difference is obtained if it is small then it is
considered as similar image found in the database. The searching is usually based on the similarity between images not exactly
matching of images.
H.264 Encoding
Basics steps in image compression algorithm are listed below.
1) Motion estimation
2) Motion Compensation and Image subtraction
3) Integer Transformation
4) Quantization
5) Entropy coding
Every block in the execution step applies a discrete calculation that is dependent on the application, approach and the level of
compression. Any computerized picture is just a two-dimensional matrix. The compression calculation changes the picture, or
edge, to an alternate measurement and area, in which image individual parts can be analyzed.
Post analysis, redundant picture parts are quantized and the picture matrix is encoded by utilizing loosless or lossy
compression systems. The encoded picture stream is changed into compressed computerized bit streams, which are utilized for
transmission or storage capacity. If the framework handles a sequence of pictures or video streams, estimation of motion and
motion compensation calculations are the important factor. These segments analyze the present frame by using the previous
frame present in the memory and calculate redundant components that are wrong for further preparing.
Motion estimation:
Motion estimation is the procedure of calculating motion vectors by finding coordinating or matching blocks in the current frame
to the future frame. The temporal redundancy can be easily recognized using motion estimation. In estimation of motion process
number of algorithms are used. The basic assumption is essential, because these algorithms of transnational motion can be
satisfied for rational motion but by using algorithms of block based search zooming cannot be estimated. In video compression
algorithm it is the most computational and crucial process. Between any object of two successive frames there is frame rate
ranges from 15 to 30 frames per second, therefore there is no large motion. Hence matching block in most of the search
algorithms searches in the current block of the neighborhood of next frame. The region of the matched block is search region it is
show in fig.
The quality of the match between two blocks of sizes 8 x 8 or 16 x 16 depends upon the result of MAE (Mean Absolute Error).
Mean absolute error is the average result of pixel-wise difference in matching two blocks. If the result of MAE is small is better
in block match. The minimum value with the displacement of the block is taken as the motion vector.
P
Search Region (-p,p)
Current block
Fig. 2: Search region (-p, p)
Motion Compensation:
The main aim of motion compensation is to minimize the required bandwidth for the image sending. The motion estimation
produces motion vectors, these vectors are used in the process of motion compensation in order to produce the image predicted
in the encoder. The motion compensated frame and current frame are subtracted and the result is sent at the receiver.
In this process blocks are predicted from the previously transmitted reference images signal. For this reason, every macro
blocks are partitioned into smaller blocks with the size of 16 x 8, 8 x 16, 16 x 16 and 8 x 8. Consider in the case of an 8 x 8 sub
macro blocks are divided with size of 8 x 4, 4 x 8, or 4 x 4. In past standards of MPEG-4 or H.263 only few blocks of sizes are
supported like 16 x 16 and 8 x 8. A movement of vector transmitted for every block refers to the previously transmitted reference
picture of identical position to its image signal. The most prior image in past MPEG standards is the reference image. H.264 it is
354
feasible refer more number of prior images. Because of this reason the additional parameter of reference image has to be passed
together by using motion vector. This is the motion compensation prediction technique with number of frames.
Integer Transformation:
Former standards MPEG-1 and MPEG-2 standards used to code prediction signal error by applying two dimensional DCT
(Discrete Cosine Transform) of size 8 x 8. But in H.264/AC instead of DCT different integer transform are applied. The size of
integer transforms 4 x 4, 2 x 2 in special case. Block size of 4 x 4 is smaller used instead of using large block 8 x 8, which
allows the encoder for better prediction error coding of moving objects boundaries, to match the size of motion compensation
smallest block with the size of transform block and for local prediction error signal transformation is adopted.
There are three different types of transforms used. The first type of transform coding is applied to error prediction blocks of all
samples. This contains y luminance component irrespective of intra prediction or motion compensated was used.
The second transform is hadamard transform of size 4 x 4 with the matrix H2; it is applied in addition to first transform. It
transforms all blocks transformed from the luminance signal with 16DC co-efficient.
The third transform also same as second transform it is hadamard transform used, But with variation in size 2 x 2. IT
transforms all blocks of chrominance component signal with 4DC co-efficient.
When compared to DCT, in the transform matrix integer numbers ranges from -2 to 2 when applied the integer transforms. So
this allows the inverse transforms and computing the transform, using 16-bit arithmetic of low shift, subtract and add operations.
But in the case of handamard transform, only subtract and add operations used. Further there is more usage of integer operations
mismatches with the inverse transform are fully avoided but this is not in the case of previous standards and problems are caused.
In integer pixel redundancy the neighboring pixel is used to obtain the information about the given image pixel can be easily
predicted. This predicted pixel is relatively small. Here the redundancy of pixels is removed in order to achieve compression by
reducing inter pixel redundancies in 2-D pixel array are normally used for interpretation and viewing, it must be transformed into
non visual format. Consider an example the difference between neighboring pixels of image can be represented as a image. So
this type of transformation is called as mappings. This process is reversible if the elements of original image can be reconstructed
from the data set transformed.
Quantization:
The principle behind the quantization is removing the spatial redundancies does not lead to any visible loss in quality of image
and the human eyes are not more sensitive to the frequency in the image. The content of spatial frequency of the image is
received by operation of integer transformation; it is followed by the content of frequency removed from image in the
quantization process. The standard of JPEG recommends quantization tables values, these values are used to in the DCT image
to deemphasize more frequencies.
Context based adaptive variable length coding (Entropy coding):
CAVLC encoding mechanism is applied residual data of 4 x 4 sub-blocks. Residual data in lossy coding exposes several
advantages such as 1) once the transformation and quantization is complete, sub-block mostly contains zeros, specifically in high
frequency regions 2) there will be very few highest non zero co efficient.
Frame
I(x,y,t)
(n)
Frame (n+1)
I(x, y, t+1)
Motion
Estimation
Estimation
u,v
Motion
Compensation
Compensation
E(x,y,t) = I(x,y,t) I(x-u,y-v,t+1)
Integer
Transformation
355
(a)
(b)
(c)
(d)
Fig. 4: (a) (b) (c) (d) Experimental results
V. CONCLUSION
The proposed methodology provided the optimal feature extraction and comparison technique based on image retrieval. Based
on the comparison techniques reference image and current image is considered for the encoding. Based on the extracted features,
an efficient encoding mechanism is formed. The experimental results showed the great performance by using H.264 Encoding
method is similar to other encoding mechanisms such as JPEG.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
Jorn Ostermann, Jan Bormans, Video coding with H.264/AVC: Tools, Performance, and Complexity, IEEE Circuits and Systems Magazine, vol
4,issue1,pp 7-28, 02 August 2004.
Wei-Yi Wei, An Introduction to Image Compression. International Conference on Recent Advances and Future Trends in Information Technology, 2013.
Chen Zhao, Siwei Ma, Thousand to One: An Image Compression System via cloud Search, Multimedia Signal Processing (MMSP), 2015 IEEE 17th
International Workshop, pp 1-5, 19-21 Oct. 2015.
Bharati S.H , K.Nagabhushana Raju, Implementation of Intrapredictions, Transform, Quantization and CAVLC for H.264 Video Encoder, 2011
International Journal of Electronics and Communication Engineering.
Manjinder Kaur, Gaganpreet Kaur, A Survey of Lossless and Lossy Image Compression Techniques, Volume 3, Issue 2, February 2013.
Robert Grey, Content-based Image Retrieval: Color and Edges.
Henrique S. Malvar, Marta Karczewicz, Low-Complexity Transform and Quantization. In H 264/AVC, ieee transactions on circuits and systems for
video technology, vol. 13, no. 7, july 2003.
356