In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997

A Fast Algorithm For Rate Optimized Motion Estimation John C.-H. Ju, Yen-Kuang Chen, and S.Y. Kung Department of Electrical Engineering, Princeton Univeristy Abstract Motion estimation is known to be the main bottleneck in real-time encoding applications, and the search for an effective motion estimation algorithm has been a challenging problem for years. This paper describes a new block-matching algorithm which is much faster than the full search algorithm and even produces better rate-distortion curves than the full search algorithms. We observe that piecewise continuous motion field reduces the bit rate for differentially encoded motion vectors. Our motion estimation algorithm exploits the spatial correlations of motion vectors effectively in the sense of producing better rate-distortion curves. Furthermore, we incorporate such correlations in a multiresolution framework to reduce the computational complexity. Simulation shows that this method is quite successful because of the homogeneous and reliable estimation of the displacement vectors.

1 Introduction In most video compression algorithms, there is always a tradeoff between picture quality and compression ratio (and computational cost). Generally speaking, the lower the compression ratio, the better the picture quality. Some researchers have attempted to develop new (better) algorithms which can (1) achieve higher picture quality with same amount of bits, or (2) achieve the same picture quality with less bits. It was believed that the less the sum of absolute difference (SAD), the less the number of bits for residue, and, then, the less the total bit rate. Hence, minimal SAD criterion is widely used in BMAs. Namely, the motion vector for this block is the displacement vector which carries the minimal SAD. motion vector = arg minfSAD(~v)g

(1)

~v

Among several search algorithms to accomplish block matching, the full search methods, where the SADs of all possible displaced candidates within the search area in the previous frame are compared, give the best solution in the viewpoint of estimation error. However, it is observed that the full search BMAs 1. are computationally too costly for a practical real-time application [8, 9]. 2. usually do not produce the true motion field, physical motion, in the video shots [4]. 3. usually cannot produce the optimal bit rate in many coding standardse, as elaborated in Section 2.

2 Rate Optimized Motion Estimation The total number of bits to encode an interframe includes the number of bits of coding motion vectors. In some coding standards, such as H.261, H.263, MPEG-1, MPEG-2, MPEG-4, which encode the motion vectors differentially via variable-length coding [7], the number of bits depends on the behavior of motion vectors. Therefore, it is not always true that the less the SAD, the less the bit rate. Those conventional 472

In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997

Number of Bits Required

14 12 10 8 6 4 2 0 -15

-10

-5 0 5 Vector Difference

10

15

Figure 1: Variable length coding in motion vector difference used in H.263.

block-matching algorithms (BMAs), which treat the motion estimation problem as an optimization problem on SAD only, could suffer from the high price on the differential coding of motion vectors [2]. Figure 1 shows the bit requirement for different vector difference in H.263 standard. The smaller the difference, the less the bits required. A rate-optimized motion estimation algorithm should take account of the total number of bits:

~v1 ~v2  : : :~vn g = arg minfbits(residue1 (~v1 ) Q1 )+ bits(~v1 )+ bits(residue2 (~v2 ) Q2)+ bits(∆~v2 )

f

f~vi g

(2) + bits(residuen(~vn) Qn)+ bits(∆~vn) where ~vi is the motion vector of block i, ∆~vi = ~vi v~i;1 1 , bits(∆~vi ) is the number of bits to encode the ∆~v, residuei (~vi ) is the residue of block i, and bits(residuei (~vi ) Qi ) is the number of bits required for this residue.

+



g

;

The motion estimation problem is formulated as a shortest path (least bit count) finding problem (which considers the number of bits for texture as well as that for motion vectors), and then used dynamic programming or the Viterbi algorithm to find optimal motion vectors [2]. Different quantization Q1 , Q2 ,   , Qn produces different bit rates or distortion of pictures. And, the optimal motion vectors could be different. A Lagrangian-type cost function J = D + λR is further exploited in motion estimation [2] in order to reach near optimal motion vector search in the rate-distortion sense. Since this scheme is computational too complex in the real implementation, several modified methods that consider rate-distortion tradeoffs in a low complexity framework have been proposed [1, 5, 6]. Our Previous Work In [3], we propose a rate-optimized motion estimation based on a “true” motion tracker. We observe that piecewise continuous motion field reduces the bit rate for differentially encoded motion vectors. Hence, a neighborhood relaxation method is proposed as the following: motion of Bi = arg minfSAD(Bi ~v)+ ~v

