CN102436739B - Traffic jam discrimination method in expressway toll plaza based on video detection technology - Google Patents

Traffic jam discrimination method in expressway toll plaza based on video detection technology Download PDF

Info

Publication number
CN102436739B
CN102436739B CN 201110289530 CN201110289530A CN102436739B CN 102436739 B CN102436739 B CN 102436739B CN 201110289530 CN201110289530 CN 201110289530 CN 201110289530 A CN201110289530 A CN 201110289530A CN 102436739 B CN102436739 B CN 102436739B
Authority
CN
China
Prior art keywords
frame
image
congestion
energy value
congested
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.)
Active
Application number
CN 201110289530
Other languages
Chinese (zh)
Other versions
CN102436739A (en
Inventor
赵敏
孙棣华
刘卫宁
唐毅
廖孝勇
郑林江
陈虹颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunshan Silaimu Energy Saving Technology Co ltd
Original Assignee
Chongqing University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chongqing University filed Critical Chongqing University
Priority to CN 201110289530 priority Critical patent/CN102436739B/en
Publication of CN102436739A publication Critical patent/CN102436739A/en
Application granted granted Critical
Publication of CN102436739B publication Critical patent/CN102436739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Traffic Control Systems (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The invention relates to the technical field of the detection of the traffic state of a road and particularly discloses a method for distinguishing the traffic jam of a toll plaza of a highway based on a video detection technology, which comprises the following steps: (1) shooting the video of the road of a toll plaza; (2) extracting the picture of the road of the toll plaza from the video; (3) establishing and updating a background model of the picture; (4) extracting a foreground image from the picture; and (5) obtaining the energy value and the absolute value of the variable quantity of the energy value of the foreground image and judging whether the road of the toll plaza is jammed or not. According to the method for distinguishing the traffic jam of the toll plaza of the highway based on the video detection technology, only the parameter of the energy value of the road needs to be obtained, and a jam distinguishing model is constructed, so that the judgment to the jam state of the toll plaza of the highway is finished. The algorithm is simple, the operation expense is little, the real-time property is strong, the problem of distinguishing the traffic jam of the toll plaza of the highway can be accurately and effectively solved, and a jam caution is also output at the time of jam, so that powerful information support is provided for a manager to master a site condition in time and make a management decision so as to reduce the potential safety hazard of pass in traffic.

Description

基于视频检测技术的高速公路收费广场交通拥堵判别方法Traffic jam discrimination method in expressway toll plaza based on video detection technology

技术领域 technical field

本发明涉及道路交通状态检测技术领域,具体涉及一种基于视频检测技术的高速公路收费广场交通拥堵判别方法。The invention relates to the technical field of road traffic state detection, in particular to a method for judging traffic congestion in expressway toll plazas based on video detection technology.

背景技术 Background technique

随着我国经济建设的快速发展,高速公路运营里程快速增加,通行高速公路车辆数量急剧增多,高速公路收费站的安全隐患也随之增加。高速公路收费广场作为车辆聚集的特殊路段,交通安全问题尤为突出。特别是在高峰交通时段,车辆在收费广场易排长队出现拥堵,影响了驾驶员在收费广场的驾驶行为,其选择服务时间短的车道的行为导致车辆之间交通冲突加剧,继而引发交通事故。因此,第一时间监测高速公路收费广场的拥堵事件与加强收费现场监管,对维护收费广场的交通安全有着重要的意义。同时,由于收费广场拥堵事件的发生往往存在许多随机因素,因此不能单纯凭借时间段来划定车辆高峰期,而应该通过科学技术手段来实时监测出高速公路收费广场的拥堵状态。With the rapid development of my country's economic construction, the operating mileage of expressways has increased rapidly, the number of vehicles passing through expressways has increased sharply, and the safety hazards of expressway toll stations have also increased. As a special road section where vehicles gather, expressway toll plazas are particularly prominent in terms of traffic safety. Especially during peak traffic hours, vehicles tend to queue up in toll plazas and cause congestion, which affects the driving behavior of drivers in toll plazas. Their behavior of choosing lanes with short service times leads to intensified traffic conflicts between vehicles, which in turn leads to traffic accidents. . Therefore, it is of great significance to maintain the traffic safety of the toll plaza to monitor the congestion events of the expressway toll plaza and strengthen the on-site supervision of the toll plaza. At the same time, because there are often many random factors in the occurrence of toll plaza congestion events, it is not possible to simply rely on the time period to delineate the peak period of vehicles, but to monitor the congestion status of expressway toll plazas in real time through scientific and technological means.

目前,利用收费广场的视频监控系统,已经实现了对收费广场车辆进出情况、车辆类型等的实时记录。但对收费广场拥堵事件的发现,仍然是由工作人员观察视频图像序列,通过人工监控的方式实现,未实现收费广场拥堵事件的自动检测。因此,如何利用视频检测技术实时地自动检测出收费广场的拥堵状态,对于交通运营管理者实时做出管理决策,提高收费站服务水平有着重要的意义。At present, using the video monitoring system of the toll plaza, the real-time recording of vehicle entry and exit conditions and vehicle types in the toll plaza has been realized. However, the detection of congestion events in toll plazas is still achieved by staff observing video image sequences through manual monitoring, and the automatic detection of congestion events in toll plazas has not been realized. Therefore, how to use video detection technology to automatically detect the congestion state of the toll plaza in real time is of great significance for traffic operation managers to make management decisions in real time and improve the service level of toll plazas.

现有的基于视频检测技术的道路交通拥堵事件检测方法通过获取大量交通状态参数,如:流量、道路占有率、速度、车间距、排队长度等,然后选取多个参数利用传统的拥堵判别算法实现对道路交通拥挤事件的检测。这种方法要求利用图像处理技术计算多个参数,实现复杂,开销较大,不利于实现对道路拥堵事件的发生进行实时监控。且在国内外公开的文献中,尚未发现有基于视频检测技术的收费广场拥堵事件检测方法。The existing road traffic congestion event detection method based on video detection technology obtains a large number of traffic state parameters, such as: traffic flow, road occupancy rate, speed, inter-vehicle distance, queue length, etc., and then selects multiple parameters and uses traditional congestion discrimination algorithms to achieve Detection of road traffic congestion events. This method requires the use of image processing technology to calculate multiple parameters, which is complex and expensive, and is not conducive to real-time monitoring of road congestion events. And in the literature published at home and abroad, no detection method for toll plaza congestion event based on video detection technology has been found.

因此,亟需一种自动检测收费广场拥挤事件的方法,实现对收费广场拥堵事件的及时、可靠的检测,为管理者及时把握现场状况、做出管理决策提供有力的信息支撑,进而减少交通通行安全隐患。Therefore, there is an urgent need for a method to automatically detect congestion events in toll plazas, to realize timely and reliable detection of toll plaza congestion events, and to provide powerful information support for managers to grasp the site conditions in a timely manner and make management decisions, thereby reducing traffic traffic Security risks.

发明内容 Contents of the invention

有鉴于此,本发明提供了一种运算开销小,实时性强,基于视频检测技术的高速公路收费广场交通拥堵判别方法。In view of this, the present invention provides a method for judging traffic congestion in expressway toll plazas based on video detection technology with low computing overhead and strong real-time performance.

本发明的目的是通过以下技术方案来实现的:基于视频检测技术的高速公路收费广场交通拥堵判别方法,包括如下步骤:The object of the present invention is achieved through the following technical solutions: the method for judging traffic jams in expressway toll plazas based on video detection technology comprises the steps:

1)摄取收费广场道路视频;1) Capture the road video of the toll plaza;

