Coding of Video Sequences Using Three Step Search Algorithm

Coding of Video Sequences Using Three Step Search Algorithm

Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 49 (2015) 42 – 49 ICAC3’15 Coding of video Sequences using Three ...

746KB Sizes 0 Downloads 25 Views

Available online at www.sciencedirect.com

ScienceDirect Procedia Computer Science 49 (2015) 42 – 49

ICAC3’15

Coding of video Sequences using Three Step Search Algorithm S.M.Kulkarni1* , D.S.Bormane2 , S.L.Nalbalwar3 1 Research Scholar, JNTU Kakinada, India. Principal,JSPM’s Rajarshi Shahu College of Engg. , S.P. Pune University , Pune, India 3 Professor & Head(E&Tc) ,Dr. Babasaheb Ambedkar Technological University, Lonere, Raigad, India. 2

Abstract The rapid development in the technology has dramatic impact on the medical health care field. Medical data base obtained with latest machines like CT Machine, MRI scanner requires large amount of memory storage and also it requires large bandwidth for transmission of data in telemedicine applications. Thus there is need for video compression. As the database of medical images contain number of frames (slices), hence while coding of these images there is need of motion estimation. Motion estimation finds out movement of objects in an image sequence and gets motion vectors which represents estimated motion of object in the frame. In order to reduce temporal redundancy between successive frames of video sequence, motion compensation is preformed. In this paper three step search (TSS) block matching algorithm is implemented on different types of video sequences. It is shown that three step search algorithm produces better quality performance and less computational time compared with exhaustive full search algorithm. © 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license © 2015 The Authors. Published by Elsevier B.V. (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of organizing committee of the 4th InternationalConference on Advances in Computing, Peer-review under responsibility of organizing committee of the 4th International Conference on Advances in Computing, Communication and Control Control (ICAC3’15) (ICAC3’15). Communication and

Keywords: Block matching, motion estimation, Exhaustive Search, Three step search, video compression

* Corresponding author. Tel.: 91 9850257415; fax: +0-000-000-0000 .

E-mail address: [email protected]

1877-0509 © 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of organizing committee of the 4th International Conference on Advances in Computing, Communication and Control (ICAC3’15) doi:10.1016/j.procs.2015.04.225

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

1. Introduction Due to rapid developing technology in medical health care field, ultra modern machines are available which include CT scanner, Magnetic resonance imaging (MRI), echo cardiographs, etc.[9]. With these machines doctors can diagnose and analyses patient’s health. Medical data sets containing video obtained by above techniques need large amount of memory space and it requires large bandwidth for sending the data from one place to another for tele monitoring applications. Thus there is necessity for video compression technique which will reduce the amount of data for representation of a video [1]. In some applications of video compression only compression ratio is important and quality can be comprised, but in medical applications it requires both high quality and good compression ratio hence it is challenging task [3]. For diagnose purpose, compression ratio should not cause loss of details, no artifacts should be introduced. There is also limit for storage and transmission band width. Thus there is much scope for progress in this area [6]. The paper is organized as follows. In Section II, we present review of previous research on compression of video sequences. Section-III describes motion compensated coding, Block matching technique is explained in section-IV. Three step search technique for motion estimation is elaborated in section-V. Implementation results are given in section-VI. Finally conclusion is presented in section-VII. 2. Literature Survey In medical field, Tsai et al. [2] developed a compression scheme for angiogram video sequence in 1994. It was based on a full frame discrete wavelet transform. The local characteristics of frame are exploited to develop compensated frame and it achieved high compression ratio. Gibson et al. [4] proposed that by adaptively searching prediction error and modifying it accordingly, it is possible to eliminate artifects from final image, thus they proposed a lossy wavelet based approach for compression of digital angiogram videos. Analysis of angiogram videos, by higher frequency sub band wavelet decomposition reveals that significant sized regions contain no diagnostic information [12]. Thus for diagnostically unimportant regions, texture modelling approach is used to encode high frequency sub band wavelet coefficients and diagnostically important regions are coded in normal manner. This concept is applicable in hybrid coding where loss less compression is performed for region of interest (ROI) and lossy compression in the regions where high compression and reasonable good quality is required. ROI coding is performed to segment diagnostic important region and it achieves good balance between video quality and compression ratio. Up till now, numbers of efforts have been made to establish common video compression standard for medical applications. The common standard is DICOM (Digital imaging and communication in medicine) which is used for distribution and viewing of medical images [10]. For echo-cardiographs and CT image sequences this standard is used which allows loss less and lossy compression. Enhanced CT image model has been coded into new version of DICOM to improve transfer mechanism of CT frames. The popular lossy compression methods in DICOM are JPEG 2000 and MPEG-2[13]. 3. Motion Compensated Coding Successive video frames may contain the same objects which are either still or moving. . Motion estimation examines the movement of objects in an image sequence and gets vectors representing estimated motion . Data compression is achieved through motion compensation which makes the use of object motion. In the consecutive frames, there is high correlation, hence motion estimation and motion compensation is good technique for inter frame coding [5].In real video scenes there is complex combination of translation and rotational motion. Such motion is difficult to estimate and large amount of processing is required for it. Translation motion can be implemented successfully because it can be estimated easily [8]. There is fact that for the number of frames of movie, the only difference between successive frames is the result of either moving camera or an object in the frame is moving. Motion compensation exploits this fact [11]. Thus information represented in one frame will be the same as information used in next frame. Fig.1 shows the block diagram of motion compensated coding.

43

44

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

Fig. 1 Motion compensated coding Technique

There are two sides, encoding and decoding. Enncoding side estimates the motion in the current frame witth respect to previous frame. Motion compensated image for current frame is then decoded which is used as reference frame [16]. In typical inter frame coder, the input frame is subtracted from prediction of reference frame. Consequeently motion vector and resulting error can be transmitted instead of original block, thus inter frame redundancy is reemoved and t received data compression is achieved. At the receiver end, the decoder builds the frame difference signal from the urrent frame data and adds it to the reconstructed reference frames. The summation gives an exact replica of the cu [15]. The better the prediction the smaller the errror signal and hence the transmission bit rate. 4. Block Matching Technique m estimation: first is pixel recursive algorithm(PRA) and second There are two mainstream techniques of motion is block matching algorithm(BMA) Pixel recurrsive algorithm uses gradient method[18] for individual pixel p motion estimation whereas in the block matching algoorithm it is assumed that all the pixels within the block k has same motion activity[19] . BMA estimates motion on the basis of rectangular block blocks and one motion vecctor for each block is generated. PRAs have more computatioonal complexity and less regularity. Fig.2 illustrates a process of block-matching alggorithm. In the block matching, current frame is divided into matrix of macro blocks. These blocks are then comppared with cosponsoring block and its adjacent neighb bours in the previous frame or reference frame, to create the vector that stipulates movement of macro block from onee location to w gives another in the reference frame. This movement is calculated for all macro blocks in the current frame, which motion estimation of current frame. Normallyy motion estimation is performed only on luminescence blocks to improve coding efficiency. Each luminance bllock is matched against candidate blocks in the search area on the reference frame. These candidate blocks are juust displaced versions of original block . The best cand didate block which is having lowest distortion is found andd its displacement or motion vector is found .The searrch area for finding matching block is constrained up to ‘P’ pixels on all four sides of corresponding macro block b in the previous frame. This ‘P’ is called as search rannge. Larger motion require larger search range and larger is search range, the process of motion compensation becoomes more computationally expensive [20]. Usually the macro m block of size16×16 is selected and search range ‘P’ is 7 Pixels on all four sides. This idea is represented in fig.3 3.

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

Fig. 2 block-matching Technique

Fig.3 search parameter for BMA

The matching of one macro block with another is based on the output of a cost function [15]. that is, cost function decides matching criteria. The macro block which gives least cost function is the best matching block. There are various cost functions; Mean absolute difference (MD) is popular and less computationally expensive cost function. Mean Absolute difference (MAD) is given by equation (1). ேିଵ ேିଵ

ͳ ‫ ؠ ܦܣܯ‬ଶ ෍ ෍ห‫ܥ‬௜௝ െ ܴ௜௝ ห  െ െ െ ሺͳሻ ܰ ௜ୀ଴ ௝ୀ଴

Another cost function is Mean Squared Error (MSE) given by equation (2). ேିଵ ேିଵ

‫ؠ ܧܵܯ‬

ͳ ෍ ෍ሺ‫ܥ‬௜௝ െ ܴ௜௝ ሻଶ  െ െ െ ሺʹሻ ܰଶ ௜ୀ଴ ௝ୀ଴

Where N is the size of the macro bock, Cij and Rij are the pixels being compared in current macro block and reference macro block, respectively. Peak-Signal-to-Noise-Ratio (PSNR) given by equation (3) which characterizes quality of motion compensated image [24]. ܴܲܵܰ ൌ ͳͲ Ž‘‰ଵ଴

ሺʹͷͷሻଶ  െ െ െ ሺ͵ሻ ‫ܧܵܯ‬

This is straightforward Block Matching Algorithm which is also called as full-search algorithm. In this process all candidate blocks in a search window are exhaustively searched to find best matching block. However, this exhaustive search process is very time consuming and it is not suitable for real time application of video.

5. Three Step Search (TSS) Algorithm This is fast algorithm for the reduction of computation. The general idea is represented in Fig 4.It starts the search from centre with the step size S=4. The search parameter value ‘P’ is set to 7, thus it searches eight locations around the centre with step size ± S. From these eight searched locations, it selects the one having least cost and makes it new search origin [7]. It then reduces step size by half i.e. S=/2 and repeats slimier search for two more iterations until the step size S is equal to 1. Thus it finds location with least cost function and the macro block at that

45

46

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

location is the best match. The computation time and number of search points are reduced. For search range ‘P’=7, full search method requires 225 points whereas three step search need 9+8+8=25 points [17].

Fig. 4. Three Step Search procedure

6. Simulation Results The proposed algorithm is simulated using the luminance components of two video sequences. The first is ‘Cal train’ (Frames: 33 Resolution: 400x512) and .Second Video sequence is ‘Chest’ (Frames: 77 Resolution: 256x256). Both the files are supported by Sun View raster format. The block size is 16x16 pixels and the maximum motion displacement of search area is± 7 pixels in both horizontal and vertical directions. Minimum absolute difference (MAD) distortion function is used as the block distortion measure (BDM)[18]Three step search algorithms have been implemented on video sequences ‘Cal train’ and ‘chest’ with a distance of 2 frames between current and reference frame. The results are shown in fig.5 and 6. Fig.5 shows motion estimation coding for “cal train” sequence by using three step search method. Out of 33 frames of ‘cal train’ video sequence we can select any frame as current frame. As shown in Fig.5 (a), frame no .12 is selected as current frame, hence the previous frame will be frame no.10, because the distance of two frames is kept between current and previous frame. We can take the distance of one frame also but as the motion of objects in the frames is not very fast, hence the distance of two frames is selected. Previous frame is shown in Fig.5 (b). The current frame is divided into number of blocks, for each of block in current frame, the best matching block is found from previous frame by using three step search technique. Thus Fig. 5(c) shows motion compensated frame. After this, motion compensated frame is compressed by using Discrete Wavelet transform sub band decomposition technique. Fig.5 (d) represents DWT image. This image consists of all the four types of coefficients, which are LL, LH, HL, and HH. As LL band consist of dominant coefficients, hence with LL band coefficients, image can be reconstructed with fair quality. Fig.5 (e) shows the compressed image, which is obtained by sub band decomposition up to first level.

47

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49 (a)Current frame [frame no.12]

(b) Previous frame [Frame no.10]

 (c) Compensated frame

 (d) DWT image

(e) Compressed frame  Fig. 5 Motion estimation coding for “cal train” sequence by using TSS (a)Current frame [frame no.12] (b) Previous frame [Frame no.10] (c) Compensated frame (d) DWT image (e) Compressed frame

The results of three step search technique applied to Chest sequence are shown in Fig. 6.

(a)Current frame [frame no.22]

(b) Previous frame [Frame no.20]

(c) Compensated frame

(d) DWT image

48

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

(e) Compressed frame Fig. 6 Motion estimation coding for “chest” sequence by using Compensated frame (d) DWT image (e) Compressed image

TSS (a) Current frame [frame no.22] (b) Previous frame [Frame no.20] (c)

In order to evaluate the performance of three step search technique, it is compared with Exhaustive full search method. The various performance parameters selected for comparison are PSNR, MSE, CR and BPP [14]. Table-I and II represents performance parameters obtained by both techniques. It is found that there is improvement in performance with three step search method. The computation cost is also low. In order to find best matching block, full search method has to search 225 macro blocks, where as three step search requires searching of only 25 macro blocks. Thus three step search technique gives significant improvement over exhaustive full search method which can be seen from graphical comparison shown in Fig.7. Table 1 Performance parameter Sequence: Cal train Sr No

Parameters

Exhaustive Full Search

Three Search

1

PSNR

9.9353

8.3452

2

MSE

8.2963-03

8.3090e-03

3

CR

3.6627

4.0341

4

BPP

2.4642

2.1516

Step

TABLE-II Performance parameters Video Sequence: Chest Sr No 1

Parameters PSNR

2

MSE

3

CR

4

BPP

Exhaustive Full Search

Three Step Search

22.2156

20.2341

3.9012

3.9534

2.9567

3.0925

2.9745

2.5869

S.M. Kulkarni et al. / Procedia Computer Science 49 (2015) 42 – 49

Ϯϱ ϮϬ ϭϱ

džŚĂƵƐƚŝǀĞ&Ƶůů ^ĞĂƌĐŚ

ϭϬ ϱ

dŚƌĞĞ^ƚĞƉ ^ĞĂƌĐŚ

Ϭ W^EZ D^^ ϭ

Ϯ

Z

WW

ϯ

ϰ

Fig.7 Graphical comparisons between Exhaustive full searcch and three step search techniques

7. Conclusion In the entire motion based video compression process p motion estimation is the most computationally ex xpensive and time-consuming process. The research in the past decade has focused on reducing both of these sid de effects of o Block matching techniques is the most popular and effficient of the motion estimation. Three step search method of various motion estimation techniques. References [1]A. Kundu,”Modified Block Matching Algorithm for Fast F Block Motion Estimation”,IEEE International Conference on Sig gnal and Image Processing 2010. [2] J. Tsai, H. Hang, “On the design of pattern-based blockk motion estimation algorithms,” IEEE Trans. Circuits Syst. VideoTech hnol.vol. 20, no. 1, pp. 136–143, Jan. 2010. [3]P. Shenolikar, SP. Narote "Different Approaches for Motion M Estimation" international conference on control, automation com mmunication and energy conservation, 4th-6th June 2009. [4] D.k.Park, et al.,”A Fast Motion Estimation Algorithm m for SAD Optimization in Sub-pixel”, IEEE International Symposium m on Integrated Circuits ,ISIC-2007. [5] J. Sunkara, D.Pradeep,,,D.Pavani,”A new video compreession method using DCT/DWT and SPHIT based on accordion represeentation”2012. [6] H. Hen Hu,”A Motion estimation and image segmentatiion technique based on variable block size”, 0-8186-7919-0. [7]H. Yu, Z. Lin, and F. Pan,, “Applications and Improveement of H.264 in Medical Video Compression”, IEEE Transactions on o Circuits and Systems-I Vol. 52, No. 12, December 2005. [8] J. R. Jain and A. . Jain, “displacement measurement annd its application in interframe image coding,” IEEE Transactions on Co ommunications, vol. COM-29, no. 12, pp. 1799-1808, December 1981. [9] H. Yang, Y. Fan, H. Tsao, ”Novel Step search of Blockk-Size Selection for Variable Block-Size Motion Estimation”, IEEE,ICA ALIP 2010. [10] M. Haller, A. Krutz, and T. Sikora, ”Evaluation of pixel and motion vector based global motion estimation for camera motion characterization”2009 [11] J. Lu and M. Liou, “A Simple and Efficient search alggorithm for Block Matching Motion Estimation”, IEEE trans circuits And A Systems for Video Technology, Vol.7, no, 2, pp. 429-433 April 1997. [12]J.Hong Kim, R.Hong Park, J. Lee,”Video Completioon Using Robust Motion Estimation and Color Compensation”, IEE EE International Conference on Consumer Electronics (ICCE) 2011. [13]H. Nisar ,T. Choi,” An Advanced center biased three step search algorithm for motion estimation”, IEEE 0-7803-6536- 4/00 00 2000. [14] K.Laidi, M.Bailiche, M.Mehenni, ”Comparative Sttudy of Block Matching Techniques used in Video Images Motion ns Estimation”, Proceedings of the 5th International Symposium on image and a Signal Processing and Analysis 2007. [15]L. Tao, Y.-ying, S, Gao peng,” A improved three-step search algorithm with zero Detection and vector filter for motion estimation”, IEEE International Conference on Computer Science and Software Engineering 2008. [16] M. H. Kabir, M. A. Haque,”A Novel Block Matching Algorithm for Motion Vector estimation”, IEEE 978-1-4244 4561-5/09 9 2009. [17] P. Lakamsani, B. Zeng, and M. Liou,” An Enhancedd Three Step Search Motion Estimation Method and its VLSl Architecture”, IEEE 07803-3073-0/96 0 1996. [18]P. Wang, P.Xue,” Video coding based on true motion””, IEEE ICASSP 2003. [19]P.elagarapu,et al.,”Image Compression Using DCT andd Wavelet Transformations”2011. [20]Rekhanshi Raghavar, Anil Kumar Sharma “Matlab Based Motion Estimation and Compression in Video Frames Using True Motion Tracker” International Journal of Electronics and Communnication Engineering & Technology (IJECET), ISSN 0976 – 6464(Printt), ISSN 0976 – 6472(Online), Volume 5, Issue 3, March (2014), pp. 34-42

49