Embedded Architecture for Object Tracking using Kalman Filter

: Intelligent video is a new area of research fairly wide allowing to do a study, analysis, or interpretation of digital video such as motion analysis. However, for a video surveillance system, a motion analysis task of digital video includes the detection of moving objects and their tracking. The object detection allows the location of the regions of interest, which represents a change of movement. The purpose of tracking is to maintain the identity of objects detected over time by the estimation or the location of their position in each frame of the sequence. The most popular tracking algorithm is the Kalman filtering. In this study a hardware architecture for moving object tracking using Kalman filter on a FPGA board, is proposed.


Introduction
Smart video surveillance is a process of automatically identifying in video sequences, objects, behaviors or events preset by a user or learned by the system. It analyzes and transforms data from one (or more) camera into a semantic interpretation directly usable by a human operator. For example, when an abnormality is detected, the system can send an alert to the staff so that it can decide on the appropriate intervention to set up. Generally, video surveillance systems consist of the following steps: Detection of moving objects, tracking and behavioral analysis of such objects (Yilmaz et al., 2006).
Motion detection techniques can be considered as a preprocessing to reduce analyzing an amount of information. A moving object is detected if the position changes relative to that of a set of static objects or if it is located in an image acquired at the time t of the sequence at a different position from that occupied in the previous image. The object motion in the video can therefore be detected by comparing the contents of at least two frames from the sequence.
The object tracking is to associate objects detected in the current image with those detected in previous images. This is to maintain object identity and the time evolution of their positions (or other characteristic). It can be considered as a problem of spatial and temporal location of objects in the scene (Junzo et al., 2010). It is a classic problem and widely studied in the field of motion analysis, because of its many applications among which we can note video surveillance, robotics, video compression, the study of the objects deformation. Thus, many tracking algorithms have been proposed in recent years (Blackman, 1986).
The most popular tracking algorithm is the Kalman filter. It is essentially a set of recursive equations used together to help modeling and evaluating precisely the movement of a linear dynamic system. In this study an embedded architecture for moving object tracking using Kalman filter, is proposed. This paper is organized as follows: After introducing, section 2 presents a description of the Kalman filter. Its hardware implementation is then described in section 3. Section 4, shows the implementation results and some comparison. Finally, concluding remarks are given in section 5.

Definition
The algorithms to identify the state from measurements are called filters because their action is to restore the system state by eliminating the uncertainties and noises that disturb the information we have on the state. The Kalman filter is based on a diagram of the type prediction-correction. It uses innovative information to correct the prediction of the state taking into account the previous estimate.
The principle of Kalman filtering is to be placed in a probabilistic modeling of uncertainty modeling and noise measurement to calculate the innovation gain. The reconstruction of the state according to measurements is then a problem of Bayesian estimation, i.e., we determine the distribution probability of the posteriori state given the available measures (Breton, 2004).
In the tracking process, the Kalman filter 'looks' at an object when it moves, i.e., it takes the information on the state of the object at that moment. Then, it uses this information to predict where the object is located in the next frame. The position of the object is then corrected considering the prediction and also observation.
The Kalman filter provides an estimate of a process using a feedback system in the form of noisy measurements. In this manner, the Kalman filter equations fall into two types of equations: Prediction equations (extrapolation) and update equations (correction). The extrapolation equations are responsible for propagating the estimated present state and error covariance to obtain the a priori estimates of the next step. While the correction equations are responsible for the feedback, i.e., introduce a new measure with the estimated a priori to obtain an improved estimated posteriori. Therefore, the Kalman filter finally resembles a predictor-corrector filter (Fig. 1).

Equations
The Kalman filter equations provide a smart computational way for estimating the state of a process. It uses two different types of equations in a prediction of the state variable; these being both the extrapolation equations and the update equations.
The extrapolation equations are seen as prediction equations as they are responsible for predicting the current state and covariance matrix, used in time t+1 to predict the previous state. k is representative of the time step, so the prediction equations are basically indicative of k+1.
The update equations are seen as correction equations as they are responsible for correcting the errors that have been made in the extrapolation equations. They are back propagating to get new values for the prior state to improve the prediction for the next state.
In the Kalman filter, the equations describe the state of the successive time system; through these equations we can predict the future state using the state without depending on previous states in the calculations. Figure 2 shows the whole operation of the Kalman filter.

Hardware Implementation
The Kalman filter algorithm is broken up into its constituent operations. These operations include addition, subtraction, multiplication and reciprocal function. Figure  3 shows the proposed architecture of Kalman filter that consists of 16 mathematical operations including various matrix manipulations, which can be computed in 10 calculations cycle. Each calculation cycle involves at least one constituent operation. For example, in the first calculation cycle, two independent multiplications can be calculated at the same time, since the input of one does not depend on the output of the other. For embedded applications, real-time constraint is primary considerations. So, speed optimization is most critical for the Kalman filter design proposed in this study.
As regards the hardware design of the Kalman filter, Fixed point was chosen due to the precision it allows for and the speed benefits it affords. If an application can be done in fixed-point arithmetic, it will probably run faster than in any other format because fixed point is the natural language of the processor (Greg and Bishop, 2006). A 32-bit fixed-point binary number represents all numbers. The 32-bit fixed-point representation uses15 bits for the integer portion, 16 bits for the fractional portion and one bit for the sign. Efficiently multiplying matrices is of paramount importance for any Kalman Filter implementation. The vast majority of mathematical operations are performed on matrix. Graphical representation of two 2×2 matrix multiplicationis presented in Fig. 4.
It is necessary to calculate the reciprocal as part the calculation of K that is the Kalman gain or blending factor (Liu et al., 2007). A problem arises when performing division in binary. Without properly shifting the decimal place to the left, the answer will not be correct. To achieve the correct answer the dividend must be left-shifted by the number of bits that one wishes to have to the right of the radix point. Figure 5 presents the simulation of the proposed architecture of Kalman filter, obtained by Modelsim, where we presented the input, the output and key parameters of the system. The parallelization is the method used for creatinga hardware architecture that meets this requirement. The more parallel calculations that can be done the fewer clock cycles over all that would be needed to compute one iteration of the Kalman filter.

Implementation Results and Evaluation
The implementation of the proposed architecture has been done on a Xilinx Virtex 5 XC5VLX200TFPGA device. it is necessary to represent both the integer and fractional portion of a number. Floating point provides a large dynamic range but with relatively poor precision Table 2 shows the requested hardware resources and maximum operation frequency shows in Table 3.

Conclusion
In this study, we proposed a parallel architecture for object tracking using Kalman filter, which allows having optimizations at speed. The implementation of the proposed design has been done on the Virtex 5 XC5VLX200T FPGA device. When comparing the implementation results of our proposed design for Kalman filter with the design proposed on the Xilinx Virtex-4 XC4VFX140 FPGA device and the design proposed in (Hancey, 2008) on Xilinx Virtex-4 XC4VSX35 FPGA device (see Table), we found that our design is two times faster than other implementations. These optimizations are achieved by focusing on the parallelization and trying to facilitate mathematical operations of this filter.