CN108898840A - A kind of intelligent traffic lamp control method based on video monitoring - Google Patents
A kind of intelligent traffic lamp control method based on video monitoring Download PDFInfo
- Publication number
- CN108898840A CN108898840A CN201810430898.4A CN201810430898A CN108898840A CN 108898840 A CN108898840 A CN 108898840A CN 201810430898 A CN201810430898 A CN 201810430898A CN 108898840 A CN108898840 A CN 108898840A
- Authority
- CN
- China
- Prior art keywords
- time
- phase
- image
- video monitoring
- current
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012544 monitoring process Methods 0.000 title claims abstract description 25
- 238000013178 mathematical model Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 3
- 239000003595 mist Substances 0.000 claims 3
- 240000007594 Oryza sativa Species 0.000 claims 1
- 235000007164 Oryza sativa Nutrition 0.000 claims 1
- 230000002159 abnormal effect Effects 0.000 claims 1
- 238000001514 detection method Methods 0.000 claims 1
- 235000009566 rice Nutrition 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000004088 simulation Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000003203 everyday effect Effects 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011410 subtraction method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/09—Arrangements for giving variable traffic instructions
- G08G1/095—Traffic lights
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/017—Detecting movement of traffic to be counted or controlled identifying vehicles
- G08G1/0175—Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/09—Arrangements for giving variable traffic instructions
- G08G1/096—Arrangements for giving variable traffic instructions provided with indicators in which a mark progresses showing the time elapsed, e.g. of green phase
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Traffic Control Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种交通信号灯控制方法,特别是涉及一种基于视频监控的智能交通信号灯控制方法,属于定位技术领域。The invention relates to a traffic signal lamp control method, in particular to an intelligent traffic signal lamp control method based on video monitoring, which belongs to the field of positioning technology.
背景技术Background technique
目前,我国汽车保有量超过1.9亿辆,尤其最近几年,汽车总额数量迅猛的增加,导致交通故障和城市交通拥堵的发生越来越频繁。虽然道路在日益改善,但人、车、路三者关系的协调性并没有得到满意解决,不仅给人们的出行带来不便,更深层次的影响是带来大量的经济损失,显然,传统的交通信号灯控制系统已不能满足于现城市交通情况,智能控制交通信号灯系统在此背景下应运而生,其主旨在于智能控制交通信号灯以提高道路利用率,改善交通拥堵情况,减少汽车环境污染。At present, the number of automobiles in my country exceeds 190 million. Especially in recent years, the total number of automobiles has increased rapidly, resulting in more and more frequent traffic failures and urban traffic congestion. Although the roads are improving day by day, the coordination of the relationship between people, vehicles and roads has not been satisfactorily resolved. The signal light control system can no longer satisfy the current urban traffic conditions. Under this background, the intelligent control traffic signal light system came into being. Its main purpose is to intelligently control traffic signal lights to improve road utilization, improve traffic congestion, and reduce automobile environmental pollution.
欧美等发达国家早已经开始了大量的研究及实践来解决这一问题,不同领域的技术也都被结合起来应用到了智能交通的研究中来,对于智能交通灯配时方案,有概率学、模糊控制,数字图像处理,甚至是神经网络及生物学中的遗传免疫算法等被应用到配时策略中,我国大城市受交通拥堵影响的程度是越来越深,而研究及实践水平对于发达国家还有很大差距。很多中小型城市仍然采用最原始的定时长配时方案。欧美发达国家的成熟智能交通系统细节未被公开,因此我国相关研究人员开发出自主产权的智能交通算法意义重大。Developed countries such as Europe and the United States have already started a lot of research and practice to solve this problem. Technologies in different fields have also been combined and applied to the research of intelligent transportation. For intelligent traffic light timing schemes, there are probabilistic, fuzzy Control, digital image processing, and even neural networks and genetic immune algorithms in biology are applied to timing strategies. my country's big cities are more and more affected by traffic congestion, and the level of research and practice is lower than that of developed countries. There is still a big gap. Many small and medium-sized cities still use the most primitive fixed-length time distribution scheme. The details of mature intelligent transportation systems in developed countries in Europe and the United States have not been made public. Therefore, it is of great significance for relevant researchers in my country to develop intelligent transportation algorithms with independent property rights.
发明内容Contents of the invention
本发明的主要目的是为了提供一种基于视频监控的智能交通信号灯控制方法,在现有交通设施的条件下,利用图像处理和神经网络相关方法从视频监控中实时计算各相位上等待通行车辆的信息,实现智能控制交通信号灯,提高道路利用率,减少交通拥堵等具有重大现实意义。The main purpose of the present invention is in order to provide a kind of intelligent traffic signal light control method based on video monitoring, under the condition of existing traffic facilities, utilize image processing and neural network related method to calculate in real time from video monitoring each phase waiting vehicle traffic It is of great practical significance to realize intelligent control of traffic lights, improve road utilization, and reduce traffic congestion.
本发明的目的可以通过采用如下技术方案达到:The purpose of the present invention can be achieved by adopting the following technical solutions:
一种基于视频监控的智能交通信号灯控制方法,包括以下步骤:A method for controlling intelligent traffic lights based on video monitoring, comprising the following steps:
步骤S1:从视频监控图像中选取背景图像;Step S1: selecting a background image from video surveillance images;
步骤S2:利用背景差分法提取前景图像;Step S2: Extracting the foreground image by using the background subtraction method;
步骤S3:估算车辆长度;Step S3: Estimate the length of the vehicle;
步骤S4:分配各车道的红绿灯时间。Step S4: Allocate traffic light time for each lane.
进一步的,步骤S1中,从视频监控图像中选取背景图像包括:Further, in step S1, selecting a background image from video surveillance images includes:
假设季节用Season表示,其值为春、夏、秋、冬,在固定的Season变量下的背景图像分别取拂晓、清晨、早晨、从早晨到下午的一段时间、黄昏、以及不在以上时间段的共7张背景图像;Assuming that the season is represented by Season, its values are spring, summer, autumn, and winter. The background images under the fixed Season variable are dawn, early morning, morning, a period of time from morning to afternoon, dusk, and those not in the above time periods. A total of 7 background images;
而每天可能存在下雨、下雾和下雪三种情况,在以上每种情况下均取一张背景图像;There may be three situations of rain, fog and snow every day, and a background image is taken in each of the above situations;
按照雨量大小,下雨分为小雨、中雨、大雨和暴雨;According to the amount of rainfall, rain is divided into light rain, moderate rain, heavy rain and heavy rain;
按照能见度大小,下雾分为轻雾、雾、大雾、浓雾和强浓雾;According to the degree of visibility, fog is divided into light fog, fog, heavy fog, dense fog and strong dense fog;
按照雪量大小,下雪分为小雪、中雪和大雪。According to the amount of snow, snow is divided into light snow, moderate snow and heavy snow.
进一步的,所述步骤S2中,背景差分法利用当前图像与背景图像的差分检测运动区域,选取一帧图像作为背景图像,将当前包含背景和前景的图像与背景图像做差运算,采用如下公式进行:Further, in the step S2, the background difference method uses the difference between the current image and the background image to detect the moving area, selects a frame of image as the background image, and performs a difference operation between the current image including the background and the foreground and the background image, using the following formula conduct:
其中:Cn(i,j)表示第n幅图像的第i行第j列的像素灰度;Where: C n (i, j) represents the pixel grayscale of the i-th row and j-th column of the n-th image;
Bn(i,j)表示第n幅背景图像的第i行第j列的像素灰度;B n (i, j) represents the pixel grayscale of the i-th row and j-column of the n-th background image;
Fn(i,j)是第n幅图像的第i行第j列的差分像素灰度;F n (i, j) is the differential pixel grayscale of the i-th row and j-column of the n-th image;
T为阈值。T is the threshold.
进一步的,所述步骤S3中,估算车辆长度,包括以下步骤:Further, in the step S3, estimating the vehicle length includes the following steps:
步骤S31:监控摄像头的标定Step S31: Calibration of the surveillance camera
由图像中等待车辆像素估算真实环境中等待车辆的长度,忽略摄像头的径向和切向畸变,忽略车辆不正对摄像头产生的误差,建立数学模型;Estimate the length of the waiting vehicle in the real environment from the pixels of the waiting vehicle in the image, ignore the radial and tangential distortion of the camera, ignore the error caused by the vehicle not facing the camera, and establish a mathematical model;
步骤S32:估算车辆长度Step S32: Estimate vehicle length
对于M1和M2之间的任一线段HG,在A和B点线段上的映射点分别为C和D,假设C和D分别到A和B点距离为d1和d2,假设d1<d2,假设A点坐标为(xa,ya);For any line segment HG between M 1 and M 2 , the mapping points on the line segment of points A and B are C and D respectively, assuming that the distances from C and D to points A and B are d 1 and d 2 respectively, assuming d 1 < d 2 , assuming that the coordinates of point A are (x a , y a );
求得: Get:
由此确定直线SC和SD。Straight lines SC and SD are thus determined.
进一步的,所述步骤S31中,建立的数学模型如下式所示:Further, in the step S31, the established mathematical model is shown in the following formula:
标定后即可确定线l1、l2和l3,进而可求出A和B点的坐标为:After calibration, the lines l 1 , l 2 and l 3 can be determined, and then the coordinates of points A and B can be obtained as:
其中:变量b根据A和B之间的距离确定,即为摄像头采集图像的像素高height,求解表达式为:Among them: the variable b is determined according to the distance between A and B, which is the pixel height of the image collected by the camera, and the solution expression is:
其中:线l3以像素为单位,线l1和线l2之间的实际距离单位是米,M1、M2之间任一线段在线l3和l4上的投影占线段AB与线段EF的比例相等。Among them: the unit of line l3 is pixel, the unit of the actual distance between line l1 and line l2 is meter , the projection of any line segment between M1 and M2 on line l3 and l4 occupies line segment AB and line segment EF is in equal proportion.
进一步的,所述步骤S32中,直线SC和直线SD,分别为:Further, in the step S32, the straight line SC and the straight line SD are respectively:
直线SC: Straight SC:
直线SD: Straight line SD:
求解点G和H的坐标分别为:The coordinates of solving points G and H are respectively:
求出GH的长度为:Find the length of GH as:
GH的长度等于车辆长度。The length of the GH is equal to the vehicle length.
进一步的,所述步骤S4中,分配各车道的红绿灯时间,包括以下步骤:Further, in the step S4, allocating the traffic light time of each lane includes the following steps:
步骤S41:假设一个周期的红绿等时间为T,让一个方向的车辆行驶完需要的时间,其相位分别是l1、l2、l5、l6,全部通行完对应的时间为AT1、AT2、AT5、AT6,将这四个相位全部通行的时间由长到短排序,如果时间一样,则按照AT1到AT8排序,排序结束后的结果假设为t1、t2、t3、t4,t1所对应的相位不仅通行时间长,而且在AT1到AT8中靠前,让其先通行;Step S41: Assuming that the red and green time of a cycle is T, the time required for the vehicles in one direction to complete driving, their phases are l 1 , l 2 , l 5 , l 6 respectively, and the corresponding time for all vehicles to pass is AT 1 , AT 2 , AT 5 , AT 6 , sort the passage time of these four phases from the longest to the shortest, if the time is the same, sort according to AT 1 to AT 8 , and the results after sorting are assumed to be t 1 and t 2 , t 3 , t 4 , the phase corresponding to t 1 not only takes a long time to pass, but also is ahead of AT 1 to AT 8 , allowing it to pass first;
步骤S42:t1、t2、t3、t4是对应相位的完全通行所需时间,t1对应相位先通行,同时通行的可以是t2对应相位或者t3对应相位;Step S42: t 1 , t 2 , t 3 , and t 4 are the time required for the complete passage of the corresponding phases, the phase corresponding to t 1 passes first, and the phase corresponding to t 2 or the phase corresponding to t 3 can pass at the same time;
当t1相位通行过程中,t2和t3对应相位中选择任意一个通行,在t1相位通行过程中,与它同时通行的相位结束;When phase t 1 passes through, select any one of the phases corresponding to t 2 and t 3 to pass, and during the passage of phase t 1 , the phase passing at the same time as it ends;
当与t1对应相位同时通行的相位结束后,t1所对应相位通行时允许同时的通行的另一个相位可以通行;When the phase corresponding to t 1 passes at the same time, another phase that allows simultaneous passage can pass when the phase corresponding to t 1 passes;
当t1通行结束后,t4对应相位可以通行,当t4对应相位和当前通行相位都通行结束后,这个方向通行结束;When the passage of t 1 ends, the phase corresponding to t 4 can pass, and when the phase corresponding to t 4 and the current passage phase both complete, the passage in this direction ends;
步骤S43:假设将同一方向的相位按照完全通行时间从长到短排序,如果有同样的,按照从AT1到AT8排序,第一个为t1,t1对应相位通行时允许通行相位的完全通行时间为t2和t3,剩下一个为t4,让t1先通行,此方向上车辆完全通行完的时间为TW;Step S43: Assume that the phases in the same direction are sorted according to the complete transit time from long to short. If there are the same, sort them from AT 1 to AT 8. The first one is t 1 , and t 1 corresponds to the phase that is allowed to pass when the phase passes. The complete passage time is t 2 and t 3 , and the remaining one is t 4 , let t 1 pass first, and the time for vehicles in this direction to pass completely is TW;
如果先让两个相位通行,再让另两个相位通行,完全通行时间为TY;If two phases are allowed to pass first, and then the other two phases are allowed to pass, the complete passage time is TY;
计算TY≥TW,选择TW对应方式,即一个相位一旦走完,它所允许的相位在不影响其他相位情况下,可以通行。Calculate TY≥TW, and select the TW corresponding method, that is, once a phase is completed, the phases allowed by it can pass without affecting other phases.
进一步的,车辆完全通行完的时间TW为:Furthermore, the time TW for the vehicle to pass completely is:
如果先让两个相位通行,完全通行时间TY为:If two phases are allowed to pass first, the complete passage time TY is:
当(t2+t3-t1)≤t4,即t2+t3≤t1+t4时,如果t2≥t4,t1+t2≥t1+t4,如果t2<t4,t1+t4=t1+t4,因此,TY≥TW;When (t 2 +t 3 -t 1 )≤t 4 , that is, t 2 +t 3 ≤t 1 +t 4 , if t 2 ≥t 4 , t 1 +t 2 ≥t 1 +t 4 , if t 2 <t 4 , t 1 +t 4 =t 1 +t 4 , therefore, TY≥TW;
当(t2+t3-t1)>t4,即t2+t3>t1+t4时,如果t2≥t4,t1+t2≥t2+t3,如果t2<t4,t1+t4≥t2+t3,因此,TY≥TW。When (t 2 +t 3 -t 1 )>t 4 , that is, t 2 +t 3 >t 1 +t 4 , if t 2 ≥t 4 , t 1 +t 2 ≥t 2 +t 3 , if t 2 <t 4 , t 1 +t 4 ≥t 2 +t 3 , therefore, TY≥TW.
进一步的,所述步骤S43中,Further, in the step S43,
求得水平方向的车辆完全通行时间为TW1,垂直方向的通行时间为TW2,红绿灯的总时间为T,可以按如下方法分配时间:Calculate the complete passage time of vehicles in the horizontal direction as TW 1 , the passage time in the vertical direction as TW 2 , and the total time of traffic lights as T, and the time can be allocated as follows:
水平方向分配时间为:The horizontal allocation time is:
垂直方向通行时间为:The vertical travel time is:
当TW1+TW2=0,当前道路上无车辆,按默认配时方式配时。When TW 1 +TW 2 = 0, there is no vehicle on the current road, and the time is set according to the default timing method.
本发明的有益技术效果:按照本发明的基于视频监控的智能交通信号灯控制方法,本发明提供的基于视频监控的智能交通信号灯控制方法,通过在DSP仿真系统模拟交通状况的实验结果验证了本文系统的有效性和可行性,相比传统红绿灯分配时间算法,提高了红绿灯车辆通行效率,有效缓解交通堵塞情况,完全满足真实交通状况的要求。Beneficial technical effects of the present invention: according to the intelligent traffic light control method based on video monitoring of the present invention, the intelligent traffic signal light control method based on video monitoring provided by the present invention verifies the system in this paper by the experimental results of simulating traffic conditions in DSP emulation system Compared with the traditional traffic light allocation time algorithm, it improves the traffic efficiency of traffic light vehicles, effectively alleviates traffic jams, and fully meets the requirements of real traffic conditions.
附图说明Description of drawings
图1为按照本发明的基于视频监控的智能交通信号灯控制方法的一优选实施例的流程图;Fig. 1 is the flow chart of a preferred embodiment of the intelligent traffic light control method based on video monitoring according to the present invention;
图2为按照本发明的基于视频监控的智能交通信号灯控制方法的一优选实施例的监控摄像头标定方法图;Fig. 2 is according to the monitoring camera calibration method figure of a preferred embodiment of the intelligent traffic signal light control method based on video monitoring of the present invention;
图3为按照本发明的基于视频监控的智能交通信号灯控制方法的一优选实施例的摄像头中心的垂直图像界面图;Fig. 3 is the vertical image interface diagram of the center of the camera according to a preferred embodiment of the intelligent traffic light control method based on video surveillance of the present invention;
图4为按照本发明的基于视频监控的智能交通信号灯控制方法的一优选实施例的实际交通路口简化示意图;Fig. 4 is the simplified schematic diagram of the actual traffic crossing according to a preferred embodiment of the intelligent traffic light control method based on video surveillance of the present invention;
图5为按照本发明的基于视频监控的智能交通信号灯控制方法的一优选实施例的假设条件图。FIG. 5 is a diagram of assumed conditions of a preferred embodiment of a method for controlling intelligent traffic lights based on video monitoring according to the present invention.
具体实施方式Detailed ways
为使本领域技术人员更加清楚和明确本发明的技术方案,下面结合实施例及附图对本发明作进一步详细的描述,但本发明的实施方式不限于此。In order to make the technical solutions of the present invention clearer and clearer to those skilled in the art, the present invention will be further described in detail below in conjunction with the examples and accompanying drawings, but the embodiments of the present invention are not limited thereto.
如图1所示,本实施例提供的一种基于视频监控的智能交通信号灯方法,包括以下步骤:As shown in Figure 1, a kind of intelligent traffic light method based on video surveillance provided by the present embodiment comprises the following steps:
步骤S1、从视频监控图像中选取背景图像;Step S1, selecting a background image from video surveillance images;
步骤S2、利用背景差分法提取前景图像(也称目标或车辆);Step S2, using the background difference method to extract the foreground image (also called target or vehicle);
步骤S3、估算车辆长度;Step S3, estimating the length of the vehicle;
步骤S4、分配各车道的红绿灯时间;Step S4, allocating the traffic light time of each lane;
在本实施例中,步骤S1中,从视频监控图像中选取背景图像,从视频监控图像中选取背景图像,因应用环境的特殊性,包括监控摄像头的位置是固定的,拍摄的范围也相对固定的。拍摄的背景图像的变化主要受光照强度的影响,而在不同季节和在同一季节中每天的光照强度都几乎不同,假设季节用Season表示,其值为春夏秋冬,在固定的Season变量下的背景图像可分别取拂晓、清晨、早晨、从早晨到下午的一段时间、黄昏、以及都不在以上时间段共7张背景图像;而每天可能存在下雨(分为小雨、中雨、大雨和暴雨)、下雾(按照能见度又可分为轻雾、雾、大雾、浓雾和强浓雾)和下雪(小雪、中雪和大雪)三种情况,每种情况又存在若干个其他情况,均在保护范围,在以上每种情况下均取一张背景图像;In this embodiment, in step S1, the background image is selected from the video surveillance image, and the background image is selected from the video surveillance image. Due to the particularity of the application environment, the position of the surveillance camera is fixed, and the shooting range is relatively fixed. of. The change of the captured background image is mainly affected by the light intensity, and the light intensity is almost different in different seasons and in the same season every day. Assuming that the season is represented by Season, its value is spring, summer, autumn and winter. Under the fixed Season variable The background images can be selected from dawn, early morning, morning, a period of time from morning to afternoon, dusk, and a total of 7 background images that are not in the above time periods; and there may be rain every day (divided into light rain, moderate rain, heavy rain and heavy rain ), fog (according to the visibility can be divided into light fog, fog, heavy fog, dense fog and strong dense fog) and snow (light snow, moderate snow and heavy snow), each situation has several other situations , are all within the scope of protection, and a background image is taken in each of the above cases;
在本实施例中,步骤S2中,利用背景差分法提取前景图像(也称目标或车辆),背景差分法,是视觉系统中运动目标检测的常用方法,它利用当前图像与背景图像的差分检测运动区域的一种技术,背景差分法的基本思想是选取一帧图像作为背景图像,即步骤S1获取背景图像,将当前图像(包含背景和前景)与背景图像做差运算,如果参考图像选择地适当,则能较准确地分割出前景,即目标或车辆,其公式为:In this embodiment, in step S2, the background difference method is used to extract the foreground image (also known as the target or vehicle). The background difference method is a common method for detecting moving objects in the visual system. A technique of motion area, the basic idea of the background difference method is to select a frame of image as the background image, that is, step S1 to obtain the background image, and perform a difference operation between the current image (including the background and the foreground) and the background image, if the reference image is selected as Appropriate, the foreground can be more accurately segmented, that is, the target or the vehicle. The formula is:
其中:Cn(i,j)表示第n幅图像的第i行第j列的像素灰度;Where: C n (i, j) represents the pixel grayscale of the i-th row and j-th column of the n-th image;
Bn(i,j)表示第n幅背景图像的第i行第j列的像素灰度;B n (i, j) represents the pixel grayscale of the i-th row and j-column of the n-th background image;
Fn(i,j)是第n幅图像的第i行第j列的差分像素灰度;F n (i, j) is the differential pixel grayscale of the i-th row and j-column of the n-th image;
T为阈值。T is the threshold.
在本实施例中,步骤S3中,估算车辆长度,其步骤为:In the present embodiment, in step S3, the vehicle length is estimated, and its steps are:
步骤S31:监控摄像头的标定Step S31: Calibration of the surveillance camera
标定摄像头的目的是由图像中等待车辆长度(像素)估算真实环境中等待车辆的长度,由于摄像头正对着道路,所以,等待中的车辆在图像中都是近似于垂直的,忽略摄像头的径向和切向畸变,忽略车辆不正对摄像头产生的误差,建立数学模型,如图2和图3所示,在图3中,线l3以像素为单位,线l1和线l2之间的实际距离单位是米(m),易证得,在点M1、M2之间的任一线段,与在线l3和l4上的投影是线性关系,即M1、M2之间任一线段在线l3和l4上的投影占线段AB与线段EF的比例相等,所以线l3以像素为单位,其实是放大了l3的实际坐标,但是其中图像占总图像的比例仍然未变,对应的真实物体大小也没有变,所以线l3可以以像素为单位;The purpose of calibrating the camera is to estimate the length of the waiting vehicle in the real environment from the length (pixels) of the waiting vehicle in the image. Since the camera is facing the road, the waiting vehicles are approximately vertical in the image, ignoring the path of the camera. To and tangential distortion, ignoring the error caused by the vehicle not facing the camera directly, and establishing a mathematical model, as shown in Figure 2 and Figure 3, in Figure 3, the line l 3 is in pixels, and the distance between the line l 1 and the line l 2 The actual distance unit is meter (m). It is easy to prove that any line segment between points M 1 and M 2 has a linear relationship with the projection on lines l 3 and l 4 , that is, between M 1 and M 2 The projection of any line segment on line l 3 and l 4 occupies the same proportion of line segment AB and line segment EF, so line l 3 is in pixels, which actually enlarges the actual coordinates of l 3 , but the proportion of the image in the total image is still the same has not changed, and the size of the corresponding real object has not changed, so the line l 3 can be in pixels;
标定后即可确定线l1、l2和l3,假设分别为:After calibration, the lines l 1 , l 2 and l 3 can be determined, assuming that they are:
进而可求出A和B点的坐标为:Then the coordinates of points A and B can be obtained as:
其中:变量b的可根据A和B之间的距离确定,即为摄像头采集图像的像素高height。Among them: the variable b can be determined according to the distance between A and B, which is the pixel height of the image collected by the camera.
求解表达式为:The solution expression is:
通过求解上式的一元二次方程可求解出未知变量b为:By solving the quadratic equation of the above formula, the unknown variable b can be solved as:
和 and
步骤S32:估算车辆长度Step S32: Estimate vehicle length
对于M1和M2之间的任一线段HG,它们在A和B点线段上的映射点分别为C和D,假设C和D分别到A和B点距离为d1和d2(假设d1<d2),那么C和D两点的坐标可由A点坐标,线l3表和d1和d2计算求得,先假设A点坐标为(xa,ya),根据几何关系求得和由此可以确定直线SC和SD,它们分别为:For any line segment HG between M 1 and M 2 , their mapping points on the line segments of points A and B are C and D respectively, assuming that the distances from C and D to points A and B are d 1 and d 2 respectively (assuming d 1 <d 2 ), then the coordinates of points C and D can be calculated from the coordinates of point A, the table of line l 3 and d 1 and d 2 , assuming that the coordinates of point A are (x a , y a ), according to the geometry Find the relationship and From this, the straight lines SC and SD can be determined, which are:
即可求解点G和H的坐标分别为:The coordinates of points G and H can be solved as follows:
根据两点间距离公式即可求出GH的长度:The length of GH can be calculated according to the distance formula between two points:
GH的长度也就是等于车辆长度。The length of the GH is equal to the vehicle length.
在本实施例中,所述步骤S4中分配各车道的红绿灯时间,其步骤为:In the present embodiment, in the step S4, the traffic light time of each lane is allocated, and the steps are:
图4为实际交通路口简化示意图,假设一个周期的红绿等时间为T,可以考虑让一个方向的车辆行驶完需要的时间,例如水平方向的,相位分别是l1、l2、l5、l6,全部通行完对应的时间为AT1、AT2、AT5、AT6。将这四个相位全部通行的时间由长到短排序,如果时间一样,则按照AT1到AT8排序,排序结束后的结果假设为t1、t2、t3、t4。t1所对应的相位不仅通行时间长,而且在AT1到AT8中靠前,让其先通行。假设最后的结果如下图5所示;Figure 4 is a simplified schematic diagram of the actual traffic intersection. Assuming that the red and green time of a cycle is T, we can consider the time required for vehicles in one direction to complete driving. For example, in the horizontal direction, the phases are l 1 , l 2 , l 5 , l 6 , the time corresponding to the completion of all traffic is AT 1 , AT 2 , AT 5 , AT 6 . Sort the passing time of these four phases from longest to shortest. If the time is the same, sort them according to AT 1 to AT 8. The results after sorting are assumed to be t 1 , t 2 , t 3 , and t 4 . The phase corresponding to t 1 not only takes a long time to pass, but also is ahead of AT 1 to AT 8 , allowing it to pass first. Suppose the final result is shown in Figure 5 below;
图5上的t1、t2、t3、t4是对应相位的完全通行所需时间。t1对应相位先通行,那么同时通行的可以是t2对应相位或者t3对应相位,当t1相位通行过程中,t2和t3对应相位中选择任意一个通行(容易证明,这个顺序并不影响最后通行总时间),在t1相位通行过程中,与它同时通行的相位必然结束,因为t1的通行时间是最长的,至少不会比其他相位短,当与t1对应相位同时通行的相位结束后,t1所对应相位通行时允许同时的通行的另一个相位可以通行,当t1通行结束后,t4对应相位可以通行,当t4对应相位和当前通行相位都通行结束后,这个方向通行结束;t 1 , t 2 , t 3 , and t 4 in Fig. 5 are the time required for the complete passage of the corresponding phase. The phase corresponding to t 1 passes first , then the phase corresponding to t 2 or the phase corresponding to t 3 can pass at the same time. does not affect the total time of the final passage), during the passage of phase t 1 , the phase passing at the same time as it must end, because the passage time of t 1 is the longest, at least it will not be shorter than other phases, when the phase corresponding to t 1 After the phase of simultaneous passage ends, when the phase corresponding to t 1 passes, another phase that allows simultaneous passage can pass. When the passage of t 1 ends, the phase corresponding to t 4 can pass. When the phase corresponding to t 4 and the current passage phase both pass After the end, the traffic in this direction ends;
假设,将同一方向的相位按照完全通行时间从长到短排序,如果有同样的,按照从AT1到AT8排序,第一个为t1,t1对应相位通行时允许通行相位的完全通行时间为t2和t3,剩下一个为t4,让t1先通行,那么,此方向上车辆完全通行完的时间TW为:Assume that the phases in the same direction are sorted from the longest to the shortest time of complete passage. If there are the same, they are sorted from AT 1 to AT 8. The first one is t 1 , and t 1 corresponds to the complete passage of the passing phase when passing The time is t 2 and t 3 , and the remaining one is t 4 , let t 1 pass first, then, the time TW for vehicles in this direction to pass completely is:
如果先让两个相位通行,再让两个相位通行,这种方式,在上面的假设下,完全通行时间TY为:If two phases are allowed to pass first, and then two phases are allowed to pass, in this way, under the above assumptions, the complete passage time TY is:
当(t2+t3-t1)≤t4即t2+t3≤t1+t4时,如果t2≥t4,t1+t2≥t1+t4,如果t2<t4,t1+t4=t1+t4,所以TY≥TW;When (t 2 +t 3 -t 1 )≤t 4 , that is, t 2 +t 3 ≤t 1 +t 4 , if t 2 ≥t 4 , t 1 +t 2 ≥t 1 +t 4 , if t 2 <t 4 , t 1 +t 4 =t 1 +t 4 , so TY≥TW;
当(t2+t3-t1)>t4即t2+t3>t1+t4时,如果t2≥t4,t1+t2≥t2+t3,如果t2<t4,t1+t4≥t2+t3,所以TY≥TW;When (t 2 +t 3 -t 1 )>t 4 , that is, t 2 +t 3 >t 1 +t 4 , if t 2 ≥t 4 , t 1 +t 2 ≥t 2 +t 3 , if t 2 <t 4 , t 1 +t 4 ≥t 2 +t 3 , so TY≥TW;
所以TY≥TW,选择TW对应方式,即一个相位一旦走完,它所允许的相位在不影响其他相位情况下,可以通行;Therefore, TY≥TW, choose the TW corresponding method, that is, once a phase is completed, the phase allowed by it can pass without affecting other phases;
这样求得水平方向的车辆完全通行时间为TW1,垂直方向的通行时间为TW2,因为红绿灯的总时间为T,可以按如下方法分配时间:In this way, the complete passage time of vehicles in the horizontal direction is TW 1 , and the passage time in the vertical direction is TW 2 . Since the total time of traffic lights is T, the time can be allocated as follows:
水平方向分配时间为:The horizontal allocation time is:
垂直方向通行时间为:The vertical travel time is:
如果上面两个公式里TW1+TW2=0,说明当前道路上无车辆,按默认配时方式配时;If TW 1 +TW 2 = 0 in the above two formulas, it means that there is no vehicle on the current road, and the time is adjusted according to the default timing method;
在一个方向内的时间分配为(以水平方向为例):The time distribution in one direction is (taking the horizontal direction as an example):
公式中,m为1到4,TSm为假设中四个相位的实际可通行时间,tm为完全通行所需时间;In the formula, m is from 1 to 4, TS m is the actual transit time of the four phases in the hypothesis, and t m is the time required for complete passage;
如果此方向道路上无车辆通行,t1+t4=0或者t2+t3=0可能存在,那也就说明TW1为0,这时候,T1本身就为0,没有分配时间的必要。垂直方向与水平方向类似,T1与T2不可能都为0,因为T不为0,TW1+TW2≠0;If there is no traffic on the road in this direction, t 1 +t 4 =0 or t 2 +t 3 =0 may exist, which means that TW 1 is 0. At this time, T 1 itself is 0, and there is no allocation of time necessary. The vertical direction is similar to the horizontal direction, T 1 and T 2 cannot both be 0, because T is not 0, TW 1 +TW 2 ≠0;
如果TW1+TW2=0,这种情况已经讨论过了,按默认方式配时。If TW 1 +TW 2 =0, this situation has already been discussed, and the time is allocated by default.
任意相位通行时间结束后都有黄灯,这是必须的,不计算在红绿灯总时间T内。There is a yellow light after the passing time of any phase, which is necessary and not counted in the total time T of traffic lights.
综上所述,在本实施例中,按照本实施例的基于视频监控的智能交通信号灯控制方法,本实施例提供的基于视频监控的智能交通信号灯控制方法,通过在DSP仿真系统模拟交通状况的实验结果验证了本文系统的有效性和可行性,相比传统红绿灯分配时间算法,提高了红绿灯车辆通行效率,有效缓解交通堵塞情况,完全满足真实交通状况的要求。To sum up, in this embodiment, according to the intelligent traffic signal light control method based on video surveillance in this embodiment, the intelligent traffic signal light control method based on video surveillance provided in this embodiment, simulates traffic conditions in the DSP simulation system. The experimental results verify the effectiveness and feasibility of the system in this paper. Compared with the traditional traffic light allocation time algorithm, it improves the traffic efficiency of traffic light vehicles, effectively alleviates traffic jams, and fully meets the requirements of real traffic conditions.
以上所述,仅为本发明进一步的实施例,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明所公开的范围内,根据本发明的技术方案及其构思加以等同替换或改变,都属于本发明的保护范围。The above is only a further embodiment of the present invention, but the protection scope of the present invention is not limited thereto, any person familiar with the technical field within the scope disclosed in the present invention, according to the technical scheme of the present invention and its Any equivalent replacement or modification of the concept falls within the protection scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810430898.4A CN108898840A (en) | 2018-05-08 | 2018-05-08 | A kind of intelligent traffic lamp control method based on video monitoring |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810430898.4A CN108898840A (en) | 2018-05-08 | 2018-05-08 | A kind of intelligent traffic lamp control method based on video monitoring |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108898840A true CN108898840A (en) | 2018-11-27 |
Family
ID=64342603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810430898.4A Pending CN108898840A (en) | 2018-05-08 | 2018-05-08 | A kind of intelligent traffic lamp control method based on video monitoring |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108898840A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021237750A1 (en) * | 2020-05-29 | 2021-12-02 | Siemens Ltd., China | Method and apparatus for vehicle length estimation |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201066943Y (en) * | 2007-07-24 | 2008-05-28 | 西安智达交通科技有限公司 | Intelligent controller for intercrossed signal lamp without phase restraint |
CN101325008A (en) * | 2008-07-25 | 2008-12-17 | 浙江大学 | A method for intelligent coordinated control of dynamic two-way green wave belts in urban traffic arteries |
US20090167561A1 (en) * | 2007-12-26 | 2009-07-02 | Aochengtongli S&T Development ( Beijing ) Co., Ltd | Intelligent traffic light control system |
CN101702263A (en) * | 2009-11-17 | 2010-05-05 | 重庆大学 | A green wave adaptive control system and method for pedestrian crossing signal lights |
CN102142197A (en) * | 2011-03-31 | 2011-08-03 | 汤一平 | Intelligent traffic signal lamp control device based on comprehensive computer vision |
CN103247181A (en) * | 2013-04-17 | 2013-08-14 | 同济大学 | Traffic light intelligent controller and its control method based on video vehicle captain detection |
CN104064039A (en) * | 2014-07-04 | 2014-09-24 | 武汉理工大学 | Intelligent timing method of intersection traffic signal lamps |
CN104575034A (en) * | 2015-01-19 | 2015-04-29 | 浙江大学 | Single-point intersection signal timing parameter optimization method based on bayonet data |
CN106408957A (en) * | 2016-11-21 | 2017-02-15 | 华南理工大学 | Intersection phase time distribution method based on pass demand balance |
EP3176768A1 (en) * | 2015-12-02 | 2017-06-07 | Siemens Aktiengesellschaft | Method for the transformation of a switching order to a signal image of a set of signals |
CN107919022A (en) * | 2017-11-22 | 2018-04-17 | 浙江工业大学 | A kind of intelligent traffic light signal control method of dynamic duration distribution |
-
2018
- 2018-05-08 CN CN201810430898.4A patent/CN108898840A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201066943Y (en) * | 2007-07-24 | 2008-05-28 | 西安智达交通科技有限公司 | Intelligent controller for intercrossed signal lamp without phase restraint |
US20090167561A1 (en) * | 2007-12-26 | 2009-07-02 | Aochengtongli S&T Development ( Beijing ) Co., Ltd | Intelligent traffic light control system |
CN101325008A (en) * | 2008-07-25 | 2008-12-17 | 浙江大学 | A method for intelligent coordinated control of dynamic two-way green wave belts in urban traffic arteries |
CN101702263A (en) * | 2009-11-17 | 2010-05-05 | 重庆大学 | A green wave adaptive control system and method for pedestrian crossing signal lights |
CN102142197A (en) * | 2011-03-31 | 2011-08-03 | 汤一平 | Intelligent traffic signal lamp control device based on comprehensive computer vision |
CN103247181A (en) * | 2013-04-17 | 2013-08-14 | 同济大学 | Traffic light intelligent controller and its control method based on video vehicle captain detection |
CN104064039A (en) * | 2014-07-04 | 2014-09-24 | 武汉理工大学 | Intelligent timing method of intersection traffic signal lamps |
CN104575034A (en) * | 2015-01-19 | 2015-04-29 | 浙江大学 | Single-point intersection signal timing parameter optimization method based on bayonet data |
EP3176768A1 (en) * | 2015-12-02 | 2017-06-07 | Siemens Aktiengesellschaft | Method for the transformation of a switching order to a signal image of a set of signals |
CN106408957A (en) * | 2016-11-21 | 2017-02-15 | 华南理工大学 | Intersection phase time distribution method based on pass demand balance |
CN107919022A (en) * | 2017-11-22 | 2018-04-17 | 浙江工业大学 | A kind of intelligent traffic light signal control method of dynamic duration distribution |
Non-Patent Citations (2)
Title |
---|
杨永辉等: "基于视频分析的车辆排队长度检测", 《计算机应用研究》 * |
王宁: "基于视频的车辆跟踪与交通事件检测", 《中国优秀博硕士学位论文全文数据库(硕士)•信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021237750A1 (en) * | 2020-05-29 | 2021-12-02 | Siemens Ltd., China | Method and apparatus for vehicle length estimation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107045629B (en) | A multi-lane line detection method | |
CN109191830B (en) | Road congestion detection method based on video image processing | |
CN102385803B (en) | All-weather urban vehicle tracking and counting method based on video monitoring | |
CN101702263B (en) | Pedestrian crosswalk signal lamp green wave self-adaption control system and method | |
CN103366572B (en) | Method for detecting video traffic parameters of intersection | |
CN109584558A (en) | A kind of traffic flow statistics method towards Optimization Control for Urban Traffic Signals | |
CN106097735A (en) | Tide lane signal lamp control method based on plane perception detection technique and system | |
CN113313943B (en) | Road side perception-based intersection traffic real-time scheduling method and system | |
CN102005120A (en) | Traffic intersection monitoring technology and system based on video image analysis | |
CN109859468A (en) | Multilane traffic volume based on YOLOv3 counts and wireless vehicle tracking | |
CN208689753U (en) | Optimization-type intelligent traffic lamp regulator control system | |
CN202422425U (en) | Video-detection-based intelligent signal control system for crossing | |
CN111027430A (en) | Traffic scene complexity calculation method for intelligent evaluation of unmanned vehicles | |
CN105336169A (en) | Method and system for judging traffic jams based on videos | |
CN107944407A (en) | A kind of crossing zebra stripes recognition methods based on unmanned plane | |
Chao et al. | Multi-lane detection based on deep convolutional neural network | |
CN108876805A (en) | The end-to-end unsupervised scene of one kind can traffic areas cognition and understanding method | |
CN106372619B (en) | A Method for Robust Vehicle Detection and Accumulated Arrival Curve Estimation in Lanes | |
CN109272482A (en) | Urban Intersection Vehicle Queuing Detection System Based on Sequence Image | |
Li et al. | A traffic congestion estimation approach from video using time-spatial imagery | |
CN106548628A (en) | The road condition analyzing method that a kind of view-based access control model space transition net is formatted | |
CN110020642A (en) | A kind of visibility recognition methods based on vehicle detection | |
CN109410608B (en) | Picture self-learning traffic signal control method based on convolutional neural network | |
CN102789686A (en) | Road traffic flow detecting method based on road surface brightness composite mode recognition | |
Nagaraj et al. | Traffic jam detection using image processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181127 |
|
RJ01 | Rejection of invention patent application after publication |