CN102222346B - Vehicle detecting and tracking method - Google Patents
Vehicle detecting and tracking method Download PDFInfo
- Publication number
- CN102222346B CN102222346B CN 201110134533 CN201110134533A CN102222346B CN 102222346 B CN102222346 B CN 102222346B CN 201110134533 CN201110134533 CN 201110134533 CN 201110134533 A CN201110134533 A CN 201110134533A CN 102222346 B CN102222346 B CN 102222346B
- Authority
- CN
- China
- Prior art keywords
- region
- vehicle
- frame
- tracking
- threshold value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention relates to a vehicle detecting and tracking method. The method is characterized by comprising the following steps of: establishing a Gaussian background model for each frame image in a video; performing differential processing on two adjacent frames with a frame subtraction method to obtain a rough motion region and a rough static region; performing background updating on the obtained static region and not updating the motion region; differentiating a current frame image and an updated background image to obtain an accurate motion region; finding an overlap region between motion region images of two obtained adjacent frames with a pixel point matching method and comparing the overlap region with a given threshold value; if the overlap region is larger than the given threshold value, judging whether target overlap occurs; if so, calculating the length-width ratio of a first frame motion region in two adjacent frames and detecting and tracking a motion vehicle according to the ratio; otherwise, judging that the same vehicle moves; and if the overlap region is smaller than the given threshold value, evaluating a minimum external rectangle of a plurality of target frames to correctly detect and track the vehicle.
Description
Technical field
The present invention relates to the image processing method face, particularly a kind of vehicle detection and tracking.
Background technology
Intelligent transportation system (ITS) is a large focus of researching and developing at present.Intelligent transportation system is to apply to whole traffic management system with advanced person's infotech, data communication transmission technology, Electronic transducer technology, electron controls technology and Computer Processing technology etc. are effectively integrated, and set up a kind of on a large scale in, comprehensive playing a role, in real time, accurately and efficiently multi-transportation and management system.
Wherein, in intelligent transportation system, the detection of vehicle and tracking are most basic parts, it requires from the resulting image sequence of video camera, detection has or not moving vehicle to enter the examination hall of video camera, and the position of setting movement vehicle, and it belongs to the research range of computer vision.
At present, have powerful connections poor method, frame difference method and optical flow method of vehicle checking method commonly used.Wherein, the background subtraction method is a kind of method the most frequently used during present moving vehicle is cut apart, and it is to utilize the difference of present image and image to detect a kind of technology of moving region.It utilizes mixed Gaussian distribution modeling to each pixel, and utilizes On-line Estimation to upgrade based on the adaptive Gaussian Background model that closes, thereby has processed reliably the impacts such as interference that illumination variation, background clutter are moved.The method can be extracted complete characteristic, but it is for the variation of dynamic scene, and is very responsive such as weather, illumination and trees disturbance.Therefore, it is crucial how obtaining a background with real-time update ability.Frame difference method is to do to extract the detection that moving vehicle is realized in the moving region based on time difference and the thresholding of pixel between two frames fixing in continuous image sequence or the multiframe partition image.Lipton etc. utilize two frame difference methods to detect moving target from real video, and then are used for the recognition and tracking of target; Frame difference method has stronger adaptivity for dynamic environment, but generally can not extract all relevant feature pixels fully.Inner at vehicle target, produce easily cavitation, and general detected vehicle target can be elongated all, be difficult to obtain more accurate target area.The moving target temporal evolution has the light stream characteristic, therefore just has the optical flow field of the target utilized to realize motion detection.1981, Horn and Schunck creatively interrelated two-dimension speed field and gray scale, introduced the optical flow constraint equation, obtained the rudimentary algorithm of optical flow computation.The people such as Barron sum up multiple optical flow computation technology, according to the difference of theoretical foundation and mathematical method they are divided into four kinds: based on the method for gradient, based on the method for coupling, based on energy approach, based on the method for phase place.But most optical flow computation methods are very complexes, and noise resisting ability is poor, must have specific hardware supported just can finish when processing real-time full frame video stream, otherwise can't satisfy the requirement of real-time.
Will follow the tracks of the moving vehicle that detects, at present vehicle tracking algorithm commonly used mainly contains: based on the track algorithm of feature, based on the track algorithm of 3-D, based on the track algorithm of distorted pattern with based on the track algorithm in zone.Wherein, based on the track algorithm of feature, exactly each car is extracted some features such as diacritic straight line or turning etc., or these Feature Combinations are represented a vehicle, even the outstanding advantage of this class algorithm is to have partial occlusion, some features are still visible.But when vehicle each other too near the time, the problem that exists feature too closely can't cut apart.Be by using the geometry knowledge of video camera and scene based on the track algorithm of 3-D, have the three-dimensional model of precise geometry to project into image with one, follow the tracks of according to the change in location in the image.The advantage of this class algorithm is that accuracy rate is high when the type of vehicle of determining and geometric model details, and shortcoming is that real-time is poor because the workload of calculating is large.Take vehicle ' s contour as tracing object, extract contour feature by the snake active contour model based on the track algorithm of distorted pattern.This method is blocked sensitivity to noise, has profile initialization problem.Based on the track algorithm in zone at first join domain extract and be according to circumstances merged or cut apart.The most serious weakness of the method is that the zone merges and cut apart the inaccurate situation that exists in vehicle detection.
More than multiple vehicle detection and to follow the tracks of efficient not high, need to be badly in need of addressing this problem.
Summary of the invention
The object of the invention is to, for addressing the above problem, the present invention proposes a kind of vehicle detection and tracking, reaches the efficient that has improved detection and tracking.
For achieving the above object, the present invention proposes a kind of vehicle detection and tracking, it is characterized in that, the method step comprises:
Step 1): each two field picture in the video is set up the Gaussian Background model;
Step 2): according to described step 1 this background model image of each vertical frame dimension that) obtains utilizes frame difference method that adjacent two frames are done difference processing, obtains rough moving region and stagnant zone;
Step 3): to described step 2 stagnant zone that obtains) carries out context update, and the moving region is not upgraded;
Step 4): to current frame image and described step 3 background image after the renewal that) obtains is done difference, obtains accurate moving region;
Step 5): utilize each pixel matching process to described step 4 the adjacent two frame moving region images that) obtain are found out the overlapping region, and compare overlapping region and given threshold size;
If greater than given threshold value, then judging whether to occur target, the overlapping region overlaps; If so, then calculate the length breadth ratio of the first frame moving region in adjacent two frames, by this this moving vehicle of ratio detection and tracking; If not, then be judged as same vehicle;
If, then obtaining the minimum boundary rectangle of a plurality of target frames less than given threshold value, the overlapping region comes correctly to vehicle detection and tracking.
Described step 5) threshold value in is 50% of target frame zone.
The invention has the advantages that the present invention combines background subtraction method and frame difference method, overcome the deficiency of two methods, can determine more accurately background and be partitioned into the moving region.Simultaneously, at target following and matching stage, judge for overlapping vehicle and division zone, overcome the shortcoming based on the track algorithm in zone, obtained good effect.
Description of drawings
Fig. 1 is a kind of vehicle detection of the present invention and tracking process flow diagram;
Fig. 2 is background subtraction method synoptic diagram;
Fig. 3 is the overlapping synoptic diagram of moving target;
Fig. 4 is the division synoptic diagram of same vehicle target area;
Fig. 5 is the fusion synoptic diagram in division zone.
Embodiment
Below in conjunction with the drawings and specific embodiments, method of the present invention is described in more detail.
As shown in Figure 1, Fig. 1 is a kind of vehicle detection of the present invention and tracking process flow diagram.Improved vehicle detection and track algorithm that the present invention proposes are described in detail as follows in conjunction with the embodiments: the present embodiment method may further comprise the steps:
1) to each two field picture, sets up the Gaussian Background model;
Single Gaussian Background model that distributes thinks that to a background image, Gaussian distribution is satisfied in the distribution of specific pixel brightness, and each pixel property of background model comprises two parameters like this: mean value u and variance d.Set up the process of background model and exactly each pixel is obtained this two parameters.
2) utilize frame difference method, find out rough moving region and stagnant zone;
Adjacent two frames are done difference processing, obtain the zone of motion change.Find out again the edge of moving object by edge extracting, detect at last moving object.
3) to 2) in the stagnant zone found out carry out context update, the moving region is not upgraded;
Along with the variation of time, background image also can occur to change slowly, and at this moment we will constantly update the mean value of each picture element:
u(t+1,x,y)=a*u(t,x,y)+(1-a)*I(x,y) (1)
4) utilize the background subtraction method, find out the accurate moving region of present frame;
As shown in Figure 2, Fig. 2 is background subtraction method synoptic diagram.Background image after current frame image and the renewal is done difference, obtain the moving region.For the moving region of consecutive frame, seek out lap; Namely for adjacent two two field pictures, utilize the method for each pixel coupling, find out lap.
5) overlap the judgement of vehicle and cutting apart;
As shown in Figure 3, Fig. 3 is the overlapping synoptic diagram of moving target.When vehicle distances is too near, will move the region overlapping phenomenon.When tracked vehicle has occured overlappingly with other vehicle in next frame, with existing track algorithm undetected phenomenon will occur directly, follow the tracks of again after the dividing processing below therefore after following the tracks of unsuccessfully for the first time, carrying out.
Suppose that the detection of i frame moving region is correct, the i+1 frame target occurs and overlaps.So, in the overlapping region was judged, it was overlapping just to have 2 zones and i+1 red area, namely existed target to overlap.Obtain the length breadth ratio of i frame moving region, be partitioned into moving vehicle by this ratio.
6) judgement and the fusion in same vehicle division zone;
As shown in Figure 4, Fig. 4 is the division synoptic diagram of same vehicle target area.When vehicle larger, bus for example because low running speed or texture are close with background, the moving region of obtaining often can split into a plurality of zones through the dilation erosion operation, this will cause mistake to mate.
Bearing calibration: the overlapping region of calculating each target frame of i frame and i-1 frame target frame.If the overlapping region, is just thought coupling greater than 50% of target frame zone.If the same frame coupling of a plurality of target frames of i frame and i-1 frame is just thought to have the mistake coupling, need to merge.As shown in Figure 5, Fig. 5 is the fusion synoptic diagram in division zone.The method that merges is to ask the minimum boundary rectangle of these target frames.
Improved vehicle detection and track algorithm are tested in real system.With the algorithm among the present invention vehicle is detected tracking and counting, count results is compared with the artificial counting result.The actual travel vehicle is 260, the vehicle numerical digit 261 that algorithm calculates after improving; With background subtraction method and the vehicle numerical digit 238 that obtains based on the tracking in zone; With frame difference method and the vehicle numerical digit 241 that obtains based on the tracking in zone.As seen, the method accuracy rate after the improvement has had significantly raising.
It should be noted last that above embodiment is only unrestricted in order to technical scheme of the present invention to be described.Although with reference to embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that, technical scheme of the present invention is made amendment or is equal to replacement, do not break away from the spirit and scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.
Claims (2)
1. a vehicle detection and tracking is characterized in that the method step comprises:
Step 1): each two field picture in the video is set up the Gaussian Background model;
Step 2): this background model image of each vertical frame dimension according to described step 1) obtains, utilize frame difference method that adjacent two frames are done difference processing, obtain rough moving region and stagnant zone;
Step 3): to described step 2) stagnant zone that obtains in carries out context update, and the moving region is not upgraded;
Step 4): the background image after the renewal of current frame image and the acquisition of described step 3) is done difference, obtain accurate moving region;
Step 5): overlap the judgement of vehicle and cut apart;
Utilize each pixel matching process that the adjacent two frame moving region images that described step 4) obtains are found out the overlapping region, and compare overlapping region and given threshold size;
Step 6): judgement and the fusion in same vehicle division zone;
If greater than given threshold value, then judging whether to occur target, the overlapping region overlaps; If so, then calculate the length breadth ratio of the first frame moving region in adjacent two frames, by this this moving vehicle of ratio detection and tracking; If not, then be judged as same vehicle;
If, then obtaining the minimum boundary rectangle of a plurality of target frames less than given threshold value, the overlapping region comes correctly to vehicle detection and tracking.
2. vehicle detection according to claim 1 and tracking is characterized in that, the threshold value in the described step 5) is 50% of target frame zone.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110134533 CN102222346B (en) | 2011-05-23 | 2011-05-23 | Vehicle detecting and tracking method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110134533 CN102222346B (en) | 2011-05-23 | 2011-05-23 | Vehicle detecting and tracking method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102222346A CN102222346A (en) | 2011-10-19 |
CN102222346B true CN102222346B (en) | 2013-03-13 |
Family
ID=44778890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110134533 Expired - Fee Related CN102222346B (en) | 2011-05-23 | 2011-05-23 | Vehicle detecting and tracking method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102222346B (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5867273B2 (en) * | 2012-04-27 | 2016-02-24 | 富士通株式会社 | Approaching object detection device, approaching object detection method, and computer program for approaching object detection |
CN103116986B (en) * | 2013-01-21 | 2014-12-10 | 信帧电子技术(北京)有限公司 | Vehicle identification method |
CN103425764B (en) * | 2013-07-30 | 2017-04-12 | 广东工业大学 | Vehicle matching method based on videos |
CN108694722A (en) * | 2017-04-12 | 2018-10-23 | 杭州登虹科技有限公司 | The method for carrying out target tracking using picture data |
TWI618032B (en) * | 2017-10-25 | 2018-03-11 | 財團法人資訊工業策進會 | Object detection and tracking method and system |
CN108010050B (en) * | 2017-11-27 | 2022-01-25 | 电子科技大学 | Foreground detection method based on adaptive background updating and selective background updating |
CN109028235A (en) * | 2018-09-29 | 2018-12-18 | 佛山市云米电器科技有限公司 | Intelligent Wind Speed adjustable type kitchen ventilator based on background modeling |
CN109324052A (en) * | 2018-09-29 | 2019-02-12 | 佛山市云米电器科技有限公司 | Kitchen ventilator smoking detection method |
CN109684920B (en) * | 2018-11-19 | 2020-12-11 | 腾讯科技(深圳)有限公司 | Object key point positioning method, image processing method, device and storage medium |
CN111275036A (en) * | 2018-12-04 | 2020-06-12 | 北京嘀嘀无限科技发展有限公司 | Target detection method, target detection device, electronic equipment and computer-readable storage medium |
CN111488776B (en) * | 2019-01-25 | 2023-08-08 | 北京地平线机器人技术研发有限公司 | Object detection method, object detection device and electronic equipment |
CN109902627A (en) * | 2019-02-28 | 2019-06-18 | 中科创达软件股份有限公司 | A kind of object detection method and device |
CN113361299B (en) * | 2020-03-03 | 2023-08-15 | 浙江宇视科技有限公司 | Abnormal parking detection method and device, storage medium and electronic equipment |
CN111523385B (en) * | 2020-03-20 | 2022-11-04 | 北京航空航天大学合肥创新研究院 | Stationary vehicle detection method and system based on frame difference method |
CN111781600B (en) * | 2020-06-18 | 2023-05-30 | 重庆工程职业技术学院 | Vehicle queuing length detection method suitable for signalized intersection scene |
CN113066108B (en) * | 2021-04-14 | 2024-07-02 | 武汉卓目科技股份有限公司 | Anti-occlusion visual target tracking method and device based on ECO algorithm |
CN114664096B (en) * | 2022-03-24 | 2023-04-28 | 北京四象网讯科技有限公司 | Method and device for processing monitoring video of parking lot |
CN114549371B (en) * | 2022-04-26 | 2022-09-09 | 中国科学技术大学 | Image analysis method and device |
CN117237396B (en) * | 2023-11-16 | 2024-02-06 | 山东华盛中天工程机械有限责任公司 | Rail bolt rust area segmentation method based on image characteristics |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7620266B2 (en) * | 2005-01-20 | 2009-11-17 | International Business Machines Corporation | Robust and efficient foreground analysis for real-time video surveillance |
CN100495438C (en) * | 2007-02-09 | 2009-06-03 | 南京大学 | Method for detecting and identifying moving target based on video monitoring |
CN100544446C (en) * | 2007-07-06 | 2009-09-23 | 浙江大学 | The real time movement detection method that is used for video monitoring |
-
2011
- 2011-05-23 CN CN 201110134533 patent/CN102222346B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN102222346A (en) | 2011-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102222346B (en) | Vehicle detecting and tracking method | |
Wang et al. | Automatic laser profile recognition and fast tracking for structured light measurement using deep learning and template matching | |
Lan et al. | Vehicle speed measurement based on gray constraint optical flow algorithm | |
CN102289948B (en) | Multi-characteristic fusion multi-vehicle video tracking method under highway scene | |
CN102542289B (en) | Pedestrian volume statistical method based on plurality of Gaussian counting models | |
CN103106659A (en) | Open area target detection and tracking method based on binocular vision sparse point matching | |
CN110379168B (en) | Traffic vehicle information acquisition method based on Mask R-CNN | |
CN108596129A (en) | A kind of vehicle based on intelligent video analysis technology gets over line detecting method | |
CN108198201A (en) | A kind of multi-object tracking method, terminal device and storage medium | |
CN107292297A (en) | A kind of video car flow quantity measuring method tracked based on deep learning and Duplication | |
CN104574439A (en) | Kalman filtering and TLD (tracking-learning-detection) algorithm integrated target tracking method | |
CN104517275A (en) | Object detection method and system | |
CN105760846A (en) | Object detection and location method and system based on depth data | |
CN105809715B (en) | A kind of visual movement object detection method adding up transformation matrices based on interframe | |
CN102496281B (en) | Vehicle red-light violation detection method based on combination of tracking and virtual loop | |
CN102609945B (en) | Automatic registration method of visible light and thermal infrared image sequences | |
CN103903278A (en) | Moving target detection and tracking system | |
Lian et al. | A novel method on moving-objects detection based on background subtraction and three frames differencing | |
CN104599291B (en) | Infrared motion target detection method based on structural similarity and significance analysis | |
CN103440669A (en) | Dynamic Mean shift kernel bandwidth updating method based on compressed domain fusion | |
CN103794050A (en) | Real-time transport vehicle detecting and tracking method | |
CN106558069A (en) | A kind of method for tracking target and system based under video monitoring | |
CN105374049A (en) | Multi-angle-point tracking method based on sparse optical flow method and apparatus thereof | |
CN112541938A (en) | Pedestrian speed measuring method, system, medium and computing device | |
CN107808524A (en) | A kind of intersection vehicle checking method based on unmanned plane |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130313 Termination date: 20150523 |
|
EXPY | Termination of patent right or utility model |