# Fast and Improved Real-Time Vehicle Anti-Tracking System
## 1 Introduction
### Vehicle Detection  
#### 2.2.1 Adaboost Cascade Classifier with Haar Features  
The initial detection system uses the Adaboost cascade classifier with Haar features. To do so, a sample of an image is used to extract those features (Figure 5). This process considers the adjacent rectangular areas at a specific position in the detection window, then adds the intensity of the pixels in each area and calculates the difference in size.  
The use of integrated AdaBoost is a form of \"general learning\" that uses multiple learners to create more powerful learning algorithms. AdaBoost works by selecting a basic algorithm and optimizing it by reporting examples of wrong classifications in the training set [11]. The entire training model is given the same initial weight, and the basic algorithm is selected to train the weak learners. As a result, the weight of the incorrect samples increases. Each time, the primary learner uses the updated weight on the training set, and the training is repeated n times. The final decision is to determine the total weight of n learners.  
The Adaboost steps [12] can be summarized as follows:  
* Given example images \((x_{1},\ y_{1})\dots(x_{n},\ y_{n})\) where \(y_{i}\) = 0, 1 for negative and positive examples respectively.
* Initialize weights \(w_{1,i}\) =\(\frac{1}{2m}\) or \(\frac{1}{2l}\) for \(y_{i}\) = 0 or 1, respectively. The variables \(m\) and \(l\) are the numbers of negatives and positive, respectively.
* For \(t=1,\dots,T\) : 1. Normalize the weights, \[w_{t,i}\leftarrow\ \frac{w_{t,i}}{\sum_{j=1}^{n}w_{t,j}}.\] (1)
2. Select the best weak classifier for the weighted error: \[\epsilon_{t}\text{=}\mathit{min}_{f,p,0}\sum\
olimits_{i}w_{i}\big{|}h(x_{i}, f,p,\theta)-y_{i}\big{|}.\] (2)
3. Define \(h_{t}(x)=h(x,f_{t},p_{t},\theta_{t})\), where \(f_{t},p_{t}\) and \(\theta_{t}\) are the minimizers of \(\epsilon_{t}\).  
Figure 4: Noise removal.  
Figure 5: Haar features on vehicle image.  
. Update the weights, \[w_{t+1,i}=\ w_{t,i}\beta_{t}^{1-e_{i}},\] (3) where \(e_{i}=0\) if example \(x_{i}\) is classified correctly, \(e_{i}=1\) otherwise, and \(\beta_{t}=\frac{e_{i}}{1-e_{i}}\).
* The final strong classifier is \[C(x)= \left\{\begin{array}{cc}1,&if\ \sum_{t=1}^{T}\alpha_{t}h_{t}(x)\geq\ \frac{1}{2}\sum_{t=1}^{T}\alpha_{t}\\ &0,\ \text{otherwise}\end{array}\right.,\] (4) where \(\alpha_{t}=\ log\frac{1}{\beta_{t}}\).  
To achieve this overall learning strategy, many classifiers are combined, and each classifier is based on the results of one or more Haar features. The cascade classification includes a list of steps, and each step includes a list of weak learners. The algorithm detects cars by placing and moving sliding windows on the image. Each stage of the classification denotes the specific area defined by the current sliding window position as positive (vehicle detected) or negative (vehicle not detected) (Figure 6). If the marking result is negative, the classification of this specific region is now complete and the sliding window position moves to the next position. If the mark gives good results, the area (\(32\times 32\) numbers) will move to the next classification step. Objects are identified as they go through all stages of classification. This document focuses on three steps.  
Further modifications were done to improve the speed and accuracy of the system.