3
Proceedings of the International Conference on Computer and Communication Engineering 2008 May 13-15, 2008 Kuala Lumpur, Malaysia 978-1-4244-1692-9/08/$25.00 ©2008 IEEE Tracking Using Motion Estimation Mansour A Al Zuair 1 , Bandar Al Rashed 2 1 College of computer and Information Science, King Saud University 2 King Abdulaziz City for Science and Technology Email ([email protected]) Abstract The aim of this paper is to present a new algorithm for tracking objects through image processing. A real time analysis of a scene is performed. The motion estimation of all blocks in a sequence of images of a scene is computed and the motion vectors that show the direction and the distance of all blocks are generated. The motion vector of the largest moving object is generated from the collection of the motion vectors computed. Keywords: Motion Estimation, motion vector Tracking. I. INTRODUCTION With the vast advances in technology especially in processing power it became feasible to apply certain algorithms in some applications. One of these algorithms is motion estimation algorithm [1]. These algorithms used mainly in image and video compression [2]. Motion estimation is the process of finding if a block in a frame has moved compared to a reference frame and to where, motion vectors. The size of this block and the search window differentiate the motion estimation algorithms. The optimum search is the full search where every point in the search window is tested. One common and fast search method is the 3- step search, which uses search grids of 3×3 motion vectors and 3 refinement steps to get an overall search range of 15×15 pixel Figure 1. There are many ways of tracking objects [3 – 5], ours is efficient and gives good results in the context it is used as demonstrated by tests provided at the end of this paper. II. DEFINITION AND ASSUMPTIONS Frame F The algorithm process two frames f(t) and f(t-1) where f(t-1) represent reference picture, and f(t) represent current picture The width of frame in pixels is Gbm_width and the height is Gbm_hight. Block B Each frame is divided into a group of blocks. Each Block has four parameters (x,y): Block index inside the frame B_DX: Block width B_DY: Block hight Therefore, the number of blocks can be calculated as follows: MAXBLKCOLS ൌ Gbm_width B_DX MAXBLKROWS ൌ Gbm_hight B_DY Block Match Criteria MAD (Minimum Average Distortion) criteria will be used to decide if a block on frame(t-1) matches another block on frame(t). ܦܣܯܤ1, ܤ2ሻ= absሺFሺt െ 1, i B1. dx, j B1. dyሻ െ ሺFሺt, i B2. dx, j B2. dyሻሻ B_DX כB_DY _ଵ MAD(B1,B2) range from 0 (Exact match) to 255. Figure 1 393

[IEEE 2008 International Conference on Computer and Communication Engineering (ICCCE) - Kuala Lumpur, Malaysia (2008.05.13-2008.05.15)] 2008 International Conference on Computer and

  • Upload
    bandar

  • View
    215

  • Download
    3

Embed Size (px)

Citation preview

Page 1: [IEEE 2008 International Conference on Computer and Communication Engineering (ICCCE) - Kuala Lumpur, Malaysia (2008.05.13-2008.05.15)] 2008 International Conference on Computer and

Proceedings of the International Conference on Computer and Communication Engineering 2008 May 13-15, 2008 Kuala Lumpur, Malaysia

978-1-4244-1692-9/08/$25.00 ©2008 IEEE

Tracking Using Motion Estimation

Mansour A Al Zuair1, Bandar Al Rashed2

1College of computer and Information Science, King Saud University 2 King Abdulaziz City for Science and Technology

Email ([email protected])

Abstract

The aim of this paper is to present a new algorithm

for tracking objects through image processing. A real time analysis of a scene is performed. The motion estimation of all blocks in a sequence of images of a scene is computed and the motion vectors that show the direction and the distance of all blocks are generated. The motion vector of the largest moving object is generated from the collection of the motion vectors computed.

Keywords: Motion Estimation, motion vector Tracking.

I. INTRODUCTION With the vast advances in technology especially in

processing power it became feasible to apply certain algorithms in some applications. One of these algorithms is motion estimation algorithm [1]. These algorithms used mainly in image and video compression [2]. Motion estimation is the process of finding if a block in a frame has moved compared to a reference frame and to where, motion vectors. The size of this block and the search window differentiate the motion estimation algorithms. The optimum search is the full search where every point in the search window is tested. One common and fast search method is the 3-step search, which uses search grids of 3×3 motion vectors and 3 refinement steps to get an overall search range of 15×15 pixel Figure 1. There are many ways of tracking objects [3 – 5], ours is efficient and gives good results in the context it is used as demonstrated by tests provided at the end of this paper.

II. DEFINITION AND ASSUMPTIONS Frame F

The algorithm process two frames f(t) and f(t-1) where f(t-1) represent reference picture, and f(t) represent current picture The width of frame in pixels is Gbm_width and the height is Gbm_hight.

Block B

Each frame is divided into a group of blocks. Each Block has four parameters

(x,y): Block index inside the frame B_DX: Block width B_DY: Block hight

Therefore, the number of blocks can be calculated as follows:

MAXBLKCOLSGbm_width

B_DX

MAXBLKROWSGbm_hight

B_DY

Block Match Criteria MAD (Minimum Average Distortion) criteria will

be used to decide if a block on frame(t-1) matches another block on frame(t).

1, 2 =

abs F t 1, i B1. dx, j B1. dy F t, i B2. dx, j B2. dyB_DX B_DY

_

MAD(B1,B2) range from 0 (Exact match) to 255.