∑ (µi j

B j 2N (Bi )



SAD(B j ~v +~δ)g

(3)

where N (Bi ) means the neighboring blocks of Bi , a small~δ is incorporated to allow local variations of motion vectors among neighboring blocks due to the non-translational motions, and µi j is the weighting factor for different neighboring blocks. If a motion vector can induce the SADs of the center block and its neighbors to drop, then it is selected to be the motion vector for the encoder. It is an ad hoc approach which performs motion estimation based on rate optimization without actually count the number of bits for encoding motion vectors. Our motion estimation algorithm exploits the spatial correlations of motion vectors effectively in the sense of producing better rate-distortion curves. 1 In

[7], ∆~vi  ~vi ; prediction of ~vi . In this paper, we assume prediction of ~vi = v~i;1 for simplicity.

473

In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997 176 144 Third Level Image

72

16 16

Second Level Image Resolution Reduction

8 8

36 Resolution Reduction

First Level Image 44

Figure 2: The third level images are the images of original resolution. The second level images are the images of a quarter resolution of the third level. (A pixel in second level is the average of four pixels in the corresponding position.) The first level images are a quarter of the second level.

3 Subblock Multiresolution Motion Estimation For lower computational complexity, our new block-matching algorithm is based on successive refinement of motion vector candidates on images of different resolutions. Say, three different resolutions, as shown in Figure 2. A coarser resolution image is obtained by computing the mean of 2  2 pixels from finer levels to represent a pixel in the next coarser level. The image size is reduced by half along both horizontal and vertical directions. A motion estimation is first performed on the coarsest resolution and then the motion vectors of finer resolutions are refined based on the motion information obtained at coarser resolutions. An area in finest resolution represents an area 16 times smaller in coarsest resolution. Therefore, the search area used at the coarsest resolution is also 16 times smaller. Thus, the computational complexity is dramatically reduced. The motion vector obtained from the coarsest resolution is also 4 times coarser in scale. As a result, local refinement in the finer resolution is required for higher accuracy. Step 1 The algorithm starts with a search on the images of most coarse resolution. The first level images are divided into subblocks of 8  8 pixels, as shown in Figure 2. Each of the subblocks can search in the 4  4 possible candidate displaced positions. (The SADs are denoted as SAD8i j (~v).) The SADs of macroblocks (of 16  16 pixels) then can be computed as SAD16 i j

1

1

(~v) = ∑ ∑

SAD82i+∆i2 j+∆ j (~v)g

f

∆i=0 ∆ j=0

without too much computational overhead. In conventional multiresolution BMAs, only one of arg minfSAD8 (~v)g ~v

or

arg minfSAD16 (~v)g ~v

is used as the motion candidate but not both. We observe that the motion vector for the macroblock is better at capturing the global common motion when the macroblock is inside a moving object. On the other hand, the motion vector for the subblock is better at capturing its own true motion when the macroblock covers two or more moving objects. Hence, we select the motion vectors which carry minimal SADs either for subblock or for macroblocks as the candidates. 474

In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997 16

16

16

16

16

16

16

16

16 16

8 8 16

16

16

16

16

16

16

16

Figure 3: Each macroblock in the second level images is covered by four macroblocks in the first level and one subblock in the first level. Therefore, a macroblocks in this level will inherit the five motion vector candidates (one from the subblock and four from the macroblocks) from the first level as the base motion vectors.

Step 2 The motion vector candidates are refined on the images of the finer resolution. As shown in Figure 3, a macroblock in this level will inherit the five motion vector candidates (one from subblock and four from macroblocks) from the first level as the base motion vectors. Then, the subblocks will search in the 1  1 window around these five motion vectors. The motion vectors which carry minimal SADs are selected (either for the subblocks of 8  8 pixels or the macroblocks of 16  16 pixels) again as the motion candidates for the third level. Step 3 In the final step of this method, only macroblocks of the finest resolution require motion estimation. A macroblock in this level, again, will inherit five motion vectors from the second level as the base motion vectors and, then, searches in the 1  1 window around these five motion vectors. The motion vector which carries minimal SAD is selected.

4 Simulation Results We incorporated the above algorithm into the baseline H.263 video codec provided by Telenor R&D [10]. Figure 4 shows the motion vectors found by the full search approach, multiresolution method without neighborhood relaxation, and our subblock multiresolution motion estimation. The motion field of our method is smoother than that of the full search. As a result, the number of bits for coding motion vectors is lower. Using a fixed quantization parameter, our method can achieve 10.7% bit-rate reductions (21.3% bit-rate reductions in coding motion vectors) as well as higher (+0.01 dB) signal-to-noise ratio (SNR) in coding the 108th frame of the “foreman” sequence. Note that Figure 4 also shows the motion vectors found by the multiresolution method without neighborhood relaxation. It also produces smoother motion field than the original full search method. Thus, it lowers 475

In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997

Obtained bit rate (kbit/sec)

50 45 40

Full search on minimal residue Multiresolution w/o N.R. Subblock Multiresolution

35 30 25 20 15 33.3 33.4 33.5 33.6 33.7 33.8 33.9 34 34.1 SNR (dB)

(a)

(b)

(c)

(d)

(e)

(f)

Figure 4: (a)(b) show the 105th frame and the 108th frame of the “foreman” sequence. (c) shows the rate-distortion curve for the original full search method, the multiresolution method without neighborhood relaxation and our method. It is clear that our method could give better quality and better bit-rate. (d) shows the motion vectors found by the full search approach on the minimal residue. (e) shows the motion vectors found by the multiresolution approach without neighborhood relaxation. (f) shows the motion vectors found by our subblock multiresolution search method. The motion field is smoother and, as a result, the number of bits for coding motion vectors is less.

the bit rate by 7.2% (it reduces the bits for motion vectors by 25.5%). But, it degrades the SNR by -0.06 dB. Figure 5 shows the rate-distortion curves for all H.263 test QCIF sequences2 . It is clear that when the quantization step is coarse, the cost on residue coding is relatively smaller and the cost on coding the motion vectors becomes dominant. In this case, our method results in better picture quality and bit rate, as illustrated in the lower-left corner of Figure 5(b). (Note that the reverse phenomenon can be observed in the upper-right corner of Figure 5(b).) If a video has high spatial detail and large amount of local movement (e.g., in “trevor” sequence, there are 6 people moving), then our method cannot work well, as shown in Figure 5(i). Figure 5 also shows that our new algorithm is also more robust than the previously proposed multi-solution algorithm. In (c)(g)(h)(i), our method cannot perform as well as the full search method, but it performs much closer to that of full search than the conventional multiresolution does. In (a)(d)(e)(f), the performance of our method is better than that of the full search method and the conventional multiresolution.

References [1] F. Chen, J. D. Villasenor, and D. S. Park, “A Low-Complexity Rate-Distortion Model for Motion Estimation in H.263,” in Proceedings of ICIP’96, vol. II, pp. 517–520, Sept. 1996. [2] M. C. Chen and A. N. Willson, Jr., “Rate-Distortion Optimal Motion Estimation Algorithm for Video Coding,” in Proceedings of ICASSP’96, vol. IV, pp. 2098–2111, May 1996. block of 16  16 pixels is used as a macroblock for motion vector estimation. Only forward prediction is implemented in the experiments. The maximum horizontal and vertical search displacement is 16. 2A

476

In Proc. of International Symposium on Multimedia Information Processing, Dec. 1997

19 18 17 16 15 14 27.427.627.8 28 28.228.428.628.8 29 29.229.4 SNR (dB)

5.5 5 4.5 4 31.631.8 32 32.232.432.632.8 33 33.233.4 SNR (dB)

(a)

3.4 3.2 3 2.8 30.230.330.430.530.630.730.830.9 31 31.131.2 SNR (dB)

5.8 Full search on minimal residue Multiresolution w/o N.R. 5.6 Sublock Multiresolution 5.4 5.2 5 4.8 4.6

(d)

22

7

6 5.5 5

(f)

6 5.5 5 4.5

29.6

16

28 Full search on minimal residue Multiresolution w/o N.R. Sublock Multiresolution

15 14 13 12 11 30.2 30.4 30.6 30.8 31 31.2 31.4 31.6 31.8 SNR (dB)

(h)

Obtained bit rate (kbit/sec)

Full search on minimal residue Multiresolution w/o N.R. Sublock Multiresolution

Full search on minimal residue Multiresolution w/o N.R. Sublock Multiresolution

6.5

(e) Obtained bit rate (kbit/sec)

Obtained bit rate (kbit/sec)

24

4.5 30.4 30.6 30.8 31 31.2 31.4 31.6 31.8 SNR (dB)

17

(g)

26

(c)

4.4 33.2 33.4 33.6 33.8 34 34.2 34.4 34.6 34.8 SNR (dB)

7

28.8 29 29.2 29.4 SNR (dB)

28

7.5

Obtained bit rate (kbit/sec)

Obtained bit rate (kbit/sec)

Obtained bit rate (kbit/sec)

Full search on minimal residue Multiresolution w/o N.R. Sublock Multiresolution

4 28.4 28.6

30

20 26.626.82727.227.427.627.82828.228.428.628.8 SNR (dB)

6

3.6

6.5

34 Full search on minimal residue Multiresolution w/o N.R. 32 Sublock Multiresolution

(b)

4 3.8

36

Full search on minimal residue Multiresolution w/o N.R. 6 Sublock Multiresolution

Obtained bit rate (kbit/sec)

6.5

22 Full search on minimal residue Multiresolution w/o N.R. 21 Sublock Multiresolution 20

Obtained bit rate (kbit/sec)

Obtained bit rate (kbit/sec)

23

26 Full search on minimal residue Multiresolution w/o N.R. Sublock Multiresolution 24 22 20 18 16 14 26.626.8 27 27.227.427.627.8 28 28.228.428.6 SNR (dB)

(i)

Figure 5: Rate-distortion curves for (a) carphone, (b) claire, (c) foreman, (d) grandma, (e) miss-am, (f) mthr-dotr, (g) salesman, (h) suzie, and (i) trevor sequences. In each sequence, the result is average over the first 102 frames. [3] Y.-K. Chen and S. Y. Kung, “Rate Optimization by True Motion Estimation,” in Proceedings of IEEE Workshop on Multimedia Signal Processing, (Princeton, NJ), pp. 187–194, June 1997. [4] Y.-K. Chen, Y.-T. Lin, and S. Y. Kung, “A Feature Tracking Algorithm Using Neighborhood Relaxation with Multi-Candidate Pre-Screening,” in Proceedings of ICIP’96, vol. III, pp. 513–516, Sept. 1996. [5] W. Chung, F. Kossentini, and M. T. Smith, “Rate-distortion-constrained Statistical Motion Estimation for Video Coding,” in Proceedings of ICIP’95, vol. 3, pp. 184–187, Oct. 1995. [6] B. Girod, “Rate-constrained Motion Estimation,” in SPIE Proceedings of Visual Communication and Image Processing, vol. 2308, pp. 1026–1034, Nov. 1994. [7] ITU Telecommunication Standardization Sector, “ITU-T Recommendation H.263 Video Coding for Low Bitrate Communication.” ftp://ftp.std.com/vendors/PictureTel/h324/, May 1996. [8] T. Koga, K. Iinuma, A. Hirano, Y. Iijima, and T. Ishiguro, “Motion Compensated Interframe Coding for Video Conference,” in Proc. of Nat. Telecommun. Conf., vol. 2, (New Orleans, LA), pp. G5.3.1–5.3.5, Nov/Dec 1981. [9] B. Liu and A. Zaccarin, “New Fast Algorithms for the Estimation of Block Motion Vectors,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 3, no. 2, pp. 148–157, Apr 1993. [10] Telenor R&D, “H.263 Encoder Version 2.0.” ftp://bonde.nta.no/pub/tmn/software/, June 1996.

477

A Fast Algorithm For Rate Optimized Motion Estimation

Abstract. Motion estimation is known to be the main bottleneck in real-time encoding applications, and the search for an effective motion estimation algorithm has ...

104KB Sizes 1 Downloads 344 Views

Recommend Documents

A Fast Algorithm For Rate Optimized Motion Estimation
uous motion field reduces the bit rate for differentially encoded motion vectors. Our motion ... In [3], we propose a rate-optimized motion estimation based on a “true” motion tracker. ..... ftp://bonde.nta.no/pub/tmn/software/, June 1996. 477.

A Fast Sub-Pixel Motion Estimation Algorithm for H.264/AVC Video ...
H.264/AVC is the state-of-the-art video coding standard ... ommended by Associate Editor R. Lukac. .... where R(MV) is the number of bits to code the MV and.

improved rate control and motion estimation for h.264 ... - CiteSeerX
speed in designing the encoder. The encoder developed by the Joint ..... [3] “x264,” http://developers.videolan.org/x264.html. [4] “MPEG-4 AVC/H.264 video ...

Rate-distortion estimation for fast JPEG2000 ... -
Aug 19, 2004 - method that enables pre-compression rate-distortion optimization to be ... coding engine and speedup results for Tier-1 of block coding have ...

Optimized Motion Strategies for Cooperative ...
rover, as well as consistent data fusion in case of a relative measurement. ... visual range. Fox et al. ... [12] present an adaptive navigation and mapping strategy ...

rate optimization by true motion estimation introduction
proved by the removal of redundancy among the block motion vectors within the same ... Those conventional block-matching algorithms ..... inexpensive to code.

Parallelizing H.264 Motion Estimation Algorithm using ...
H.264 is used in many video storage and transmission applications like on Apple's ... accounts for as much as 86% of the total execution time. A motion estimation ..... Acknowledgement. Dark Shikari (x264 developer) and various other people.

VLSI Oriented Fast Multiple Reference Frame Motion Estimation ...
mance. For the VLSI real-time encoder, the heavy computation of fractional motion ... is the most computation intensive part, can not be saved. Another promising ...

Fast Sub-Pixel Motion Estimation and Mode Decision ...
partition selection and only performs the 'precise' sub-pel search for the best ... Motion Estimation process contains two stages: integer pixel search .... full. COST avg. COST. COST avg. COST ii blocktype if c where COSTFull is the best COST after

A Computation Control Motion Estimation Method for ... - IEEE Xplore
Nov 5, 2010 - tion estimation (ME) adaptively under different computation or ... proposed method performs ME in a one-pass flow. Experimental.

A Multiscale Mean Shift Algorithm for Mode Estimation ...
Computer Science, University College London, UK; [email protected] ... algorithm are that (i) it is simple, (ii) it is fast, (iii) it lacks data-dependent parameters ...

Redesigning Workstations Utilizing a Motion Modification Algorithm
Redesigning Workstations Utilizing a Motion Modification Algorithm. Kevin A. Rider, Woojin Park, Don B. Chaffin, and Bernard J. Martin. Proceedings of SAE ...

A Motion Modification Algorithm for Memory-based ...
Computer simulation of human movements is an essential element of Computer-Aided. Ergonomic Design. As a general, accurate, and extendable motion ...

A Fair Adaptive Data Rate Algorithm for LoRaWAN
Abstract. LoRaWAN exhibits several characteristics that can lead to an unfair distribution of the Data Extracted Rate (DER) among nodes. Firstly, the capture effect leads to a strong sig- nal suppressing a weaker signal at the gateway and secondly, t

A Multiscale Mean Shift Algorithm for Mode Estimation 1. Introduction
Computer Science, University College London, UK; [email protected]. 2 ...... 36(4): p. 742-756. 13. Everitt, B.S. and D.J. Hand, Finite Mixture Distributions.

A Fast Bit-Vector Algorithm for Approximate String ...
Mar 27, 1998 - algorithms compute a bit representation of the current state-set of the ... *Dept. of Computer Science, University of Arizona Tucson, AZ 85721 ...

A Fast Algorithm for Mining Rare Itemsets
telecommunication equipment failures, linking cancer to medical tests, and ... rare itemsets and present a new algorithm, named Rarity, for discovering them in ...

A Fast and Efficient Algorithm for Low-rank ... - Semantic Scholar
The Johns Hopkins University [email protected]. Thong T. .... time O(Md + (n + m)d2) where M denotes the number of non-zero ...... Computer Science, pp. 143–152 ...

A Fast and Efficient Algorithm for Low-rank ... - Semantic Scholar
republish, to post on servers or to redistribute to lists, requires prior specific permission ..... For a fair comparison, we fix the transform matrix to be. Hardarmard and set .... The next theorem is dedicated for showing the bound of d upon which

A Fast String Searching Algorithm
number of characters actually inspected (on the aver- age) decreases ...... buffer area in virtual memory. .... One telephone number contact for those in- terested ...

A Fast String Searching Algorithm
An algorithm is presented that searches for the location, "i," of the first occurrence of a character string, "'pat,'" in another string, "string." During the search operation, the characters of pat are matched starting with the last character of pat

Jointly optimized bit-rate/delay control policy for ...
Wireless Packet Networks With Fading Channels. Javad Razavilar ... K. J. R. Liu and S. I. Marcus are with the Electrical and Computer Engineering. Department and Institute ...... B.S. degree from the National Taiwan University,. Taiwan, R.O.C. ...

A Fast Bit-Vector Algorithm for Approximate String ...
Mar 27, 1998 - Simple and practical bit- ... 1 x w blocks using the basic algorithm as a subroutine, is significantly faster than our previous. 4-Russians ..... (Eq or (vin = ;1)) capturing the net effect of. 4 .... Figure 4: Illustration of Xv compu

A Fast Distributed Approximation Algorithm for ...
We present a fast distributed approximation algorithm for the MST problem. We will first briefly describe the .... One of our motivations for this work is to investigate whether fast distributed algo- rithms that construct .... and ID(u) < ID(v). At