A new vehicle detection method

This paper presents a new vehicle detection method from images acquired by cameras embedded in a moving vehicle. Given the sequence of images, the proposed algorithms should detect out all cars in realtime. Related to the driving direction, the cars can be classified into two types. Cars drive in the same direction as the intelligent vehicle (IV) and cars drive in the opposite direction. Due to the distinct features of these two types, we suggest to achieve this method in two main steps. The first one detects all obstacles from images using the so-called association combined with corner detector. The second step is applied to validate each vehicle using AdaBoost classifier. The new method has been applied to different images data and the experimental results validate the efficacy of our method. Keywords-component; intelligent vehicle; vehicle detection; Association; Optical Flow; AdaBoost; Haar filter.


I. INTRODUCTION Detection of road obstacles [1] [2] [3] [4] [5]
is an important task in the intelligent transportation.A number of sensors embedded in IV to perform the vehicle detection task.These sensors can be classified into passive and active sensors.Known that active sensors are expensive and cause pollution to the environment, we propose to use passive sensors in our vehicle detection approach.The data we are going to process to achieve vehicle detection are images taken from a camera embedded in a moving car.
In the field of technical obstacle detected by vision system, two approaches existed: the first approach is unicameral approach that uses a single camera that consists of an image interpretation with former knowledge of information about these obstacles.This information can be texture information [7], color [8], [9].The second one is the stereo or multi-camera approach which is based on the variation map after matching primitives between different views of the sensor [10], [11] and [12].Vehicle detection algorithms have two basic step; Hypothesis Generation (HG) and Hypothesis Verification (HV) [13].In the hypothesis Generation step, the algorithm hypothesizes the locations of vehicles in an image.In the Hypothesis Verification (HV) step, the algorithm verifies the presence of vehicle in an image.The methods in the HG step can be categorized into tree methods; Knowledge-based methods which use symmetry of object, color, corners and edges; Stereo-vision-based methods which use two cameras; Motion-based Methods which track the motion of pixels between the consecutive frames [14].The methods in the HV step are Template-based methods and Appearance methods.Template-based methods use predefined patterns of the vehicle class.Appearance-based methods include pattern classification system between vehicle and non vehicle.There are a many works [15][16] [17] tackling realtime on-road vehicle detection problem.All the papers used monocular cameras and have realtime constraints.[15] used horizontal and vertical edges (Knowledge-based methods) in HG step.The selected regions at HG step are matched with predefined template in HV step.[16] used horizontal and vertical edges in HG step.However, they use Haar Wavelet Transform and SVMs (Appearancebased methods) in HV step.[17] detected long-distance stationary obstacles including vehicles.They used an efficient optical flow algorithm [18] in HG step.They used Sum of squared differences (SSD) with a threshold value to verify their hypothesis.
This paper presents a new approach for vehicle detection.At each time, the decision of the presence of vehicles in the road scene is made based on the current frame and its preceding one.We use the association approach [20], which consists in finding the relationship between consecutive frames.This method exploits the displacement of edges in the frames.At each edge point in one frame we look for its associate one in the preceding frame if any.Obstacles can be detected on the basis of the analysis of association results.Adaboost classifier is used to verify is an obstacle is a vehicle.

II. METHOD VEHICLE DETECTION
This section details de main steps of the proposed method.We extract the edge points and corners of the consecutive images.We keep only the edge points belonging to curves containing corners.The association is performed between consecutive images.We analyze the association results to detect obstacles (objects).Finally, Adaboost is used to decide if a detected object is a vehicle or not.

A. Detecting Corner
We use Shi and Tomasi [19] corner detector that is modified from the Harris corner detector.Shi and Tomasi corner detector is based on the Harris corner detector.Affine transformation is used instead of a simple translation.Given the image patch over the area (u,v).Shi and Tomasi corner detector finds corner with applying Affine transformation A and shifting it by (x,y) (Eq.1). .
After calculating the point's corners threshold was performed to remove small close point's corners, points corners www.ijacsa.thesai.org in a vehicle are much more compared to trees or features of the road.

B. Detecting Edge and filtring
Canny operator is used to detect edge points of the consecutive images.The edge curves are formed by grouping edge points using morphological operations.Among the resulting curves, we keep only the ones crossing at least one of the corners calculated in subsection A.

C. Association
The rest of this subsection describes the method we use to find association between edges of successive frames.Let C k-1 be a curve in the image I K-1 and C k be its corresponding one in the image I K .Consider two edges P k-1 and Q k-1 belonging to the curves C k-1 and their corresponding ones P k and Q k belonging to the curve C k (see Fig. 1).We define the associate point of the point P k-1 as the point belonging to the curve C k which has the same y coordinate as P k-1 .Note that the association is not correspondence neither motion.Two associate points are two points belonging to two corresponding curves of two successive images of the same sequence and having the same y-coordinate.From Fig. 1, we remark that the point Q k meets these constraints.Consequently, Q k constitutes the associate point of the point P k-1 .
In practice, we assume that the movement of the objects from one frame to the other is small.So, if x 1 and x 2 represent the x-coordinates of P k-1 and Q k , respectively, x 2 should belongs to the interval [x 1 -Dx,x 1 + Dx],where Dx is a threshold to be selected.This constraint allows the reduction of the number of associate candidates.The gradient magnitude is used to choose the best associate one.As a similarity criterion, the absolute difference between the gradient magnitudes of the edges is used.As we see in Fig. 1, the point P k represents the match of the point P k-1 .However, the point Q k constitutes the associate of the point P k-1 .We remark that the points P k and Q k are different because of the movement of the point P k in the image I k .
We could not find the association for all edges because of the different viewpoints and then objects movement.It is the same as in the matching algorithm, where some parts are visible in one image but occluded in the other one.
Association approach is a technique used to find the relationship between successive frames, this method exploit the displacement of edges in the frames.Let Q k be an edge (More details about association method are described in [20]).
The associated points should belong to the same object contour and they should have similar or closer gradient magnitudes and orientation.In this work, we use an important cost function (Eq.2) described below in this paper.This function computes the distance between two candidate associate points using gradient magnitudes.The edge with smaller cost will be considered as associated pairs of features.Because of vertical movement of scene, the association approach does not guarantee that each feature in the image have its associated point.But some good associates' points are enough to construct the vehicle objects.
Where d x is the distance that a contour moves between instant t0 and t1.Given point (u, v) in image I t , the algorithm should find the point (if exist) (u + dx, v) in image I t+1 that minimizes function of cost F (Fig. 2).And w is the neighbourhood window around (x,y).