2)从视频中提取收费广场道路的图片;2) Extract the picture of the toll plaza road from the video;

3)建立并更新图片的背景模型;3) Establish and update the background model of the picture;

4)从图片中提取前景图像;4) extract the foreground image from the picture;

5)获取前景图像的能量值及能量值变化量绝对值,判断当前帧图像是否为收费广场拥堵图像。5) Obtain the energy value of the foreground image and the absolute value of the energy value change, and judge whether the current frame image is a toll plaza congestion image.

进一步,所述步骤3)具体包括如下步骤:Further, said step 3) specifically includes the following steps:

31)通过对N0张收费广场道路的图片,用均值法求取初始背景,N0>20;31) Calculate the initial background by using the average value method for N 0 pictures of toll plaza roads, N 0 >20;

32)设定阈值,通过阈值判断,从初始背景中提取背景;32) Setting the threshold, and extracting the background from the initial background through threshold judgment;

33)用步骤32)提取的背景建立并更新背景模型。33) Use the background extracted in step 32) to establish and update the background model.

进一步,所述步骤4)中,根据步骤3)获得的背景模型,利用差分法从图片中提取前景图像。Further, in the step 4), according to the background model obtained in the step 3), the foreground image is extracted from the picture by using the difference method.

进一步,步骤5)具体包括如下步骤:Further, step 5) specifically includes the following steps:

51)获取当前帧第k帧的前景图像的能量值Energy(k);51) Obtain the energy value Energy(k) of the foreground image of the kth frame of the current frame;

52)获取当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k),同理获取ΔEnergy(k-1)、ΔEnergy(k-2);52) Obtain the absolute value ΔEnergy(k) of the energy value difference between the foreground image of the kth frame of the current frame and the energy value of the foreground image of the k-1th frame of the previous frame, and obtain ΔEnergy(k-1), ΔEnergy(k-1) in the same way 2);

53)判断Energy(k)是否大于阈值T1,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;53) judge whether Energy (k) is greater than threshold value T1, if yes, then perform the next step; if not, then determine that the kth frame is a non-congested frame;

54)判断当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;54) Determine whether the absolute value ΔEnergy(k) of the energy value difference between the energy value of the foreground image of the kth frame of the current frame and the k-1th frame of the previous frame is less than the threshold T2, if yes, then perform the next step; if not, Then it is determined that the kth frame is a non-congested frame;

55)判断第k-1帧的前景图像与前一帧第k-2帧的前景图像的能量值之差的绝对值ΔEnergy(k-1)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;55) Determine whether the absolute value ΔEnergy(k-1) of the energy value difference between the foreground image of the k-1th frame and the energy value of the foreground image of the k-2th frame of the previous frame is less than the threshold T2, if so, then perform the next step; If not, it is determined that the kth frame is a non-congested frame;

56)判断第k-2帧的前景图像与前一帧第k-3帧的前景图像的能量值之差的绝对值ΔEnergy(k-2)是否小于阈值T2,如是,则判定第k帧为拥堵帧;如否,则判定第k帧为非拥堵帧。56) Determine whether the absolute value ΔEnergy(k-2) of the energy value difference between the foreground image of the k-2th frame and the energy value of the foreground image of the k-3th frame of the previous frame is less than the threshold T2, and if so, then determine that the kth frame is congestion frame; if not, then determine the kth frame as a non-congestion frame.

