• No results found

An Adaptive Algorithm for video compression

N/A
N/A
Protected

Academic year: 2020

Share "An Adaptive Algorithm for video compression"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

335

An Adaptive Algorithm for video compression

T. Sravanthi

1

1 Assistant Professor, Department of ECE, VBIT, JNTUH, A.P, India

Abstract We investigate the increasing popularity of technologies such as Internet streaming video and video conferencing, video compression has became an essential component of broadcast and entertainment media. Here we make use of new motion estimation algorithm with a video

coding standard MPEG-4, has achieved significant

compression by utilizing several advanced techniques. Here we use three types of Motion estimation algorithms are full search algorithm, diamond search algorithm, adaptive motion estimation algorithm. These algorithms are compared based on number of check points, execution time and visual quality. At last we conclude that adaptive motion estimation algorithm is the faster algorithm than compare to the other algorithms.

Index Terms- MPEG-4, discrete cosine transforms (DCT), PSNR, Check points, execution time, search range, search area.

I. INTRODUCTION

Video is nowadays much more than an instrument of leisure. It is used in fields like Medicine and Security in which it demands both quality and manageability. Compression plays here a key role: a good compression should supply easy storage and transmission without lost of information. Many methods have been developed and some standards published to ensure the compatibility between systems.

Video Compression makes it possible to use, transmit, or manipulate videos easier and faster. Many applications benefits from video compression. Compression is the process of converting data to a format that requires fewer bits. If there exists with a loss of information along this process, the compression is lossy. Lossless compression is a manner in which no data is lost. The compression ratio obtained is usually not sufficient and lossy compression is required. This paper is based on MPEG-4 video compression standard.

II. TECHNICAL APPROACH

This paper presents a multi stage technique for motion estimation process called content adaptive search technique for block based video compression. It provides adaptability to the video content to maximize the overall performance and achieves minimum motion vector by compressing video as compare to the full search and diamond search algorithm.

Steps to achieve the algorithm are

1. Record a video.

2. MPEG compression is considered for all frames in a video.

3. Motion estimation algorithms (full search, diamond search, adaptive motion estimation algorithm) are carried out to find motion vectors.

4. Comparison is performed to algorithms based on motion estimation performance parameters.

[image:1.612.330.558.436.511.2]

Video compression is applied on a series of consecutive images in a video stream, making use of similarities between neighboring images. Video compression uses a similar method as that of still image compression. One of the best-known audio and video streaming techniques is called MPEG-4 utilizes one frame as a reference. Each additional frame saves and transports only the image information that is different from the original. Frame sequence of MPEG standard is I B B P B B P B B P B B as shown in the figure [7]

Fig 1: MPEG-4 frame sequence order

Where I-frame is reference frame compressed by using discrete cosine transform, P-frame is called prediction in forward direction [4, 5] which is compressed by taking motion vectors along the reference frame and B-frame is prediction in forward direction as well as in reverse direction which is compressed by taking motion vectors along the reference frame, P-frame and I-frame.

(2)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

336 The frequency domain is a better representation for the data because it makes it possible for you to separate out and throw away information that isn’t very important to human perception. The human eye is not very sensitive to high frequency changes especially in photographic images, so the high frequency data can, to some extent be discarded.

A. Motion Estimation for Video Compression

Figure 2 shows an example of a frame with 2 stick figures and a tree. The second half of this figure is an example of a possible next frame, where panning has resulted in the tree moving down and to the right, and the figures have moved farther to the right because of their own movement outside of the panning. The problem for motion estimation to solve is how to adequately represent the changes, or differences, between these two video frames.

The way that motion estimation goes about solving this problem is that a comprehensive 2-dimensional spatial search is performed for each macro block. Motion estimation is not applied directly to MPEG video, as it is assumed that the color motion can be adequately represented with the same motion information. It should be noted at this point that MPEG does not define how this search should be performed.

[image:2.612.57.261.535.578.2]

This is a detail that the system designer can choose to implement in one of many possible ways. This is similar to the bit-rate control algorithms in respect that complexities vs. quality issues need to be addressed relative to the individual application. It is well known that a full, exhaustive search over a wide 2-dimensional area yields the best matching results in most cases, but this performance comes at an extreme computational cost to the encoder [3, 8].

Fig.2 Example of Motion Estimation

As motion estimation usually is the most computationally expensive portion of the video encoder, some lower cost encoders might choose to limit the pixel search range, or use other techniques such as telescopic searches, usually at some cost to the video quality.