Figure 1

393

Page 2: [IEEE 2008 International Conference on Computer and Communication Engineering (ICCCE) - Kuala Lumpur, Malaysia (2008.05.13-2008.05.15)] 2008 International Conference on Computer and

III. TRACKING ALGORITHM The new idea of this paper is enhancing the motion

estimation algorithm to be implemented in tracking moving objects. Following is a brief description of the algorithm. Motion Vectors

Each block on frame (t-1) might have one block match on frame (t). The differences between the indexes of two blocks are represent the motion vector, this vector will be stored into array MV of type MOTIONVECTORS.

Typedef struct { int DVx; int Dvy; } MOTION VECTOR

where DVx is the column difference and DVy is the rows difference, calculated as follows:

MV.DVx = B1.x – B2.x; MV.Dvy = B1.y - B2.y;

Where B1 is a block from frame(t-1). B2 is a block match from frame(t). Motion Vectors Calculation

MV array contains motion vectors for all Blocks. The following formula decides the movement of an object: DVx = Sum of all non zero vectors of column axis MAXBLKROWS X MAXBLKCOLS - number of zerocolumns DVy = Sum of all non zero vectors of row axis MAXBLKROWS X MAXBLKCOLS - number of zerorows

Zerocolumns non-moving blocks in columns. Zerorows non moving blocks in rows.

Figure 2 show these parameters on the user interface MDI window.

Figure 3

IV. IMPLEMENTATION AND RESULTS The algorithm was implemented using both full

search and 3-step motion estimation algorithms. In both algorithms all the parameters are programmable, Figure 3.

Many test cases were executed using both 3 step

and full search algorithms. Every test is performed using different parameters, block size and search window size. Test 1 is shown in Figure 4. The test represent large object, Battery, moving in negative horizontal direction, and the actual vector measured is (-8,0). Table 1 shows the estimator results in case of full search algorithm and Table 2 in case of 3 step algorithm using different parameters.

Table: 1 Full Search for the battery

B_DX W_DX (DVx,DVy) 8 32 (-8,0) 8 16 (-2,0) 4 32 (-6,-1) 4 16 (-2,0) 2 32 (-6,0) 2 16 (-3,0)

Figure 2

Figure 4

394

Page 3: [IEEE 2008 International Conference on Computer and Communication Engineering (ICCCE) - Kuala Lumpur, Malaysia (2008.05.13-2008.05.15)] 2008 International Conference on Computer and

Table 2: 3-Step Search for the battery

Test 2 is shown in Figure 5, the test represent large object, spryer, moving in positive horizontal direction, and the actual vector measured is (4,0). Table 3 shows the estimator results in case of full search algorithm and Table 4 in case of 3 step algorithm using different parameters.

Table 3: Full Search for sprayer

B_DX W_DX (DVx,DVy) 8 32 (5,0) 8 16 (6,0) 4 32 (4,-1) 4 16 (5,0) 2 32 (3,-1) 2 16 (5,0)

Table 4: 3-Step Search for sprayer

B_DX S_DX (DVx,DVy) 8 16 (0,0) 8 8 (6,1) 8 4 (6,0) 4 16 (2,0) 4 8 (6,1) 4 4 (4,0) 2 16 (2,0) 2 8 (5,1) 2 4 (3,0)

V. CONCLUSIONS As seen from the testing results, full search gives

slightly more accurate motion vectors for different block sizes, but it is not the best choice for real time tracking system as it requires very high computation power. As for the 3-step it is dependant on the block size and search displacement. However, both algorithms track the direction of the moving objects correctly.

The algorithm was implemented as part of a real

time tracking system for a graduation project were the motion vectors are sent to a motor that move the camera to follow the largest objects moving at the camera seen, results were very impressive.

The algorithm could be enhanced to track more

than one object that move in different directions by generating multiple motion vector or to zoom to the tracked object.

ACKNOWLEDGMENT The authors wish to thank King Saud University for their support of this work.

REFERENCES [1] M. Zuair, D. Melikestian, and C.Y. Roger, `Computational

Analysis of MPEG-2 Encoding Algorithm'', International Conference on ConsumerElectronics, icce96, pp 32-33, June 1996.

[2] Committee Draft of Standard ISO/ICE DIS 11172, ``Coding of moving pictures and associated audio for digital storage media up to about 1.5 Mbit/s', InternationalOrganization for Standardization, 1992.

[3] Techmer, A. Contour-based motion estimation and object tracking for real-time-applications Image Processing, 2001. Proceedings. 2001 International Conference on Volume 3, Issue , 2001 Page(s):648 - 651 vol.3

[4] H. Bhaskar, R.L. Kingsland, and S. Singh Multi-resolution based motion estimation for object tracking using genetic algorithm, IET International Conference on Visual Information Engineering (VIE 2006)(CP522),p.583-588,Bangalore, India, 26-28 Sept. 2006 , ISBN: 0 86341 671 3

[5] Object Tracking Using Background Subtraction and Motion Estimation in MPEG Videos, Lecture Notes in Computer Science, Springer Berlin / Heidelberg, Volume 3852/2006, p 121-130

B_DX S_DX (DVx,DVy) 8 16 (-4,-1) 8 8 (-6,0) 8 4 (-2,-1) 4 16 (-3,1) 4 8 (-4,0) 4 4 (-2,0) 2 16 (-4,0) 2 8 (-4,0) 2 4 (-2,0)

Figure 5

395