进一步,T1=0.48,T2=0.076。Further, T1=0.48, T2=0.076.

进一步,所述步骤2)中还包括将提取的收费广场道路的图片由彩色图片转换为灰度图片的步骤。Further, the step 2) also includes the step of converting the extracted picture of the toll plaza road from a color picture to a grayscale picture.

进一步,所述步骤4)中,还包括对所提取的前景图像进行形态学方法去噪的步骤。Further, the step 4) also includes the step of performing morphological denoising on the extracted foreground image.

进一步,步骤5)中,获取前景图像的能量值的方法如下:定义图像序列为k为帧号,N为视频的总帧数,则差分图像为difk(x,y)=frk(x,y)-frk-1(x,y);对于第k帧差分图像difk(x,y),计算其全局阈值level,再对该差分图像进行二值化处理,强制转换为二值图像;得到的二值化后的差分图像为其有m×n个像素点;通过下式计算该二值化后的差分图像的能量:Further, in step 5), the method for obtaining the energy value of the foreground image is as follows: define the image sequence as k is the frame number, and N is the total frame number of the video, then the difference image is dif k (x, y)=fr k (x, y)-fr k-1 (x, y); for the kth frame difference image dif k (x, y), calculate its global threshold level, and then perform binarization processing on the difference image, and force it to be converted into a binary image; the obtained binarized difference image is It has m×n pixels; the energy of the binarized difference image is calculated by the following formula:

EE. (( DBDB (( kk ,, ii ,, jj )) ii == 11 ,, jj == 11 mm ×× nno )) == 11 mm ×× nno (( ΣΣ ii == 11 mm ΣΣ jj == 11 nno bb (( ii ,, jj )) ))

其中b(i,j)为像素点(i,j)的值,即为该点的能量值。Where b(i, j) is the value of the pixel point (i, j), that is, the energy value of the point.

进一步,步骤5)之后还有如下步骤:Further, there are following steps after step 5):

6)根据步骤5)中第k帧图像的拥堵判别结果,判别当前检测周期是否为收费广场拥堵周期,具体步骤如下:6) According to the congestion discrimination result of the kth frame image in step 5), it is judged whether the current detection cycle is a toll plaza congestion cycle, and the specific steps are as follows:

以10秒为一个检测周期,当该检测周期中超过90%的图像帧为拥堵帧,则标记该周期为拥堵周期,反之,则标记为非拥堵周期。Taking 10 seconds as a detection period, when more than 90% of the image frames in the detection period are congested frames, this period is marked as a congested period, otherwise, it is marked as a non-congested period.

进一步,还包括如下步骤:Further, the following steps are also included:

7)根据步骤6)中当前检测周期的拥堵判别结果,判断当前收费广场道路是否拥堵,并相应地输出或解除告警信息,其具体包括如下步骤:7) According to the congestion discrimination result of the current detection period in step 6), judge whether the current toll plaza road is congested, and output or remove the alarm information accordingly, which specifically includes the following steps:

71)建立滑动窗口投票模型,以10秒为一个检测周期,定义滑动窗口的容量为6个周期,当滑动窗口中有3个及以上的周期为拥堵周期时判定收费广场拥堵,否则为非拥堵状态。71) Establish a sliding window voting model, take 10 seconds as a detection period, define the capacity of the sliding window as 6 periods, and determine that the toll plaza is congested when 3 or more periods in the sliding window are congestion periods, otherwise it is non-congestion state.

72)比对当前周期的投票结果与上一周期的投票结果,如果上一周期的投票结果为非拥堵状态,而当前周期的投票结果为拥堵状态,则输出拥堵警告;如果上一周期的投票结果为拥堵状态,而当前周期的投票结果为非拥堵状态,则解除拥堵警告。72) Compare the voting result of the current cycle with the voting result of the previous cycle, if the voting result of the previous cycle is non-congested state, and the voting result of the current cycle is congested state, then output congestion warning; if the voting result of the previous cycle If the result is a congestion state, and the voting result of the current cycle is a non-congestion state, the congestion warning will be released.

本发明的有益效果是:可准确、高效地解决高速公路收费广场交通拥堵的判别问题,并在拥堵时刻输出拥堵警告,从而为管理者及时把握现场状况、做出管理决策提供有力的信息支撑,进而减少交通通行安全隐患。本发明针对传统道路交通拥堵判别方法需要获取大量交通状态参数,运算开销大,实时性不强的缺点,本发明只用获取道路能量值参数,构建拥堵判别模型,便完成了对高速公路收费广场拥堵状态的判断,算法简单,运算开销小,实时性强。The beneficial effect of the present invention is that it can accurately and efficiently solve the problem of judging traffic congestion in expressway toll plazas, and output congestion warnings at the time of congestion, thereby providing powerful information support for managers to grasp the site conditions in time and make management decisions. Thereby reducing traffic safety hazards. The present invention aims at the shortcomings of the traditional road traffic congestion discrimination method that needs to obtain a large number of traffic state parameters, high computational cost, and poor real-time performance. The present invention only needs to obtain road energy value parameters to construct a congestion discrimination model, and then completes the highway toll plaza Judgment of the congestion state, the algorithm is simple, the operation cost is small, and the real-time performance is strong.

本发明的其他优点、目标和特征在某种程度上将在随后的说明书中进行阐述,并且在某种程度上,基于对下文的考察研究对本领域技术人员而言将是显而易见的,或者可以从本发明的实践中得到教导。本发明的目标和其他优点可以通过下面的说明书和权利要求书来实现和获得。Other advantages, objects and features of the present invention will be set forth in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the investigation and research below, or can be obtained from It is taught in the practice of the present invention. The objects and other advantages of the invention will be realized and attained by the following description and claims.