Below figure 3 [9]shows an example of a particular macro block from Frame 2 of previous figure, relative to various macro blocks of Frame 1. As can be seen, the top frame has a bad match with the macro block to be coded. The middle frame has a fair match, as there is some commonality between the 2 macro blocks [10, 12]. The bottom frame has the best match, with only a slight error between the 2 macro blocks. Because a relatively good match has been found, the encoder assigns motion vectors to the macro block, which indicate how far horizontally and vertically the macro block must be moved so that a match is made

As such, each forward and backward predicted macro block may contain 2 motion vectors, so true bi-directionally predicted macro blocks will utilize 4 motion vectors.

Figure 3: Motion Estimation Macro block Example

(3)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

[image:3.612.66.236.148.259.2]

337

Figure 4: Final Motion Estimation Prediction

Of course not every macro block search will result in an acceptable match. If the encoder decides that no acceptable match exists (again, the "acceptable" criterion is not MPEG defined, and is up to the system designer) then it has the option of coding that particular macro block as an intra macro block, even though it may be in a P or B frame. In this manner, high quality video is maintained at a slight cost to coding efficiency.

The temporal prediction technique used in MPEG video is based on motion estimation. The basic premise of motion estimation is that in most cases, consecutive video frames will be similar except for changes induced by objects moving within the frames.

In the trivial case of zero motion between frames (and no other differences caused by noise, etc.), it is easy for the encoder to efficiently predict the current frame as a duplicate of the prediction frame. When this is done, the only information necessary to transmit to the decoder becomes the syntactic overhead necessary to reconstruct the picture from the original reference frame. When there is motion in the images, the situation is not as simple.

Motion Estimation (ME) is an important part of any video compression system, since it can achieve significant compression by exploiting the temporal redundancy existing in a video sequence. Unfortunately it is also the most computationally intensive function of the entire encoding process.

In motion estimation the current image is divided into macro Blocks (MB) .Most of algorithms have been proposed for motion estimation use from BMA based (Block Matching Algorithms) methods. In this methods, motion estimation is performed for a N×M blocks of current frame, It is done with checking entire N×M blocks from search area situated in the reference frame(s) and calculating the difference between the current block and other reference blocks and finally choosing the block that has the most similarity (minimum SAD) to the early block in current frame.

Then, difference of two blocks as residual (motion compensated residual) and the distance of them as motion vector, is coded and transmitted.

Here we use three types of motion estimation algorithms

B. Full Search Algorithm

Steps to get the motion estimation using full search algorithm is to divide each frame in a video into macro blocks. Each MB in reference frame compared with all blocks in P or B frame. If match founds take difference along horizontal & vertical. Calculate SAD (Sum of Absolute Difference). Calculate MAD (minimum absolute difference) based on SAD generates motion vector.

C. Diamond Search Algorithm

To find motion estimation it is having two search patterns are

1. LDSP (Large Diamond Search Pattern)

If search matches with its center switch to SDS Otherwise, create another LDSP for matched point. Process continues until search matches with its center.

2. SDSP (Small Diamond Search Pattern)

If search matches with its center take that as MAD, Otherwise, check other points in SDSP. Process continues until search matches with its center.

D. Adaptive Motion Estimation Algorithm

Accurate motion vector is calculated according to the following procedure

1. MV field (MVF) Prediction: This stage predicts the MVF from the previous coded frame and current frame using the Weighted Mean Inertia (WMI) prediction technique. 2. Motion Analysis: These stages clusters or decomposes MB’s (macro blocks) into different regions and extract motion characteristics of each region and calculates the motion parameters and

3. Motion Estimation: This stage performs motion estimation and finds the accurate motion vector by assuming initial search point (ICP) which is having minimum distortion, and then create cross search pattern. If distortion of surround point is minimum than compare to ICP search goes in exponential direction. In this if distortion at one point is maximum search stops & come back to previous point. Process continues until search is matched with center of cross search pattern.

Full search, diamond search and adaptive motion estimation algorithms are compared by using motion estimation performance parameters are

1. Elapsed time (seconds)

(4)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

338 3. Visual quality: Quality of picture calculated in peak signal to noise ratio (PSNR) which is expressed in decibels.

PSNR = 10log10 (NxX2/Y) (1)

Where N is Length of reconstructed signal and X is maximum absolute value of original signal

III. SIMULATION RESULTS

E Steps in Simulation Process 1. Read the video in frames.

2. Compression ratio is limited to 256M bytes that are why Motion vectors are displayed in 2x256 matrixes because the video system is reader as NTSC video system. 3. The video is divided into group of pictures (GOP).Each picture read as a frame

