# A Visual Object Tracking Algorithm Based on Improved TLD
## 2 TLD Tracking Framework  
### TLD Working Principle  
TLD decomposes the tracking problem into three subtasks: tracking, learning, and detection. Each subtask is addressed by a single module and all the modules operate simultaneously. The block diagram of the TLD framework is shown in Figure 3.  
The tracking module is implemented by the median flow algorithm. As shown in Figure 4, the target is represented by a bounding box. Median flow firstly spreads points evenly within the bounding box and estimates the reliability of their displacements; then, half of the points with the most reliable displacements are selected as feature points. The motion of the object is obtained by the median of the displacements of the feature points [19]. The reliability of displacement is estimated by the normalized correlation coefficient (NCC) and the forward and backward error (FBE) using the pyramidal Lucas-Kanade algorithm. Figure 5 shows the definition of FBE. NCC compares the  
Figure 3: Block diagram of the tracking–learning–detection (TLD) tracker. The tracking module follows the object from frame to frame. The detection module localizes the object in every frame. The object model is a collection of positive and negative patches. The learning module updates the object model and detection module. The integrator combines the results of the tracking and detection modules into one bounding box. Figure 2: Block diagram of the proposed algorithm. The kernelized correlation filter (KCF) tracker estimates the location of an object and posts it to the detector. The detection module detects the object just around the estimated location or scans the whole frame if the KCF fails to track. The learning module updates the object model and detector. surrounding patch of the tracked point from the last frame (P1) to the current frame (P2), the definition of which is defined in Formula (1). \[R(x,y)=\frac{\sum\limits_{x^{\prime},y^{\prime}}\left(P_{1}(x^{\prime},y^{\prime} )*P_{2}(x+x^{\prime},y+y^{\prime})\right.}{\sqrt{\sum\limits_{x^{\prime},y^{ \prime}}P_{1}(x^{\prime},y^{\prime})^{2}\sum\limits_{x^{\prime},y^{\prime}}P_{ 2}(x+x^{\prime},y+y^{\prime})}} \tag{1}\]  
The learning module is developed by P-N learning [15]. It evaluates the error of the detector and updates the object model. According to the continuity of motion trajectory, P-experts analyze the negative patches and estimate false negatives using the tracking result, while N-experts estimate false positives by spatial structural correlation, which means the object will just appear in one place in a frame. The object model is a data structure that represents the object (positive) and its surroundings (negative). A patch will be added to the object model if its label estimated by the tracking module is different from that estimated by P-N experts [15]. The object module is used to update the classifiers in the detection module. Detection is realized by cascading the variance classifier, ensemble classifier, and the nearest-neighbor classifier. The variance classifier rejects patches for which the gray-value variance is far smaller than that of the object model. The ensemble classifier generates pixel comparisons to detect the object. The nearest-neighbor classifier calculates the similarity of the performance between the patches and the object model. Finally, the patches that are most similar to the object model are sent to the integrator. The integrator outputs the final bounding box of the TLD by combining the bounding boxes of the tracking and detection modules. The TLD framework guarantees reliable tracking through the tracking and detection modules. Further, the online object model is updated through the learning  
Figure 4: Feature points of TLD. Corner points with light illumination change and small surrounding deformations are more likely to be selected as features points. Figure 5: The definition of forward and backward error (FBE). Point x(t \(-\) 1) is the location of an object in the last frame.