附图说明 Description of drawings

图1示出了基于视频检测技术的高速公路收费广场交通拥堵判别方法的软件处理流程示意图;Fig. 1 has shown the software processing flow schematic diagram of the highway toll plaza traffic jam discrimination method based on video detection technology;

图2示出了步骤5)、6)、7)的流程示意图,即交通拥堵判别流程图;Fig. 2 has shown the schematic flow chart of step 5), 6), 7), i.e. flow chart of judging traffic jam;

图3示出了能量值变化量绝对值的时序图;Fig. 3 shows the timing diagram of the absolute value of the energy value variation;

图4示出了能量值的时序图;Figure 4 shows a timing diagram of energy values;

图5示出了实际拥堵状态输出。Figure 5 shows the actual congestion status output.

具体实施方式 Detailed ways

以下将对本发明的优选实施例进行详细的描述。应当理解,优选实施例仅为了说明本发明,而不是为了限制本发明的保护范围。Preferred embodiments of the present invention will be described in detail below. It should be understood that the preferred embodiments are only for illustrating the present invention, but not for limiting the protection scope of the present invention.

参见图1,基于视频检测技术的高速公路收费广场交通拥堵判别方法,包括如下步骤:Referring to Fig. 1, the method for judging traffic jams in expressway toll plazas based on video detection technology includes the following steps:

1)摄取收费广场道路视频;1) Capture the road video of the toll plaza;

2)从视频中提取收费广场道路的图片,并将其由彩色图片转换为灰度图片;2) Extract the picture of the toll plaza road from the video, and convert it from a color picture to a gray scale picture;

3)建立并更新图片的背景模型;具体包括如下步骤:3) Establish and update the background model of the picture; specifically include the following steps:

31)通过对N0张收费广场道路的图片,用均值法求取初始背景;31) By using the mean value method to obtain the initial background for the pictures of N 0 toll plaza roads;

32)设定阈值,通过阈值判断,从初始背景中提取背景;32) Setting the threshold, and extracting the background from the initial background through threshold judgment;

33)用步骤32)提取的背景建立并更新背景模型。33) Use the background extracted in step 32) to establish and update the background model.

4)从图片中提取前景图像,利用差分法从图片中提取前景图像,并对所提取的前景图像进行形态学方法去噪的步骤;4) extracting the foreground image from the picture, utilizing the difference method to extract the foreground image from the picture, and performing the step of morphological method denoising to the extracted foreground image;

5)获取前景图像的能量值及能量值变化量绝对值,判断当前帧图像是否为收费广场拥堵图像。具体包括如下步骤:5) Obtain the energy value of the foreground image and the absolute value of the energy value change, and judge whether the current frame image is a toll plaza congestion image. Specifically include the following steps:

51)获取当前帧第k帧的前景图像的能量值Energy(k)。获取前景图像的能量值Energy(k)的方法如下:定义图像序列为

Figure BDA0000094560530000051
k为帧号,N为视频的总帧数,则差分图像为difk(x,y)=frk(x,y)-frk-1(x,y);对于第k帧差分图像difk(x,y),计算其全局阈值level,再对该差分图像进行二值化处理,强制转换为二值图像;得到的二值化后的差分图像为其有m×n个像素点;通过下式计算该二值化后的差分图像的能量:51) Obtain the energy value Energy(k) of the foreground image of the kth frame of the current frame. The method of obtaining the energy value Energy(k) of the foreground image is as follows: define the image sequence as
Figure BDA0000094560530000051
k is the frame number, and N is the total frame number of the video, then the difference image is dif k (x, y)=fr k (x, y)-fr k-1 (x, y); for the kth frame difference image dif k (x, y), calculate its global threshold level, and then perform binarization processing on the difference image, and force it to be converted into a binary image; the obtained binarized difference image is It has m×n pixels; the energy of the binarized difference image is calculated by the following formula:

EE. (( DBDB (( kk ,, ii ,, jj )) ii == 11 ,, jj == 11 mm ×× nno )) == 11 mm ×× nno (( ΣΣ ii == 11 mm ΣΣ jj == 11 nno bb (( ii ,, jj )) ))

其中b(i,j)为像素点(i,j)的值,即为该点的能量值。Where b(i, j) is the value of the pixel point (i, j), that is, the energy value of the point.

52)获取当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k),同理获取ΔEnergy(k-1)、ΔEnergy(k-2);52) Obtain the absolute value ΔEnergy(k) of the energy value difference between the foreground image of the kth frame of the current frame and the energy value of the foreground image of the k-1th frame of the previous frame, and obtain ΔEnergy(k-1), ΔEnergy(k-1) in the same way 2);

53)判断Energy(k)是否大于阈值T1,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;53) judge whether Energy (k) is greater than threshold value T1, if yes, then perform the next step; if not, then determine that the kth frame is a non-congested frame;

54)判断当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;54) Determine whether the absolute value ΔEnergy(k) of the energy value difference between the energy value of the foreground image of the kth frame of the current frame and the k-1th frame of the previous frame is less than the threshold T2, if yes, then perform the next step; if not, Then it is determined that the kth frame is a non-congested frame;