4. Each frame or image is resized to 128x128.this image is further divided into macro blocks after that compression process is performed based on MPEG frame sequencing.

F Performance Analysis of Full Search Algorithm

After processing the main program in command file number of computations, total checks points, processing times are displayed as when macro block size is 8.

Computations on processing on P4 Frame = 5107 Computations on processing on B2 Frame = 51076 Computations on processing on B3 Frame = 51076 Computations on processing on P7 Frame = 51076 Total Check Points= 408608

Elapsed time is 40.922000 seconds.

[image:4.612.328.560.186.328.2]

Motion vectors are displayed as shown in figure 5

Figure 5: Motion vectors for I1-B2 field

G Performance Analysis of Diamond Search Algorithm After processing the main program in command file number of computations, total check points, processing time are demonstrated. When macro block size is 8.

Computations on processing on P4 Frame = 6270

Computations on processing on B2 Frame = 6203 Computations on processing on B3 Frame = 6227 Computations on processing on P7 Frame = 5419 Total Check Points= 43259

Elapsed time is 11.359000 seconds.

Motion vectors are displayed as shown in figure 6

Figure 6: Motion vectors for I1-B2 field

Visual quality of a video is calculated by using pefcal function.Pefcal function is used for performance calculations. This function calculates the signal to noise ratio, peak signal to noise ratio and normalized root mean square error.

Pefcal (B2, B2d) = 82.5882 dB Pefcal (B2, B2t) =49.9114 dB Pefcal (I1, I1d) = 81.716 dB

H Performance Analysis of Adaptive Motion Estimation Algorithm

After processing the main program in command file number of computations, total check points, processing time are demonstrated. When macro block size is 8. Computations on processing on P4 Frame = 2686 Computations on processing on B2 Frame = 2702 Computations on processing on B3 Frame = 2707 Computations on processing on P7 Frame = 2704 Total Check Points= 21561

Elapsed time is 9.594000 seconds.

Visual quality of a video is calculated by using pefcal function.Pefcal function is used for performance calculations. This function calculates the signal to noise ratio, peak signal to noise ratio and normalized root mean square error.

(5)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

339 Motion vectors are displayed as shown in figure 7

Figure 7: Motion vectors for I1-B2 field\

IV. PERFORMANCE ANALYSIS

[image:5.612.56.282.140.257.2]

The performance comparison of three algorithms based on number of check points, total time to compute the estimation process and visual quality of an image interims of peak signal to noise ratio are resulted in table 1.

Table 1:

Performance evaluation of full search, diamond search and CAST algorithms

ME scheme TCP Time(sec) PSNR Full Search

Algorithm

408608 40.922 83.5406

Diamond Search Algorithm

43259 11.359 83.5882

Adaptive Motion Estimation Algorithm

21561 9.594 83.5950

V. CONCLUSION AND FUTURE SCOPE

MPEG-4 reduces the amount of storage needed, increases the amount of time video can be stored, reduces the network bandwidth used by the surveillance system. So, MPEG-4 standard is best suited for video compression than compared to all other standards. Based on the performance parameters i.e. minimum absolute difference, number of checkpoints and image visual quality the CAST algorithm is best and fastest algorithm to find the accurate motion vectors to compress a video and also it provides adaptability to various types of video contents than compared to the all other algorithms. Diamond search algorithm improves time by 72.2% and peak signal to noise ratio by 0.056 as compared the full search algorithm. Content adaptive search technique algorithm improves time by 76.5% and peak signal to noise ratio by 0.0650 as compared the full search algorithm.

Content adaptive search technique algorithm improves time by 15% and peak signal to noise ratio by 0.0086 as compared the full search algorithm. This paper can also be implemented by using PMVFAST (predictive motion vector field adaptive search technique) and APDZS (advanced predictive diamond zonal search).

REFERENCES

[1 ] Jiancong Luo, Ishfaq Ahmad ,Yongfang Liang, “A Fast Adaptive Motion Estimation Algorithm “,IEEE Transactions on Circuits and Systems for Video Technology VOL.16, NO.3 March 2006, 420-438.

[2 ] Jiancong Luo, Ishfaq Ahmad, Viswanathan Swami Nathan, “A multistage fast motion estimation scheme for video compression”, IEEE Transaction on image processing March, 2004, pp. 1441-1444. [3 ] Jiancong Luo, Yongfang Liang,” Motion estimation for the content adaptive video compression” IEEE Transactions on Circuits and Systems for Video Technology, vol.18, No.7, July 2008, pp.900-909.