D. Detection of Objects
Let us consider Ass the image association and M and N be the image width and height, respectively.At each pixel (x,y) in the current image, Ass(x,y) is the distance between the pixel (x,y) and its associate one in the preceding image (frame).The obstacles can be detected by using the following functions.Where i = 1,..,M and j = 1,..,N.
The values of the function F 1 and F 2 should be maximum at the areas where there are obstacles.The function F 1 allows to determine the horizontal bounds of obstacles.The function F 2 allows to determine the vertical bounds of obstacles.The segmentation of the two functions helps to determine the horizontal and vertical bounds of obstacles.Fig. 3 illustrates an example of the computation by equations F 1 and F 2 .Fig. 3 (a

E. Validation using Adaboost
In the step of detecting and locating faces, we propose an approach for robust and fast algorithm based on the density of images, AdaBoost, which combines simple descriptors (Haar feature) for a strong classifier.
The concept of Boosting was proposed in 1995 by Freund [21].The Boosting algorithm uses the weak hypothesis (error  [24].[25] Using descriptors histograms of oriented gradients for human detection and bicycles.
In our work we applied the algorithm "Gentle AdaBoost" using the OpenCV library function using two waterfalls -"haarcascade_car_1" and "haarcascade_car_2" -to detect and locate most vehicles in the sequences images.

III. RESULTS
We have performed a number of experiments and comparisons to demonstrate the proposed Association approach in the context of vehicle detection.
The system was implemented on a Intel® Core ™ CPU 2.99 Ghz.We tested the system on different frames of images.The system is able to detect most vehicles in different images in 20 milliseconds it's fast more than algorithm of optical flow [26].IV.CONCLUSION This paper presents a new vehicle detection method based on association notion descrebed above.In order to select more reliable features, the corner detector is used.Based on horizontal and vertical projection of the associated edge points, the focused sub-region is selected as region of interest.
The experiment results have validated the efficacy of our method, and they show that this method is capable to work in real time.In the future, we plan to improve our vehicle detection method, which will be tested to detect much more www.ijacsa.thesai.orgcomplex obstacles (pedestrian, traffic light...) under different weather conditions.

Figure 1 .
Figure 1.IK-1 and Ik represent successive images of the same sequence, e.g.left sequence.The point Qk in the image Ik constitutes the associate point of
) depicts the image association, Fig. 3(b) the computed function F 1 , and Fig. 3(c) the computed function F 2 .

Figure 3 .
Figure 3. (a) Image Association (b) the computed function by equation F1 (3).(c) the computed function by equation F2 (4).rate ε <0.5) a priori knowledge to build a strong assumption.In 1996 Freund and Schapire proposed the AdaBoost algorithm which allowed automatic choosing weak hypothesis with adjusted weight.AdaBoost does not depend on a priori knowledge [22].In 2001, Viola and Jones applied the AdaBoost algorithm in the detection of faces for the first time.With simple descriptors (Haar feature), the method of calculating value descriptors (full image), the cascade of classifiers, this method has become reference face detection for its qualities of speed and robustness.In 2002, Lienhart et al. extended Haar descriptors, experienced in several of AdaBoost algorithms: Discrete Adaboost, Real Adaboost, Gentle Adaboost and Logitboost.These codes learning and detection algorithm AdaBoost are published in the function library OpenCV (Open Source Computer Vision) [23] [24].[25] Using descriptors histograms of oriented gradients for human detection and bicycles.

Figure 4 .
Figure 4. (a) at instant t0 and t1.(b) point's corners of images (a).(c) edges that cross points corners detected at (b).(d) Association vectors of edges from (c) calculated between instants t0 and t1.(e right) vertical and (e left) horizontal projection of the associated edges points.

Fig. 4 Figure 5 .Figure 6 .
Fig.4shows each step of our approach for detection of vehicles using Association and Adaboost.The results illustrate several Strong points of the proposed method.Fig.4.a shows an image at instant t0 ant t1.In Fig.4.b, the point's corners are calculated successfully after threshold to eliminate other obstacles (tree,), although we have only point's corners of vehicles.In Fig.4.c, shows edges that cross points corners and we keep only edges of vehicles.In Fig.4.d, shows associations vectors for each edge in the frame t0.In Fig.4.e shows results calculate in section detection of objects by formulas (3) and (4) to determine abscises and ordinates of obstacles.The proposed method has been tested on other real road images depicted in Fig.6.The HG and HV results are shown in Fig.6.b and Fig.6.crespectively.It's clear that the results computed by our approach are very satisfactory.