55)判断第k-1帧的前景图像与前一帧第k-2帧的前景图像的能量值之差的绝对值ΔEnergy(k-1)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;55) Determine whether the absolute value ΔEnergy(k-1) of the energy value difference between the foreground image of the k-1th frame and the energy value of the foreground image of the k-2th frame of the previous frame is less than the threshold T2, if so, then perform the next step; If not, it is determined that the kth frame is a non-congested frame;

56)判断第k-2帧的前景图像与前一帧第k-3帧的前景图像的能量值之差的绝对值ΔEnergy(k-2)是否小于阈值T2,如是,则判定第k帧为拥堵帧;如否,则判定第k帧为非拥堵帧。56) Determine whether the absolute value ΔEnergy(k-2) of the energy value difference between the foreground image of the k-2th frame and the energy value of the foreground image of the k-3th frame of the previous frame is less than the threshold T2, and if so, then determine that the kth frame is congestion frame; if not, then determine the kth frame as a non-congestion frame.

6)根据步骤5)中第k帧图像的拥堵判别结果,判别当前检测周期是否为收费广场拥堵周期,具体步骤如下:6) According to the congestion discrimination result of the kth frame image in step 5), it is judged whether the current detection cycle is a toll plaza congestion cycle, and the specific steps are as follows:

以10秒为一个检测周期,当该检测周期中超过90%的图像帧为拥堵帧,则标记该周期为拥堵周期,反之,则标记为非拥堵周期。Taking 10 seconds as a detection period, when more than 90% of the image frames in the detection period are congested frames, this period is marked as a congested period, otherwise, it is marked as a non-congested period.

进一步,还包括如下步骤:Further, the following steps are also included:

7)根据步骤6)中当前检测周期的拥堵判别结果,判断当前收费广场道路是否拥堵,并相应地输出或解除告警信息,其具体包括如下步骤:7) According to the congestion discrimination result of the current detection period in step 6), judge whether the current toll plaza road is congested, and output or remove the alarm information accordingly, which specifically includes the following steps:

71)建立滑动窗口投票模型,以10秒为一个检测周期,定义滑动窗口的容量为6个周期,当滑动窗口中有3个及以上的周期为拥堵周期时判定收费广场拥堵,否则为非拥堵状态。71) Establish a sliding window voting model, take 10 seconds as a detection period, define the capacity of the sliding window as 6 periods, and determine that the toll plaza is congested when 3 or more periods in the sliding window are congestion periods, otherwise it is non-congestion state.

72)比对当前周期的投票结果与上一周期的投票结果,如果上一周期的投票结果为非拥堵状态,而当前周期的投票结果为拥堵状态,则输出拥堵警告;如果上一周期的投票结果为拥堵状态,而当前周期的投票结果为非拥堵状态,则解除拥堵警告。72) Compare the voting result of the current cycle with the voting result of the previous cycle, if the voting result of the previous cycle is non-congested state, and the voting result of the current cycle is congested state, then output congestion warning; if the voting result of the previous cycle If the result is a congestion state, and the voting result of the current cycle is a non-congestion state, the congestion warning will be released.

T1和T2通过实验获得,本实施例中T1=0.48,T2=0.076。T1 and T2 are obtained through experiments. In this embodiment, T1=0.48 and T2=0.076.

上述步骤5)、6)、7)的流程示意图(即交通拥堵判别流程图)参见图2。Refer to FIG. 2 for the flow diagram of the above steps 5), 6), and 7) (ie, the flow chart of traffic congestion discrimination).

在图2中,当Energy(k)>T1、ΔEnergy(k)<T2、ΔEnergy(k-1)<T2、ΔEnergy(k-2)<T2这四个条件同时成立时,表示第k帧的能量值较高,而其之前三个相邻帧k-1,k-2,k-3的能量值变化量绝对值较小。则第k帧为拥堵帧,标记此帧对应能量值为红色。In Figure 2, when the four conditions of Energy(k)>T 1 , ΔEnergy(k)<T 2 , ΔEnergy(k-1)<T 2 , ΔEnergy(k-2)<T 2 are met simultaneously, it means The energy value of the kth frame is relatively high, while the absolute values of energy value changes of the previous three adjacent frames k-1, k-2, and k-3 are relatively small. Then the kth frame is a congested frame, and the corresponding energy value of this frame is marked in red.

进一步根据周期内帧图像拥堵情况的判别结果,判别当前检测周期是否为收费广场拥堵周期。具体规则为:以10秒为一个检测周期,当该检测周期中不小于9/10的图像帧均为拥堵帧,则标记该周期为拥堵周期,反之,则标记为非拥堵周期。Further, it is judged whether the current detection period is a toll plaza congestion period according to the discrimination result of the frame image congestion situation in the period. The specific rules are: take 10 seconds as a detection cycle, when no less than 9/10 image frames in the detection cycle are congested frames, mark this cycle as a congested cycle, otherwise, mark it as a non-congested cycle.

但要判断当前收费广场道路是否拥堵,还需结合滑动窗口投票模型,以确定当前收费广场道路是否拥堵,以及是否应该相应地输出或解除告警信息。However, to determine whether the current toll plaza road is congested, it is necessary to combine the sliding window voting model to determine whether the current toll plaza road is congested, and whether to output or release the alarm information accordingly.

本模型中,以10秒为一个检测周期,定义滑动窗口的容量为6个周期,当滑动窗口中有3个及以上的周期为拥堵周期,则输出拥堵警告,并标记此时刻起对应的能量值线段为红色;反之,当滑动窗口中有4个及以上的周期为非拥堵周期,则解除警告,并标记此时刻对应能量值为蓝色。In this model, 10 seconds is used as a detection cycle, and the capacity of the sliding window is defined as 6 cycles. When there are 3 or more cycles in the sliding window as congestion cycles, a congestion warning will be output, and the corresponding energy from this moment will be marked. The value line segment is red; on the contrary, when there are 4 or more periods in the sliding window that are non-congested periods, the warning will be released, and the corresponding energy value at this moment will be marked in blue.

