0% found this document useful (0 votes)
11 views16 pages

Lecture 21- ME Algorithms

The document discusses various block-based motion estimation (ME) algorithms used in multimedia systems, including full search block motion, 2-D logarithmic search, and three-step search. It details matching criteria such as mean squared error (MSE), mean absolute difference (MAD), and matching pel count (MPC) for determining motion vectors. Additionally, it outlines the computational complexities associated with each algorithm and presents other fast search algorithms like diamond search and hexagonal search.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views16 pages

Lecture 21- ME Algorithms

The document discusses various block-based motion estimation (ME) algorithms used in multimedia systems, including full search block motion, 2-D logarithmic search, and three-step search. It details matching criteria such as mean squared error (MSE), mean absolute difference (MAD), and matching pel count (MPC) for determining motion vectors. Additionally, it outlines the computational complexities associated with each algorithm and presents other fast search algorithms like diamond search and hexagonal search.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Multimedia Systems and Applications

1
Block Based ME Algorithms

1 Introduction to Multimedia Systems and Processing, nptel.


2. H.264 and MPEG-4 Video Compression: Video Coding for
Next-generation Multimedia by I. E. Richardson, Wiley, 2003.
3. Introduction to Data Compression by K. Sayood, Morgan
Kaufmann, 2006.
2
The ME Algorithms
• Full search block motion; has high
computational complexity.
• 2-D Logarithmic search.
• Three step search.
• Gradient descent search
• Diamond search

3
Matching Criteria for block-based ME

• Mean of squarred error (MSE)


• Mean of absolute difference (MAD)
• Matching pel count (MPC)

4
MSE criterion
• The MSE is calculated as:

• The MSE is computed for each displacement position (i,j) within a


specified search range.
• The displacement that gives the minimum value for MSE is
treated as the motion vector.
Or,

• Computation of MSE needs N2 subtractions, N2 multiplications


and (N2-1) additions for each candidate block at each search
position.

5
MAD criterion
• Mean absolute difference at displacement (i,j) is computed as
𝑁 −1 𝑁 −1
1
𝑀 𝐴𝐷 ( 𝑖, 𝑗 )= 2 ∑ ∑ |𝑠 ( 𝑛1 ,𝑛 2 , 𝑘 ) − 𝑠 ( 𝑛1 +𝑖,𝑛2 + 𝑗 ,𝑘 −𝑙 )|
2

𝑁 𝑛 =0 𝑛 =0
1 2

• Needs N2 subtractions with absolute value computation and N2


additions for each candidate block at each search position.
Absence of multiplication facilitates H/W implementation.

6
MPC criterion
• Pixels of the candidate block B are compared with the
corresponding pixels of the block with displacement (i,j) in the
reference frames;
• Count the number of close matches, i.e., the difference is less
than a threshold.
• The displacement for which the count is maximum correspond
to the motion vector.
• Define,
1 if s (n1 , n2 , k )  s (n1  i, n2  j , k  l ) 
count (n1 , n1 ) 
0 otherwise
• The matching pel count is given by MPC (n , n )  N 1 N 1count (n , n )
1 2 1 2
• Motion vector, n 0 n 0 1 2

7
FSBM
• Consider a block from the candidate frame
at coordinates (r,s).
• Then, consider a search window having a
range .
• For each of the (2w+1)2 positions, it is
compared with a block of size N×N.
• The motion vector is determined after
carrying out an exhaustive search.
• This is optimal in the sense that if the
search range is correctly defined, it is
guaranteed to give the best matching
position.

8
FSBM complexity
Matching Computations
criterion
+/-  Comparison
MSE (2N2-1)(2w+1)2 N2(2w+1)2 (2w+1)2
MAD (2N2-1)(2w+1)2 --- (2w+1)2
MPC (2N2-1)(2w+1)2 --- N2(2w+1)2

9
2-D Logarithmic search
• Proposed by [Jain81]. Here, an initial search window is
considered, with an assumed best position as its centre; the
initial guess of the best position may be taken as the
position of the candidate block with respect to the
candidate frame.
• Search only in five locations comprising the centre and the
mid points between the centre and the four edges of the
search window.

[Jain81] J.R. Jain and A.K. Jain, “Displacement measurement and its
application in inter-frame image coding,” IEEE Trans. Commun., Vol.
COM-29, pp. , 1799-1808, Dec. 1981 10
2-D Logarithmic search

Points at (j,k+2), (j+2,k+2), (j+2,k+4), (j+1,k+4) are found to


give the best match in steps 1, 2, 3 and 4 respectively.
• Source: Image and Video Compression for Multimedia Engineering:
Fundamentals … By Yun Q. Shi, Huifang Sun
11
2-D Logarithmic search

Points at (j,k-2), (j+2,k-2) and (j+2,k-1) are found to give the


best match in steps 1, 2, 3 and 4 respectively.
• Src.: Image and Video Compression for Multimedia Engineering:
Fundamentals … By Yun Q. Shi, Huifang Sun
12
2-D Logarithmic search
• Among the five points, the one corresponding to the best
match is selected as the central point for selecting the next
set of five points.
• When a central point of a set of five points or a boundary
point of the search window gives the minimum
dissimilarity, the distance between the five points is
reduced by a factor of two.
• This algorithm is iteratively continued until the search
window is reduced to 3 x 3 size.
• In the final step, all the nine locations are searched and the
location corresponding to the minimum dissimilarity is the
best matching position and the corresponding displacement
is taken to be the motion vector.
13
Three Step Search
• Each step compares a set of nine points that form a 33 grid.
• The distance between the points in the 2-D grid structure decreases
monotonically in steps 2 and 3.
• Involves a total of three steps.

Points at (j+4,k-4), (j+4,k-6) and (j+5,k-7) are found to give the best match in
steps 1, 2 and 3 respectively.
Source: Image and Video Compression for Multimedia Engineering: Fundamentals … By
14
Yun Q. Shi, Huifang Sun
Conjugate Direction Search
• Developed by (Srinivasan84). Consists of two parts: in the first it finds the
minimum dissimilarity between along the horizontal direction with the fixed
vertical position;

• In the second it finds the minimum


along the vertical direction with he
horizontal direction fixed.
• Each step involves a comparison
between 3 testing points, (j,k-1), (j,k)
and (j,k+1). If (j,k-1) is minimum, then
compare (j,k-2), (j,k-1) and (j,k); finally,
(j,k-3) is found to be minimum. Next,
compare along the vertical direction.
Source: Image and Video Compression for Multimedia Engineering: Fundamentals
… By Yun Q. Shi, Huifang Sun.
R. Srinivasan and K. R. Rao, “Predictive coding based on efficient motion estimation,”
IEEE Int. Conf. Commun., Amsterdam, 1984.
15
Other Fast Search Algorithms
• New Three-Step Search (N3SS)
• Four-Step Search (4SS)
• Diamond search.
• Hexagonal search.
• Rood pattern search

16

You might also like