实例介绍
基于Opencv的交通流量实时检测算法,基于VC6.0+Opencv,可实现检测准确率98%以上。
the update to the object in the hackground, affects the accuracy ∑∑xg(x,y) TIL. OBJECT TRACKING Ec=-N N Moving object tracking in [4-6] is in the moving object ∑∑g(x,y) detection technology on the basis of the moving object x=1y=1 classification and tracking technology, it is the basis of motion analys classification. Moving object tracking involv'es feature extraction, motion estimation and image matching y xg(r,) (8) Generally speaking, three-dimensional bodys movement gtx,y displayed smoothness in the time, the movement track algorithm idea is estimates its current condition according to the vidco frequency object formerly condition. The movement The centroid a]gorithm's computation is simple. the track algorithm is based on the sequence of video images on omputation load is small, in a short time may achieve the the framc or match the charactcristics of optical flow estimates computation input object the position. Under the simple and describes the process of real-time dynamic model The background pattern, the centroid algorithm is quite effective, track algorithm's performance relies on the dynamic mode accuracy which uses in it. The dynamic model may divide into requirements two categories: First, represents three-dimens onal image point the two-dimensional plane trajectory movement model IV. SYSTEM DESIGN AND IMPLEMENTATION represents two-dimlensiunal Imodel of the pliysical The entire procedure have been designed by visual C++6.() movement of the dynamic features of the three-dimensional and the OpenCV image development package. Mainly aims at Inodel of movemenT. Soyrnenlaion is usually extracted frorn the scene invariably, the relative stabilization the situation, to the cbjcet characteristies, can be uscd to track the features enters in the scene the movement object to carry on the include, brightness edge, texture and regional. detection. the track, the extraction movement ohject When carries on the track to the video image sequence s information Movement objecl, in view of the different lype's video Systcms cvcrall framc as shown in Figurc 3, Dividcd irto frcqucncy cbjcct has the diffcrcnt track algorithm. For thc rigid two phases: The first stage is the object detection, by input budy uvellcnl, use its exact location infuriation w track, lur video frequency after de-noising processing gain background the movement non-rigid body, use the dynamic template images, when the viteo frequency frame contains the method to carry on the track, but needs to carry on the track movement object, corresponds the region after the background process to these templates renews continually; for the shape images and the de-noising current frame image comparison unknown video frequency movement object, can only use the detection movement object. Because in system's monitoring video frequency object position determine that between the scene only has vehicles' movement, therefore does not need the video freyuency ubject corresponding relationships which was movement obiect category rocognition which will detect.Thc already tracked the video frequency object and detect newly. secuND stage is the ubject tracking, through the detection The IluveTlenl object's detection and the track algorith are movement object establishment corresponding model, matches directed at the special situation, this article uses track the corresponding object in the following frame, thus realizes algorithm: the centroid algorithm to thc object tracks continuously The centroid algorithm is through the two-dimensional ilage processing i calculalion to determine the object ccnler of the algorithm. It needs effectively target and background Get backGround divided and will later carry on to its binary, the binary formul ill bi 1,g(x, y)<Ts 0. other E regnal Simulated ovement match In(7), g(y,) is(x, y) grey levels, Th is a gray-scale for the threshold. From the binary can be drawn frcm the centroid pos Ition Current trame In(8), Ic and ye respectively are the movement object center position, n are the image length, the width direction picture element points. Calculate the object based on the above Object tracking equation the position Figure 3. Svstem overall structire drawing The algorithm flow as shown in Figure 4. first reads the of vehicles traveling on the situation, causing a certain amount video image, through the median filter, the smooth image, of error, but test results are still good, the rate of accuracy has takes the video from the first three frames to establishment achieved above 98% background model, carries cn the subtraction of the current frame and the background model, the extraction target point Based on the above analysis, had proved finally based on d an edge detection, the prominent edge, after dividing the fter dividing thethe Opencv video frequency sequence movement object movement object (vehicles). carries cn the mark. uses this detection's feasibility. this method can better detect the target sector to carry on the target tracking using the centroid movement in the video sequence of vehicles, be able to satisfy algorithm the need of the scene detection Read video Frequency 复件e)铜悬:查看)平0 視区练 一螳计揸果 yalue tilt 车重谠 establishment background morel Nest trams Background Abreact edge t:tin r叫lyEr Regonal signs Inrt 打开现 Figure 4. system algorithm flow chart Figure 5. The 140th image V. EXPERIMENTAL RESLLT AND ANALYSIS REFERENCES The experiment uses the dala originates lium the video [1 Ismail Haritsoglu, David Harwoo, Larry S Davis. W4: Real-Time Surveillance of people and Thcir Activities[J]. IEEE Transactions on frcqucncy which photographs on a highway, the vidco Pallern Analysis and! Ma:hire Tnlelligenn e, 2000, 2.2( 8), pp 809-830 frequency form is the PAL service pattern, the frame rate is [2] Changick Kim. Jena Neng Ilwang. fast and autonatic vidco cbjcct 25/seconds, each frame size for 768x576 picture element spot segmentation and tracking for content- bascd applicatior JI.IEEE Lransactions on Circuits and Sy stems for Video 'l'echnslogy, 20J2,12(2) After the system initiation, read video image document, pn12-129 through an initial section of video image establishment initial [3] Wang Cheng-ruL, Gu. Guang-hua. A video objecl segmentation algorithm background. In order to enhance the speed of detection vehicles. with background statistical techno ogy[]. Opt- Elcctronic Engincering, this system can set the detection region, and this can only set 20048),ppl13-115 up within the region to detect vehicles and improve the speed [4] Paragios N, Deriche R. Geodesic active contours and level sets for the of the system. The 2 lane have been detected in four cars wl detection and tracking of mowing objects[ J]. IEEE Trans Pattern Analysis detected in the first 140 images in Figure 5 and Machine Intelligence, 2000,22(3), PP 266-280 [5 hang Ji-ping, I iu /hi-fang. Back ground Estimation and Moving The method is more reliable and real-time by a large Target Detection[]. Technology and Automation. 2004i.4), pp 120 number of experiments. Table I shaws the results af the traffic flow of vehicular traffic compared with the actual results 6 Migdal J, Eric w, Crimson L Background Subtraction Using Markov Detection path is 4 traffic lanes, select the tirst, second trattic Computing (WACV/MOTION05), February 2005,Pp. 58-6f and video Thresholds, wave-motion[C]. IEEE Workshop on Motion lanc (frcm left to right)-bascd tests of the region, riding a line TABLE I TEST RESULI Detection lane Testing time Detection of vehicular The actual traffic flow Not detect Accuracy traffic (vehicles) 硎 hicles) vehicles 238 >(Vchicles) 916% 9891% 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论