图3表示,当出现拥挤事件时,能量值的变化是非常缓慢,非常小的,在64帧至160帧能量值变化量的绝对值一直维持在较小的一个数值,此时段发生了交通拥堵。通过分析能量值-能量值变化量绝对值的关系,最终得到判别规则:能量值处于一个高数值的同时,其能量值变化量绝对值在一段时间内保持在一个较小值的时候,收费广场出现拥堵状态。Figure 3 shows that when there is a congestion event, the change of the energy value is very slow and very small, and the absolute value of the change of the energy value between 64 frames and 160 frames has been maintained at a small value, and traffic jams occurred during this period . By analyzing the relationship between the energy value and the absolute value of the energy value change, the discriminant rule is finally obtained: while the energy value is at a high value, when the absolute value of the energy value change remains at a small value for a period of time, the toll plaza Congestion occurs.

最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it is noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be carried out Modifications or equivalent replacements, without departing from the spirit and scope of the technical solution, should be included in the scope of the claims of the present invention.

Claims (9)

1.基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:包括如下步骤:1. the method for judging traffic congestion in expressway toll plaza based on video detection technology, is characterized in that: comprise the steps: 1)摄取收费广场道路视频;1) Capture the road video of the toll plaza; 2)从视频中提取收费广场道路的图片;2) Extract pictures of toll plaza roads from the video; 3)建立并更新图片的背景模型;3) Establish and update the background model of the picture; 4)从图片中提取前景图像;4) Extract the foreground image from the picture; 5)获取前景图像的能量值及能量值变化量绝对值,判断当前帧图像是否为拥堵图像;5) Obtain the energy value of the foreground image and the absolute value of the energy value change, and judge whether the current frame image is a congested image; 其中,步骤5)具体包括如下步骤:Among them, step 5) specifically includes the following steps: 51)获取当前帧第k帧的前景图像的能量值Energy(k);51) Obtain the energy value Energy(k) of the foreground image of the kth frame of the current frame; 52)获取当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k),同理获取ΔEnergy(k-1)、ΔEnergy(k-2);52) Obtain the absolute value ΔEnergy(k) of the energy value difference between the energy value of the foreground image in the kth frame of the current frame and the foreground image in the k-1th frame of the previous frame, and obtain ΔEnergy(k-1), ΔEnergy(k- 2); 53)判断Energy(k)是否大于阈值T1,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;53) Determine whether Energy(k) is greater than the threshold T1, if yes, execute the next step; if not, determine that the kth frame is a non-congested frame; 54)判断当前帧第k帧的前景图像与前一帧第k-1帧的前景图像的能量值之差的绝对值ΔEnergy(k)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;54) Determine whether the absolute value ΔEnergy(k) of the energy value difference between the energy value of the foreground image in frame k of the current frame and the foreground image in frame k-1 of the previous frame is less than the threshold T2, if yes, execute the next step; if not, Then it is determined that the kth frame is a non-congested frame; 55)判断第k-1帧的前景图像与前一帧第k-2帧的前景图像的能量值之差的绝对值ΔEnergy(k-1)是否小于阈值T2,如是,则执行下一步;如否,则判定第k帧为非拥堵帧;55) Determine whether the absolute value ΔEnergy(k-1) of the energy value difference between the foreground image of the k-1th frame and the energy value of the k-2th frame of the previous frame is less than the threshold T2, and if so, execute the next step; If not, it is determined that the kth frame is a non-congested frame; 56)判断第k-2帧的前景图像与前一帧第k-3帧的前景图像的能量值之差的绝对值ΔEnergy(k-2)是否小于阈值T2,如是,则判定第k帧为拥堵帧;如否,则判定第k帧为非拥堵帧。56) Determine whether the absolute value ΔEnergy(k-2) of the energy value difference between the foreground image of frame k-2 and the energy value of the foreground image of frame k-3 in the previous frame is less than the threshold T2, and if so, determine that frame k is congestion frame; if not, then determine the kth frame as a non-congestion frame. 2.根据权利要求1所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:所述步骤3)具体包括如下步骤:2. The method for judging traffic congestion in expressway toll plazas based on video detection technology according to claim 1, characterized in that: said step 3) specifically includes the following steps: 31)通过对N0张收费广场道路的图片,用均值法求取初始背景,N0>20;31) Calculate the initial background by using the mean value method for N 0 pictures of toll plaza roads, N 0 >20; 32)设定阈值,通过阈值判断,从初始背景中提取背景;32) Set the threshold, and extract the background from the initial background through threshold judgment; 33)用步骤32)提取的背景建立并更新背景模型。33) Build and update the background model with the background extracted in step 32). 3.根据权利要求2所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:所述步骤4)中,根据步骤3)获得的背景模型,利用差分法从图片中提取前景图像。3. The method for judging traffic congestion in expressway toll plazas based on video detection technology according to claim 2, characterized in that: in step 4), the background model obtained in step 3) is extracted from the picture using the difference method foreground image. 4.根据权利要求1所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:步骤5)中,获取前景图像的能量值的方法如下:定义图像序列为
Figure FDA00003560728900021
k为帧号,N为视频的总帧数,则差分图像为difk(x,y)=frk(x,y)-frk-1(x,y);对于第k帧差分图像difk(x,y),计算其全局阈值level,再对该差分图像进行二值化处理,强制转换为二值图像;得到的二值化后的差分图像为
Figure FDA00003560728900022
其有m×n个像素点;通过下式计算该二值化后的差分图像的能量:
4. The method for judging traffic congestion in expressway toll plazas based on video detection technology according to claim 1, characterized in that: in step 5), the method for obtaining the energy value of the foreground image is as follows: define the image sequence as
Figure FDA00003560728900021
k is the frame number, N is the total number of frames of the video, then the differential image is dif k (x,y)=fr k (x,y)-fr k-1 (x,y); for the kth frame differential image dif k (x, y), calculate its global threshold level, and then perform binarization on the difference image, and convert it into a binary image; the obtained binarized difference image is
Figure FDA00003560728900022
It has m×n pixels; the energy of the binarized difference image is calculated by the following formula:
EE. (( DBDB (( kk ,, ii ,, jj )) ii == 11 ,, jj == 11 mm &times;&times; nno )) == 11 mm &times;&times; nno (( &Sigma;&Sigma; ii == 11 mm &Sigma;&Sigma; jj == 11 nno bb (( ii ,, jj )) )) 其中b(i,j)为像素点(i,j)的值,即为该点的能量值。Where b(i, j) is the value of the pixel point (i, j), which is the energy value of the point.
5.根据权利要求1所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:T1=0.48,T2=0.076。5. the method for judging traffic congestion in expressway toll plazas based on video detection technology according to claim 1, characterized in that: T1=0.48, T2=0.076. 6.根据权利要求1至5中任一项所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:所述步骤2)中还包括将提取的收费广场道路的图片由彩色图片转换为灰度图片的步骤。6. The method for judging traffic congestion in expressway toll plazas based on video detection technology according to any one of claims 1 to 5, characterized in that: said step 2) also includes extracting the pictures of toll plaza roads from Steps to convert a color image to a grayscale image. 7.根据权利要求6所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:所述步骤4)中,还包括对所提取的前景图像进行形态学方法去噪的步骤。7. The method for judging traffic jams in expressway toll plazas based on video detection technology according to claim 6, characterized in that: in said step 4), it also includes the step of performing morphological denoising on the extracted foreground image . 8.根据权利要求1至5中任一项所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:步骤5)之后还有如下步骤:8. The method for judging traffic congestion in expressway toll plazas based on video detection technology according to any one of claims 1 to 5, characterized in that: after step 5), there are the following steps: 6)根据步骤5)中第k帧图像的拥堵判别结果,判别当前检测周期是否为收费广场拥堵周期,具体步骤如下:6) According to the congestion judgment result of the kth frame image in step 5), judge whether the current detection cycle is a toll plaza congestion cycle, the specific steps are as follows: 以10秒为一个检测周期,当该检测周期中超过90%的图像帧为拥堵帧,则标记该周期为拥堵周期,反之,则标记为非拥堵周期。Taking 10 seconds as a detection period, when more than 90% of the image frames in the detection period are congested frames, this period is marked as a congested period, otherwise, it is marked as a non-congested period. 9.根据权利要求8所述的基于视频检测技术的高速公路收费广场交通拥堵判别方法,其特征在于:还包括如下步骤:9. the method for judging traffic jams in expressway toll plazas based on video detection technology according to claim 8, is characterized in that: also comprise the steps: 7)根据步骤6)中当前检测周期的拥堵判别结果,判断当前收费广场道路是否拥堵,并相应地输出或解除告警信息,其具体包括如下步骤:7) According to the congestion judgment result of the current detection cycle in step 6), it is judged whether the road in the current toll plaza is congested, and correspondingly output or cancel the alarm information, which specifically includes the following steps: 71)建立滑动窗口投票模型,以10秒为一个检测周期,定义滑动窗口的容量为6个周期,当滑动窗口中有3个及以上的周期为拥堵周期时判定收费广场拥堵,否则为非拥堵状态。71) Establish a sliding window voting model, take 10 seconds as a detection cycle, define the capacity of the sliding window as 6 cycles, and determine that the toll plaza is congested when there are 3 or more cycles in the sliding window as congestion cycles, otherwise it is non-congested state. 72)比对当前周期的投票结果与上一周期的投票结果,如果上一周期的投票结果为非拥堵状态,而当前周期的投票结果为拥堵状态,则输出拥堵警告;如果上一周期的投票结果为拥堵状态,而当前周期的投票结果为非拥堵状态,则解除拥堵警告。72) Compare the voting results of the current cycle with the voting results of the previous cycle. If the voting result of the previous cycle is non-congested and the voting result of the current cycle is congested, a congestion warning will be output; if the voting result of the previous cycle If the result is a congestion state, and the voting result of the current cycle is a non-congestion state, the congestion warning will be released.
CN 201110289530 2011-09-27 2011-09-27 Traffic jam discrimination method in expressway toll plaza based on video detection technology Active CN102436739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110289530 CN102436739B (en) 2011-09-27 2011-09-27 Traffic jam discrimination method in expressway toll plaza based on video detection technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110289530 CN102436739B (en) 2011-09-27 2011-09-27 Traffic jam discrimination method in expressway toll plaza based on video detection technology

