| Vehicle detection and tracking have always been one of the hot topics in the automotive field.With the increase of cars,it has brought unprecedented pressure to the existing transportation system,and the problem of road traffic safety has attracted more and more attention of researchers.In recent years,many researchers have proposed to install advanced driver assistance systems(ADAS)or unmanned driving systems on vehicles to reduce the occurrence of traffic accidents by improving the driver’s vigilance and perception.Vehicle detection and tracking under complex backgrounds play an important role in extracting real-time road condition information.Commonly used sensors for vehicle detection and tracking include lidar,millimeter-wave radar,and vision sensors.Because vision sensors have the advantages of perceiving the colors of the surrounding environment,low cost,and small amount of calculation,this article uses vision sensors.Perform image preprocessing on the collected video images,and propose a vehicle detection method combining taillights and shadows,which solves the misdetection or even missed detection caused by vehicle feature extraction under complex environmental conditions;in-depth study of Camshift based on Kalman filtering theory The algorithm solves the inaccurate tracking situation during the tracking process.The specific research work is as follows:(1)Analyze the current research status of vehicle detection and tracking at home and abroad and some technical difficulties existing in vehicle detection and tracking.The related technologies of image processing are analyzed.Commonly used color space models include RGB(additive color mixing)model and HSV(hexagonal pyramid)model;image preprocessing technologies include region of interest division,image grayscale,color image segmentation,and morphology Processing,filtering,etc.;explored the method of video image framing.(2)Research on vehicle detection methods based on the combination of taillights and shadows.After image preprocessing,there will still be some interference.By constructing the restriction conditions of the tail light pair and the shadow of the bottom of the vehicle,the tail light pair and the shadow are extracted from the image to obtain the vehicle width information,and the vehicle height information is determined by the image size correspondence relationship,thereby extracting the vehicle from the image.A decision function is constructed and different weights are given to each feature to solve the situation of misdetection or missed detection when the vehicle is in a complex driving environment.The vehicle driving images under different illumination and different weather conditions are collected and the effect of the detection algorithm is verified.The results show that the vehicle detection algorithm proposed in this paper can realize the detection of vehicle targets in a complex driving environment.(3)Carried out vehicle tracking algorithm research,including mean shift(Meanshift)algorithm,continuous adaptive mean shift(Camshift)algorithm.Comparing the advantages and disadvantages of the two algorithms,it is found that the improved Camshift algorithm based on the Meanshift algorithm has a better tracking effect.By extracting the H(chromaticity)component in the HSV image,the color histogram is constructed and converted into a color probability distribution map.The color probability distribution map is used to determine the centroid of the target area,and the obtained centroid position is used as the initial center position,and the target is obtained by iterative calculation The actual position of the center in this frame of image is re-planned the size of the search window according to the zero-order moment.Through the analysis and verification of the two algorithms on the video image sequence,the results show that when the size of the tracking target changes,the Camshift algorithm improved based on Meanshift can continuously modify the size of the search window during the tracking process,which is efficient and fast.(4)Research on Camshift vehicle tracking algorithm based on Kalman filtering.When the vehicle target and the surrounding environment have similar color interference,the tracking effect of the Camshift algorithm will deteriorate or even real-time tracking cannot be achieved.Aiming at the similar color interference in the driving environment,this paper deeply researches the Camshift vehicle tracking algorithm based on Kalman filter estimation.Input the detected vehicle target centroid as the initial value into the Kalman filter,estimate the position of the vehicle target in the next frame,and use the Camshift algorithm to determine whether the movement of the centroid exceeds the set threshold,thereby determining the best position of the vehicle target,and use this position as an observation The vector is passed to the Kalman filter for the next position estimation,and finally the adaptive adjustment and continuous tracking of the vehicle target search window are realized.The collected vehicle driving video is used to verify the vehicle tracking of the obtained continuous multi-frame images through the video image framing technology.The results show that when the same color background interference occurs,the method can still achieve accurate and continuous tracking of the vehicle target,which improves the accuracy and robustness of the tracking. |