[4 ] J. Feng, K. T. Lo, H. Mehrpour, and A. E. Karbowiak, “Adaptive block matching motion estimation algorithm for video coding,” IEE Electron. Lett. vol.31, no.18, pp. 1542–1543, 1995.

[5 ] M.M.Azadfar, A.Ahmadi “Implementation of fast motion algorithms and comparison with the full search method in H.264”, IJCSNS International Journal of Computer Science and Network Security VOL.8, No.3, March 2008, pp.139-143.

[6 ] M. Ezhilarasan and P. Thambidurai”Simplified Block Matching Algorithm for Fast Motion Estimation in Video Compression”, Journal of Computer Science 282-289, 2008. ISSN 1549-3636 © Science Publications

[7 ] Shan Zhu and Kai-Kuang Ma “ A New Diamond Search Algorithm for Fast Block Matching Motion Estimation”, International Conference on Information, Communications and Signal Processing ICICS '97 Singapore, 9-12 September 1997 ,pp. 292-296.

[8 ] Yoshihiro Noguchit, Jun Furukawatt and Hitoshi Kiyatt” A Fast Full Search Block Matching Algorithm for MPEG-4 Video”, IEEE Transactions on Circuits and Systems for Video Technology, 1996, pp 61-65.

[9 ] M. Brand, N. Oliver, and A. Pentland, “Coupled Hidden Markov Models for Complex Action Recognition”, proceedings of CVPR 97. [10 ]S. Chandrasekaran, B. S. Manjunath, Y. F. Wang, J. Winkeler, and H. Zhang, “An Eigenspace Update Algorithm for Image Analysis”, Graphical Models and Image Processing, Vol.59, pp.321–332, 1997. [11 ]R. Collins, A. Lipton, et al. A System for Video Surveillance and Monitoring. CMU-RI-TR-00-12, Robotics Institute, CMU, May, 2000.

[12 ]D. Cunado, J.M. Nash, M.S. Nixon, and J. N. Carter, “Gait extraction and description by evidence- gathering,” Proc. of the International Conference on Audio and Video Based Biometric Person Authentication, pp. 43–48, 1995.

[13 ]N. Contour, A. Kale and R. Chellappa, “Combining MultipleEvidences for Gait Recognition”, ICASSP 2003.

[14 ][11] Q. Delamarre, O. Faugeras, “3D Articulated Models and Multi-View Tracking with Physical Forces”, CVIU Vol. 81, pp328-357, 2001.

(6)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459,ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)

340 [16 ]I. Haritaoglu, D. Harwood, and L. Davis. W4: Who, when, where,

what: A real time system for detecting and tracking people. In Third Face and Gesture Recognition Conference, pages: 222-227, 1998. [17 ]A. Kale, N. Cuntoor, B Yegnanarayana, A.N Rajagopalan, R.

Chellappa, “Gait analysis for human identification”, Proceedings of the 3rd International conference on Audio and Video Based Person Authentication, 2003.

[18 ]A. Kale, A. K. Roy Chowdhury and R. Chellappa, “Towards a View Invariant Gait Recognition Algorithm”, AVSS, 2003.

Figure

Fig 1: MPEG-4 frame sequence order
Fig.2 Example of Motion Estimation
Figure 4: Final Motion Estimation Prediction
Figure 5: Motion vectors for I1-B2 field
+2

References

Related documents

We address this problem for Sperry Glacier in Glacier National Park, USA, using field-measured surface mass balance, geodetic constraints on mass balance, and re- gional climate

The city of Kolkata was also an epicentre of protest agitations on all these issues, both by the principal opposition party, the Trinamool Congress (TMC), led by Ms

Oncofertility in patients with stage I epithelial ovarian cancer fertility sparing surgery in young women of reproductive age RESEARCH Open Access Oncofertility in patients with stage

This paper was dedicated on the modeling of required draft force of the disk plow implement during tillage operations in clay loam soil as affected by forward speed and

method for recommendation, LCE, that combines the content and collaborative information in a unified matrix factorization framework while exploiting the local

Our results suggest a positive and significant association between dividend payouts and corporate governance practices, indicating that firms pay higher dividends if

The analysis of the amount of produced biogas was based on the proportions of the three batch components (corn silage, manure mixed from swines and poultry, and potato pulp)

Although the role of iron in the bacteriostatic properties of fresh human and bovine milk has been established, effects of iron on bacterial growth in cows milk formulas have not