Publications (2)

Publication Number Publication Date
CN102436739A CN102436739A (en) 2012-05-02
CN102436739B true CN102436739B (en) 2013-10-23

Family

ID=45984772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110289530 Active CN102436739B (en) 2011-09-27 2011-09-27 Traffic jam discrimination method in expressway toll plaza based on video detection technology

Country Status (1)

Country Link
CN (1) CN102436739B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867415A (en) * 2012-09-12 2013-01-09 重庆大学 Video detection technology-based road jam judgement method

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258425B (en) * 2013-01-29 2015-07-01 中山大学 Method for detecting vehicle queuing length at road crossing
US9424748B2 (en) 2014-09-09 2016-08-23 Here Global B.V. Reporting traffic conditions on road segments containing a bottleneck
CN107293127B (en) * 2017-06-26 2020-03-10 武汉大学 Charging square congestion monitoring system based on multi-beam wide-area microwave detection
CN111383444B (en) * 2018-12-28 2021-08-17 腾讯大地通途(北京)科技有限公司 Method, device, server and storage medium for predicting road condition state
CN110942642B (en) * 2019-11-20 2021-01-19 中科视元科技(杭州)有限公司 Video-based traffic slow-driving detection method and system
CN112991719B (en) * 2021-01-28 2022-05-24 北京奥泽尔科技发展有限公司 Traffic congestion prediction method and system based on congestion portrait

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403664B2 (en) * 2004-02-26 2008-07-22 Mitsubishi Electric Research Laboratories, Inc. Traffic event detection in compressed videos
JP2006031645A (en) * 2004-07-12 2006-02-02 Nariyuki Mitachi Real-time estimation method for dynamic crowd density and crowd accident prevention system
CN101710448B (en) * 2009-12-29 2011-08-10 浙江工业大学 Road traffic state detecting device based on omnibearing computer vision
CN101807345B (en) * 2010-03-26 2012-07-04 重庆大学 Traffic jam judging method based on video detection technology
CN102136194B (en) * 2011-03-22 2013-06-05 浙江工业大学 Road traffic condition detection device based on panorama computer vision

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867415A (en) * 2012-09-12 2013-01-09 重庆大学 Video detection technology-based road jam judgement method
CN102867415B (en) * 2012-09-12 2015-05-13 重庆大学 Video detection technology-based road jam judgement method

Also Published As

Publication number Publication date
CN102436739A (en) 2012-05-02

Similar Documents

Publication Publication Date Title
CN102436739B (en) Traffic jam discrimination method in expressway toll plaza based on video detection technology
US11069233B1 (en) Video-based main road cooperative signal machine control method
US12347310B2 (en) Method for short-term traffic risk prediction of road sections using roadside observation data
CN101807345B (en) Traffic jam judging method based on video detection technology
CN106874863B (en) Vehicle illegal parking and reverse running detection method based on deep convolutional neural network
CN103258430B (en) Road traveling time calculating and traffic road condition judging method and road traveling time calculating and traffic road condition judging device
CN106408956B (en) Rapid evacuation method and control system for tunnel traffic jam
CN110363255B (en) A speed and current limiting method for expressways based on deep learning algorithm
CN101923778A (en) A Video-Based Detection Method of Expressway Traffic Congestion State
CN106448180B (en) A kind of major long tunnel traffic events real-time detection method and detection system
CN110164152A (en) One kind being used for isolated traffic intersection traffic light control system
CN108399743A (en) A kind of vehicle on highway anomaly detection method based on GPS data
CN109191830A (en) A kind of congestion in road detection method based on video image processing
CN103366571A (en) Intelligent method for detecting traffic accident at night
CN104751634A (en) Comprehensive application method of expressway tunnel driving image acquisition information
CN102779349A (en) Foggy day detecting method based on image color spatial feature
CN111754786A (en) System for identifying traffic vehicle passing events on highway
CN104902265A (en) Background edge model-based video camera anomaly detection method and system
CN113055649A (en) Tunnel intelligent video monitoring method and device, intelligent terminal and storage medium
CN104301697A (en) An automatic detection system and method for violent incidents in public places
CN202422420U (en) Illegal parking detection system based on video monitoring
CN102110366A (en) Block-based accumulated expressway vehicle parking event detecting method
CN104268548A (en) Accumulated snow detection method based on road images
CN104575049B (en) A kind of elevated ramp intellectual inducing method and device based on array radar
CN104123840B (en) Vehicle density qualitative discrimination method based on video detection technology

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
TR01 Transfer of patent right

Effective date of registration: 20201216

Address after: 402460 station No.14, no.6, 10th floor, innovation and development center, No.19 Lingfang Avenue, Changzhou street, Rongchang District, Chongqing

Patentee after: Chongqing kezhiyuan Technology Co.,Ltd.

Address before: 400044 No. 174 Sha Jie street, Shapingba District, Chongqing

Patentee before: Chongqing University

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210106

Address after: 215400 No.2, 4th floor, building a, No.88, Beijing East Road, Taicang Development Zone, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yunshou Software Technology Co.,Ltd.

Address before: 402460 station No.14, no.6, 10th floor, innovation and development center, No.19 Lingfang Avenue, Changzhou street, Rongchang District, Chongqing

Patentee before: Chongqing kezhiyuan Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250415

Address after: 215300 room 605, science and Technology Plaza, Qianjin East Road, Kunshan Development Zone, Suzhou, Jiangsu.

Patentee after: KUNSHAN SILAIMU ENERGY-SAVING TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 215400 No.2, 4th floor, building a, No.88, Beijing East Road, Taicang Development Zone, Suzhou City, Jiangsu Province

Patentee before: Suzhou Yunshou Software Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right