[go: up one dir, main page]

CN102136196A - Vehicle velocity measurement method based on image characteristics - Google Patents

Vehicle velocity measurement method based on image characteristics Download PDF

Info

Publication number
CN102136196A
CN102136196A CN 201110057911 CN201110057911A CN102136196A CN 102136196 A CN102136196 A CN 102136196A CN 201110057911 CN201110057911 CN 201110057911 CN 201110057911 A CN201110057911 A CN 201110057911A CN 102136196 A CN102136196 A CN 102136196A
Authority
CN
China
Prior art keywords
image
feature
vehicle
coil
pixel
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
Application number
CN 201110057911
Other languages
Chinese (zh)
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.)
Peking University Shenzhen Graduate School
Original Assignee
Peking University Shenzhen Graduate School
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 Peking University Shenzhen Graduate School filed Critical Peking University Shenzhen Graduate School
Priority to CN 201110057911 priority Critical patent/CN102136196A/en
Publication of CN102136196A publication Critical patent/CN102136196A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于视频序列的车辆测速方法,该方法通过在车道正上方安装固定摄像头获取车道图像信息,并在该车道图像上设置两个虚拟线圈A和B,通过连续多帧检测线圈内的图像特征信息变化来捕获车辆是否已驶入线圈中,当满足设定阈值条件后输出信号并记录下时间,从而通过获取车辆驶入线圈A和B的时间差和两线圈之间的真实距离计算得到车辆的行驶速度。本发明对于车辆测速简单而实时高效,对实时环境中的光照条件变化和摄像机轻微抖动具有很强的鲁棒性,能够有效地抑制阴影对检测的影响。

Figure 201110057911

The invention discloses a method for measuring vehicle speed based on a video sequence. The method obtains image information of the lane by installing a fixed camera directly above the lane, and sets two virtual coils A and B on the lane image, and detects the coil through continuous multi-frames. The change of the image feature information in the vehicle captures whether the vehicle has entered the coil, and when the set threshold condition is met, the signal is output and the time is recorded, so as to obtain the time difference between the vehicle entering coil A and B and the real distance between the two coils Calculate the speed of the vehicle. The invention is simple, real-time and efficient for vehicle speed measurement, has strong robustness to changes in illumination conditions and slight camera shakes in the real-time environment, and can effectively suppress the influence of shadows on detection.

Figure 201110057911

Description

一种基于图像特征的车辆测速方法A vehicle speed measurement method based on image features

技术领域technical field

本发明涉及图像处理和智能交通领域,尤其涉及基于图像特征的车辆测速方法。The invention relates to the fields of image processing and intelligent transportation, in particular to a vehicle speed measurement method based on image features.

背景技术Background technique

车辆测速是智能交通系统中重要的一个组成部分,它为交通监管和管理提供了实时交通数据,而车辆测速是在车辆检测的基础上进行的。通常有两类车辆检测方法:侵入式和非侵入式,前者安装不便,比如环路线圈检测、压电式传感器、磁性传感器、气压路面管等,这些设备在使用时需要直接安装在路面上,或被埋在路面以下;后者则安装方便,不具有破坏性,节约成本,比如视频图像处理、微波雷达、红外传感器、超声波检测器等,其中采用视频图像处理优点最为突出,安装方便且可以在现有监控系统基础上添加相应功能模块即可完成,大大节省开支,还具有交通监管和交通管理功能,可为交通管理部门提供可视图像。基于视频的车辆检测方法分为两类:第一类是基于虚拟点、虚拟线、虚拟线圈的方法;第二类是基于目标提取和跟踪的方法,它们具有各自的优缺点。Vehicle speed measurement is an important part of intelligent transportation system, which provides real-time traffic data for traffic supervision and management, and vehicle speed measurement is carried out on the basis of vehicle detection. There are usually two types of vehicle detection methods: intrusive and non-invasive. The former is inconvenient to install, such as loop coil detection, piezoelectric sensors, magnetic sensors, pneumatic road tubes, etc. These devices need to be installed directly on the road when they are used. Or buried under the road surface; the latter is easy to install, non-destructive, and cost-saving, such as video image processing, microwave radar, infrared sensors, ultrasonic detectors, etc. Among them, the advantages of video image processing are the most prominent, easy to install and can It can be completed by adding corresponding functional modules on the basis of the existing monitoring system, which greatly saves expenses. It also has traffic supervision and traffic management functions, and can provide visual images for traffic management departments. Video-based vehicle detection methods are divided into two categories: the first category is based on virtual points, virtual lines, and virtual coils; the second category is based on target extraction and tracking, and they have their own advantages and disadvantages.

尽管基于目标提取和跟踪的车辆测速方法的检测覆盖面积大,但是其算法较为复杂,实时性较差。而基于虚拟线圈的方法简单有效,但一般的基于虚拟线圈的车辆测速方法过于简单,且对光线变化不具有鲁棒性,尤其容易受阴影的影响。此外由于环境影响,实时应用中摄像机会出现轻微抖动,这将会给检测带来较大的误差。Although the vehicle speed measurement method based on target extraction and tracking has a large detection coverage area, its algorithm is relatively complex and its real-time performance is poor. The method based on virtual coil is simple and effective, but the general vehicle speed measurement method based on virtual coil is too simple, and it is not robust to light changes, especially susceptible to shadows. In addition, due to the influence of the environment, the camera will shake slightly in real-time applications, which will bring large errors to the detection.

发明内容Contents of the invention

有鉴于此,本发明的主要目的在于提供一种基于图像特征的车辆测速方法。本发明实现了通过视频图像处理技术获取图像中出现的车辆的行驶速度,既简单又实时高效,对环境变化具有很强的鲁棒性。In view of this, the main purpose of the present invention is to provide a vehicle speed measurement method based on image features. The invention realizes the acquisition of the running speed of the vehicle appearing in the image through the video image processing technology, which is simple, real-time and efficient, and has strong robustness to environmental changes.

为了实现上述目的,本发明提供了一种基于图像特征的车辆测速方法,包括如下步骤:In order to achieve the above object, the present invention provides a method for measuring vehicle speed based on image features, comprising the steps of:

A、在车道图像上设置两个虚拟线圈,计算所述线圈之间的真实距离,并获得对应大小的子图像区域;A. Set two virtual coils on the lane image, calculate the real distance between the coils, and obtain sub-image areas of corresponding sizes;

B、对所述子图像区域进行图像处理分析,捕获车辆经过所述两个线圈时的信号并得到时间;B. Perform image processing and analysis on the sub-image area, capture the signal when the vehicle passes through the two coils and obtain the time;

C、通过所述信号和时间,以及所述真实距离,计算出所述车辆的行驶速度。C. Calculate the traveling speed of the vehicle according to the signal and time, and the real distance.

所述步骤A包括:Described step A comprises:

A1、采集车道的实时图像;A1. Collect real-time images of the lane;

A2、在获取的所述包含有车道的图像上,根据所述车道设置两个虚拟线圈;A2. On the acquired image containing the lane, set two virtual coils according to the lane;

A3、将所述图像坐标转换到真实世界坐标,从而计算出所述两个线圈之间的真实距离;A3, converting the image coordinates to real world coordinates, thereby calculating the real distance between the two coils;

A4、根据所述虚拟线圈在所述原始图像上的图像坐标位置,截取对应位置的图像区域生成子图像,从而完成了对原始图像的降采样,简化后续处理。A4. According to the image coordinate position of the virtual coil on the original image, intercept the image area at the corresponding position to generate a sub-image, thereby completing the downsampling of the original image and simplifying subsequent processing.

所述步骤B包括:Described step B comprises:

B1、计算当前获取的所述子图像区域的图像特征信息,得到特征图像;B1. Calculate the currently acquired image feature information of the sub-image area to obtain a feature image;

B2、将所述特征图像与预先建立的图像特征背景模型进行像素级和块级减除操作,并根据判定准则综合所述两类减除操作的结果得到新的图像特征差分图像;B2. Perform pixel-level and block-level subtraction operations on the feature image and the pre-established image feature background model, and synthesize the results of the two types of subtraction operations according to the judgment criteria to obtain a new image feature difference image;

B3、对所述图像特征背景模型进行更新;B3. Updating the image feature background model;

B4、对所述前景图像的图像特征进行统计,判断其是否满足车辆进入所述虚拟线圈的条件,若满足则输出车辆进入线圈的信号并记录下当前时间。B4. Make statistics on the image features of the foreground image, judge whether it satisfies the condition for the vehicle to enter the virtual coil, and if so, output a signal that the vehicle enters the coil and record the current time.

其中,步骤B2中所述建立图像特征背景模型的步骤包括:Wherein, the step of setting up the image feature background model described in step B2 includes:

获取一序列图像帧数据,计算其所对应的图像特征信息;Obtain a sequence of image frame data, and calculate its corresponding image feature information;

以所述特征信息作为图像处理基本单元建立和初始化统计模型,从而得到基于图像特征的背景参考图像。A statistical model is established and initialized by using the feature information as a basic unit of image processing, so as to obtain a background reference image based on image features.

其中,步骤B2中所述的将特征图像与图像特征背景模型进行块级减除操作的步骤包括:Wherein, the step of performing a block-level subtraction operation on the feature image and the image feature background model described in step B2 includes:

对所述的特征图像和图像特征背景模型分别进行如下操作:以某个像素点为中心,对其领域范围内的像素点的值进行累加统计,将所述统计值作为所述当前像素点的值,以此类推,直到遍历完整张图像,从而生成新的特征图像;Perform the following operations on the feature image and the image feature background model respectively: take a certain pixel as the center, perform cumulative statistics on the values of the pixels within its domain, and use the statistical value as the value of the current pixel. value, and so on, until the entire image is traversed to generate a new feature image;

将所述生成的两张特征图像进行减除操作,得到差分图像。Subtracting the two generated feature images to obtain a difference image.

其中,步骤B2中所述的根据判定准则综合所述两类减除操作的结果得到新的图像特征差分图像的步骤包括:Wherein, the step of synthesizing the results of the two types of subtraction operations described in step B2 to obtain a new image feature difference image according to the judgment criterion includes:

首先取出所述像素级操作得到的差分图像中的某个像素;First, take out a certain pixel in the differential image obtained by the pixel-level operation;

然后取出对应于所述像素位置上的所述块级操作得到的差分图像中的像素;Then fetching a pixel corresponding to the pixel position in the differential image obtained by the block-level operation;

对所述两个具有相同位置的像素点作如下判断:若所述像素级差分图像的像素点的值不为空,且所述块级差分图像的像素点的值为空时,则将所述新的图像特征差分图像上对应像素位置上的值置为非空,最后遍历完整张所述图像后得到一张新的差分图像。The two pixels with the same position are judged as follows: if the value of the pixel of the pixel-level difference image is not empty, and the value of the pixel of the block-level difference image is empty, then the The value of the corresponding pixel position on the new image feature difference image is set to be non-null, and finally a new difference image is obtained after traversing the entire image.

其中,步骤B4中所述判断是否满足车辆进入虚拟线圈的条件的步骤包括:Wherein, the step of judging whether the condition for the vehicle to enter the virtual coil described in step B4 includes:

对所述前景图像特征信息进行统计,得到关于该前景图像的特征描述;Perform statistics on the feature information of the foreground image to obtain a feature description about the foreground image;

若该特征描述满足判断一个图像区域是否发生变化的条件,则此时表明所述线圈对应的图像区域发生了变化,并对该变化进行计数;If the feature description satisfies the condition for judging whether an image area has changed, it indicates that the image area corresponding to the coil has changed, and the change is counted;

判断所述计数次数是否满足了所述车辆进入线圈时的阈值条件,若满足则判断所述图像区域的变化为车辆进入线圈中引起的,则输出车辆进入线圈的信号并记录下当前时间。It is judged whether the counting times meet the threshold condition when the vehicle enters the coil, if so, it is judged that the change of the image area is caused by the vehicle entering the coil, then output the signal of the vehicle entering the coil and record the current time.

所述步骤C包括:Described step C comprises:

C1、判断所述第二个虚拟线圈是否产生信号,若是则继续C2步骤;C1, judging whether the second virtual coil generates a signal, if so, continue to step C2;

C2、判断所述第一个虚拟线圈是否已经产生信号,若是则将所述两个信号标记为所述车辆经过所述两个线圈时分别产生的信号,否则无效;C2. Judging whether the first virtual coil has generated a signal, if so, marking the two signals as signals generated when the vehicle passes through the two coils, otherwise invalid;

C3、根据所述两个信号对应的时间得到所述车辆经过所述两个线圈时的时间差;C3. Obtain the time difference when the vehicle passes the two coils according to the time corresponding to the two signals;

C4、根据所述步骤A中求得的所述两线圈之间的真实距离,通过速度计算公式计算得到所述车辆的行驶速度。C4. According to the real distance between the two coils obtained in the step A, calculate the driving speed of the vehicle through a speed calculation formula.

本发明的有益效果是:The beneficial effects of the present invention are:

本发明所提出的一种基于图像特征的车辆测速方法,通过视频图像处理技术获取图像中出现的车辆的行驶速度,既简单又实时高效,对光照变化和摄像机轻微抖动具有很强的鲁棒性,能够有效地抑制阴影对检测的影响。A vehicle speed measurement method based on image features proposed by the present invention obtains the driving speed of the vehicle appearing in the image through video image processing technology, which is simple, real-time and efficient, and has strong robustness to illumination changes and slight camera shakes , which can effectively suppress the influence of shadows on detection.

附图说明Description of drawings

图1为本发明基于图像特征的车辆测速方法的一种实施例的流程图;Fig. 1 is a flow chart of an embodiment of the vehicle speed measurement method based on image features of the present invention;

图2为图1中图像预处理模块的一种实施例的流程图;Fig. 2 is a flow chart of an embodiment of the image preprocessing module in Fig. 1;

图3为本发明设置虚拟线圈的一种实施例的示意图;Fig. 3 is a schematic diagram of an embodiment of setting a virtual coil in the present invention;

图4为图1中车辆捕获模块的一种实施例的流程图;Fig. 4 is a flow chart of an embodiment of the vehicle capture module in Fig. 1;

图5为图4中块级边缘特征背景减除的一种实施例的流程图;Fig. 5 is a flowchart of an embodiment of block-level edge feature background subtraction in Fig. 4;

图6为图1中车速计算模块的一种实施例的流程图。FIG. 6 is a flowchart of an embodiment of the vehicle speed calculation module in FIG. 1 .

具体实施方式Detailed ways

下面通过具体实施方式结合附图对本发明作进一步详细说明。The present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

请参考图1,一种基于图像特征的车辆测速方法包括步骤:Please refer to Figure 1, a vehicle speed measurement method based on image features includes steps:

S1、图像预处理模块,即在车道图像上设置两个虚拟线圈,计算所述线圈之间的真实距离,并获得对应大小的子图像区域;S1, the image preprocessing module, that is, two virtual coils are set on the lane image, the real distance between the coils is calculated, and a sub-image area of a corresponding size is obtained;

S2、车辆捕获模块,即对所述子图像区域进行图像处理分析,捕获车辆经过所述两个线圈时的信号并得到时间;S2. The vehicle capture module, which performs image processing and analysis on the sub-image area, captures the signal when the vehicle passes through the two coils and obtains the time;

S3、车速计算模块,即通过所述信号和时间,以及所述真实距离,计算出所述车辆的行驶速度。S3. The vehicle speed calculation module, that is, calculate the driving speed of the vehicle based on the signal, time, and the real distance.

请参考图2,在本发明的一种实施例中,步骤S1包括步骤:Please refer to Fig. 2, in one embodiment of the present invention, step S1 comprises the steps:

S11、设置虚拟线圈A和B。在本实施例中,所述虚拟线圈采用矩形形状,如图3所示,当然也可采用其他不规则形状;S11. Setting virtual coils A and B. In this embodiment, the virtual coil adopts a rectangular shape, as shown in FIG. 3 , of course, other irregular shapes can also be adopted;

S12、计算两线圈之间的真实距离,首先获取所述线圈在图像上的像素坐标,然后将其转换到世界坐标系中,继而获取所述两线圈对应位置上的某点的真实坐标,从而计算出所述两线圈之间的真实距离;S12. Calculate the real distance between the two coils, first obtain the pixel coordinates of the coils on the image, then convert them into the world coordinate system, and then obtain the real coordinates of a point at the corresponding positions of the two coils, so that Calculate the real distance between the two coils;

S13、根据所述虚拟线圈在所述原始图像上的图像坐标位置,截取对应位置的图像区域生成子图像,从而完成了对原始图像的降采样,简化后续处理。S13. According to the image coordinate position of the virtual coil on the original image, intercept the image area at the corresponding position to generate a sub-image, thereby completing the downsampling of the original image and simplifying subsequent processing.

S14、输出所述子图像数据。S14. Output the sub-image data.

请参考图4,在本发明的一种实施例中,步骤S2包括步骤:Please refer to Fig. 4, in one embodiment of the present invention, step S2 comprises the steps:

S21、计算子图像的边缘特征,得到其边缘特征图像;S21. Calculate the edge feature of the sub-image to obtain its edge feature image;

S22、对所述边缘特征图像进行二值化和去噪处理;S22. Perform binarization and denoising processing on the edge feature image;

S23、将所述子图像的边缘特征图像与边缘特征背景模型进行像素级的图像减除操作,从而获取边缘特征差分图像。所述像素级操作指的是以单个像素作为基本处理单元;S23. Perform a pixel-level image subtraction operation on the edge feature image of the sub-image and the edge feature background model, so as to obtain an edge feature difference image. The pixel-level operation refers to using a single pixel as a basic processing unit;

S24、将所述子图像的边缘特征图像与边缘特征背景模型进行块级的图像减除操作,从而获取边缘特征差分图像;S24. Perform a block-level image subtraction operation on the edge feature image of the sub-image and the edge feature background model, so as to obtain an edge feature difference image;

请参考图5,在本实施例中,所述的将特征图像与图像特征背景模型进行块级减除操作包括步骤:Please refer to FIG. 5. In this embodiment, the block-level subtraction operation of the feature image and the image feature background model includes steps:

S241、根据所述子图像的边缘特征图像,生成新的边缘特征图像。在本实施例中,采用如下方法:以某个像素点为中心,对其领域范围内的像素点的值进行累加统计,将所述统计值作为所述当前像素点的值,以此类推,直到遍历完整张图像,从而生成新的边缘特征图像。在本实施例中,所述领域采用长宽都为3个像素大小的矩形,当然也可以采用不同尺寸和形状的领域;所述边缘特征图像的像素值只有两种:1或0,当然也可以采用其他值;S241. Generate a new edge feature image according to the edge feature image of the sub-image. In this embodiment, the following method is adopted: taking a certain pixel point as the center, performing cumulative statistics on the values of the pixel points within its range, using the statistical value as the value of the current pixel point, and so on, Until the entire image is traversed, a new edge feature image is generated. In this embodiment, the field adopts a rectangle whose length and width are 3 pixels in size, of course, fields of different sizes and shapes can also be used; there are only two types of pixel values in the edge feature image: 1 or 0, and of course Other values can be taken;

S242、根据所述边缘特征背景参考图像,生成新的边缘特征背景参考图像。在本实施例中,采用如下方法:以某个像素点为中心,对其领域范围内的像素点的值进行累加统计,将所述统计值作为所述当前像素点的值,以此类推,直到遍历完整张图像,从而生成新的边缘特征背景参考图像。其中,所述领域类型和大小保持与步骤S241采用的领域一致。在本实施例中,所述边缘特征背景参考图像的像素值只有两种:1或0,当然也可以采用其他值;S242. Generate a new edge feature background reference image according to the edge feature background reference image. In this embodiment, the following method is adopted: taking a certain pixel point as the center, performing cumulative statistics on the values of the pixel points within its range, using the statistical value as the value of the current pixel point, and so on, Until the entire image is traversed, a new edge feature background reference image is generated. Wherein, the domain type and size remain consistent with the domain used in step S241. In this embodiment, there are only two pixel values of the edge feature background reference image: 1 or 0, and of course other values can also be used;

S243、将所述生成的两张边缘特征图像进行减除操作,得到差分图像;S243. Perform a subtraction operation on the two generated edge feature images to obtain a difference image;

S244、对所述差分图像进行图像二值化和去噪处理;S244. Perform image binarization and denoising processing on the difference image;

S245、输出经步骤S244处理后的边缘特征差分图像。S245. Output the edge feature difference image processed in step S244.

S25、根据步骤S23和步骤S24分别得到的差分图像,进行摄缘机轻微抖动消除处理,包括步骤:S25, according to the difference image obtained respectively in step S23 and step S24, carry out the slight shake elimination processing of the camera, including steps:

首先取出步骤S23得到的差分图像中的某个像素;First take out a certain pixel in the differential image obtained in step S23;

然后取出对应于所述像素位置上的步骤S24中得到的差分图像中的像素;Then take out the pixel corresponding to the difference image obtained in the step S24 on the pixel position;

对所述两个像素点作如下判断:若所述像素级差分图像的像素点的值不为空,且所述块级差分图像的像素点的值为空时,则将所述新的图像特征差分图像上对应像素位置上的值置为非空,最后遍历完整张所述图像后得到一张新的差分图像。在本实施例中,像素值为1表示不为空,0表示空。The two pixels are judged as follows: if the value of the pixel of the pixel-level difference image is not empty, and the value of the pixel of the block-level difference image is empty, then the new image The value of the corresponding pixel position on the feature difference image is set to be non-null, and finally a new difference image is obtained after traversing the entire image. In this embodiment, a pixel value of 1 means not empty, and 0 means empty.

S26、根据当前获得的所述二值差分图像的帧信息,对已建立的边缘特征图像背景模型进行更新。在本实施例中,所述更新方法可以采用移动平均方法,当然也可以采用平均值或中值方法;S26. Update the established background model of the edge feature image according to the currently obtained frame information of the binary difference image. In this embodiment, the updating method may adopt a moving average method, and of course an average or median method may also be used;

S27、统计特征图像前景点的个数的总数,所述前景点在本实施例中可以设为值为1的像素点,当然也可采用其他值。S27. Count the total number of foreground points of the characteristic image. In this embodiment, the foreground points can be set as pixel points with a value of 1, and of course other values can also be used.

S28、判断获得的所述前景点的总数是否大于设定阈值T1,如是则执行步骤S29,否则执行步骤S210。在本实施例中,此阈值T1为一百分比,即前景点总数与所述线圈中像素点总数的比例。其中阈值T1可以根据经验设置。S28 , judging whether the obtained total number of foreground points is greater than the set threshold T1 , if yes, execute step S29 , otherwise execute step S210 . In this embodiment, the threshold T1 is a percentage, that is, the ratio of the total number of foreground points to the total number of pixels in the coil. The threshold T1 can be set according to experience.

S29、将当前所述线圈对应的车辆进入其中的置信度CAR IN增加1;S29. Increase the confidence degree CAR IN of the vehicle corresponding to the current coil entering it by 1;

S210、将当前所述线圈对应的车辆进入其中的置信度CAR IN减少1;S210. Decrease the confidence degree CAR IN of the vehicle corresponding to the current coil entering it by 1;

S211、判断所述线圈对应的置信度CAR IN是否大于设定阈值T2,如是则执行步骤S212。其中阈值T2可以根据经验设置。S211. Judging whether the confidence degree CAR IN corresponding to the coil is greater than the set threshold T2, if yes, execute step S212. The threshold T2 can be set according to experience.

S212、输出车辆进入该线圈的信号,并记录当前时间Time。S212. Output a signal that the vehicle enters the coil, and record the current time Time.

请参考图6,在本发明的一种实施例中,步骤S3包括步骤:Please refer to FIG. 6, in one embodiment of the present invention, step S3 includes steps:

S31、判断所述第二个虚拟线圈B是否有信号产生,若是则继续执行步骤S32;S31. Judging whether the second virtual coil B has a signal generated, if so, proceed to step S32;

S32、判断所述第一个虚拟线圈A是否有信号产生,若是则继续执行步骤S33;S32. Judging whether the first virtual coil A has a signal generated, if so, proceed to step S33;

S33、获取所述两个信号所对应的时间Time,从而得到所述车辆经过所述两个线圈时的时间差;S33. Obtain the time Time corresponding to the two signals, so as to obtain the time difference when the vehicle passes the two coils;

S34、获取所述两个线圈之间的真实距离;S34. Obtain a real distance between the two coils;

S35、根据所述距离和时间差,通过速度计算公式求得到所述车辆的行驶速度。S35. According to the distance and the time difference, obtain the traveling speed of the vehicle through a speed calculation formula.

S36、输出所述车辆的行驶速度。S36. Output the driving speed of the vehicle.

以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the present invention in conjunction with specific embodiments, and it cannot be assumed that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field of the present invention, without departing from the concept of the present invention, some simple deduction or replacement can be made, which should be regarded as belonging to the protection scope of the present invention.

Claims (8)

1.一种基于图像特征的车辆测速方法,其特征在于,包括步骤:1. A method for measuring vehicle speed based on image features, comprising the steps of: A、在车道图像上设置两个虚拟线圈,计算所述线圈之间的真实距离,并获得对应大小的子图像区域;A. Set two virtual coils on the lane image, calculate the real distance between the coils, and obtain sub-image areas of corresponding sizes; B、对所述子图像区域进行图像处理分析,捕获车辆经过所述两个线圈时的信号并得到时间;B. Perform image processing and analysis on the sub-image area, capture the signal when the vehicle passes through the two coils and obtain the time; C、通过所述信号和时间,以及所述真实距离,计算出所述车辆的行驶速度。C. Calculate the traveling speed of the vehicle according to the signal and time, and the real distance. 2.如权利要求1所述的方法,其特征在于,所述步骤A包括:2. The method according to claim 1, wherein said step A comprises: 在获取的包含有车道的图像上,根据所述车道设置两个虚拟线圈;On the acquired image containing the lane, set two virtual coils according to the lane; 通过图像坐标与真实世界坐标之间的标定与转换计算得到所述两个线圈之间的真实距离;The real distance between the two coils is obtained through calibration and conversion calculation between the image coordinates and the real world coordinates; 截取对应所述线圈的图像坐标位置的图像区域,生成子图像,从而完成了对原始图像的降采样。The image area corresponding to the image coordinate position of the coil is intercepted to generate a sub-image, thereby completing the down-sampling of the original image. 3.如权利要求1所述的方法,其特征在于,所述步骤B包括:3. The method according to claim 1, wherein said step B comprises: 计算当前获取的子图像区域的图像特征信息,得到特征图像;Calculate the image feature information of the currently acquired sub-image area to obtain the feature image; 将所述特征图像与预先建立的图像特征背景模型进行像素级和块级减除操作,并根据判定准则综合所述两类减除操作的结果得到新的图像特征差分图像;Perform pixel-level and block-level subtraction operations on the feature image and the pre-established image feature background model, and synthesize the results of the two types of subtraction operations according to the judgment criteria to obtain a new image feature difference image; 使用所述前景图像对所述图像特征背景模型进行更新;updating the image feature background model using the foreground image; 对所述前景图像的图像特征进行统计,判断其是否满足车辆进入所述虚拟线圈的条件,若满足则输出车辆进入线圈的信号并记录下当前时间。The image features of the foreground image are counted, and it is judged whether it satisfies the condition of the vehicle entering the virtual coil, and if so, a signal of the vehicle entering the coil is output and the current time is recorded. 4.如权利要求3所述的方法,其特征在于,所述的图像特征背景模型的初始化与建立包括:获取一序列图像帧数据,计算其所对应的图像特征信息,以所述特征信息作为图像处理基本单元建立和初始化统计模型,从而得到基于图像特征的背景参考图像。4. The method according to claim 3, wherein the initialization and establishment of the image feature background model comprises: acquiring a sequence of image frame data, calculating its corresponding image feature information, using the feature information as The basic unit of image processing establishes and initializes a statistical model to obtain a background reference image based on image features. 5.如权利要求3所述的方法,其特征在于,所述的将特征图像与图像特征背景模型进行块级减除操作包括:5. The method according to claim 3, wherein said performing a block-level subtraction operation on the feature image and the image feature background model comprises: 对所述的特征图像和图像特征背景模型分别进行如下操作:以某个像素点为中心,对其领域范围内的像素点的值进行累加统计,将所述统计值作为所述当前像素点的值,以此类推,直到遍历完整张图像,从而生成新的特征图像;Perform the following operations on the feature image and the image feature background model respectively: take a certain pixel as the center, perform cumulative statistics on the values of the pixels within its domain, and use the statistical value as the value of the current pixel. value, and so on, until the entire image is traversed to generate a new feature image; 将所述生成的两张特征图像进行减除操作,得到差分图像。Subtracting the two generated feature images to obtain a difference image. 6.如权利要求3所述的方法,其特征在于,所述的根据判定准则综合所述两类减除操作的结果得到新的图像特征差分图像包括:6. method as claimed in claim 3 is characterized in that, described according to the result of described two kinds of deduction operation comprehensively according to judgment criterion and obtains new image characteristic difference image and comprises: 首先取出所述像素级操作得到的差分图像中的某个像素;First, take out a certain pixel in the differential image obtained by the pixel-level operation; 然后取出对应于所述像素位置上的所述块级操作得到的差分图像中的像素;Then fetching a pixel corresponding to the pixel position in the differential image obtained by the block-level operation; 对所述两个具有相同位置的像素点作如下判断:若所述像素级差分图像的像素点的值不为空,且所述块级差分图像的像素点的值为空时,则将所述新的图像特征差分图像上对应像素位置上的值置为非空,最后遍历完整张所述图像后得到一张新的差分图像。The two pixels with the same position are judged as follows: if the value of the pixel of the pixel-level difference image is not empty, and the value of the pixel of the block-level difference image is empty, then the The value of the corresponding pixel position on the new image feature difference image is set to be non-null, and finally a new difference image is obtained after traversing the entire image. 7.如权利要求3所述的方法,其特征在于,所述判断是否满足车辆进入所述虚拟线圈的条件包括:7. The method according to claim 3, wherein the judging whether the condition for the vehicle entering the virtual coil is satisfied comprises: 对所述前景图像特征信息进行统计,得到关于该前景图像的特征描述;Perform statistics on the feature information of the foreground image to obtain a feature description about the foreground image; 若该特征描述满足判断一个图像区域是否发生变化的条件,则此时表明所述线圈对应的图像区域发生了变化,并对该变化进行计数;If the feature description satisfies the condition for judging whether an image area has changed, it indicates that the image area corresponding to the coil has changed, and the change is counted; 判断所述计数次数是否满足了所述车辆进入线圈时的阈值条件,若满足则判断所述图像区域的变化为车辆进入线圈中引起的,则输出车辆进入线圈的信号并记录下当前时间。It is judged whether the counting times meet the threshold condition when the vehicle enters the coil, if so, it is judged that the change of the image area is caused by the vehicle entering the coil, then output the signal of the vehicle entering the coil and record the current time. 8.如权利要求1所述的方法,其特征在于,所述步骤C包括:8. The method according to claim 1, wherein said step C comprises: 当所述第二个虚拟线圈产生信号时,判断所述第一个虚拟线圈是否已经输出过信号,若是则将所述两个信号标记为所述车辆经过所述两个线圈时分别产生的信号,否则无效;When the second virtual coil generates a signal, it is judged whether the first virtual coil has output a signal, and if so, the two signals are marked as the signals respectively generated when the vehicle passes through the two coils , otherwise invalid; 根据所述两个信号对应的时间得到所述车辆经过所述两个线圈时的时间差;Obtaining the time difference when the vehicle passes the two coils according to the time corresponding to the two signals; 进一步,根据所述步骤A中求得的所述两线圈之间的真实距离,通过速度计算公式计算得到所述车辆的行驶速度。Further, according to the real distance between the two coils obtained in the step A, the driving speed of the vehicle is calculated through a speed calculation formula.
CN 201110057911 2011-03-10 2011-03-10 Vehicle velocity measurement method based on image characteristics Pending CN102136196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110057911 CN102136196A (en) 2011-03-10 2011-03-10 Vehicle velocity measurement method based on image characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110057911 CN102136196A (en) 2011-03-10 2011-03-10 Vehicle velocity measurement method based on image characteristics

Publications (1)

Publication Number Publication Date
CN102136196A true CN102136196A (en) 2011-07-27

Family

ID=44295966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110057911 Pending CN102136196A (en) 2011-03-10 2011-03-10 Vehicle velocity measurement method based on image characteristics

Country Status (1)

Country Link
CN (1) CN102136196A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542812A (en) * 2012-01-14 2012-07-04 长安大学 PDA (Personal Digital Assistant)-based overall speed detecting and data processing method
CN102592456A (en) * 2012-03-09 2012-07-18 泉州市视通光电网络有限公司 Video-based vehicle speed measuring method
CN102708690A (en) * 2012-06-20 2012-10-03 中国计量学院 Method for measuring road noise on basis of road monitoring video
CN102981010A (en) * 2011-09-05 2013-03-20 业纳遥控设备有限公司 Method for verifying speed of appropriate vehicle by using camera
CN103077387A (en) * 2013-02-07 2013-05-01 东莞中国科学院云计算产业技术创新与育成中心 Automatic detection method of freight train carriages in video
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN104267209A (en) * 2014-10-24 2015-01-07 浙江力石科技股份有限公司 Method and system for expressway video speed measurement based on virtual coils
CN105761504A (en) * 2016-05-17 2016-07-13 重庆大学 Vehicle speed real-time measuring method based on inhomogeneous video image frame collection
CN106781536A (en) * 2016-11-21 2017-05-31 四川大学 A kind of vehicle speed measuring method based on video detection
CN106959378A (en) * 2017-03-30 2017-07-18 梧州学院 Single width motion blur image speed computational methods
WO2017161544A1 (en) * 2016-03-25 2017-09-28 深圳大学 Single-camera video sequence matching based vehicle speed measurement method and system
CN107784839A (en) * 2016-08-26 2018-03-09 合盈光电科技股份有限公司 Vehicle detection system and method thereof
CN108428347A (en) * 2018-05-14 2018-08-21 三峡大学 A kind of vehicle count method and system based on more detection zones
CN109389026A (en) * 2017-08-09 2019-02-26 三星电子株式会社 Lane detection method and equipment
CN109686048A (en) * 2019-01-02 2019-04-26 平安科技(深圳)有限公司 Station platform gets over method for early warning, device, computer equipment and the storage medium of line
CN112580402A (en) * 2019-09-30 2021-03-30 广州汽车集团股份有限公司 Monocular vision pedestrian distance measurement method and system, vehicle and medium thereof
CN116510277A (en) * 2023-05-26 2023-08-01 广西师范大学 A method for measuring approach speed of rapid long jump based on machine vision
CN118865696A (en) * 2024-09-27 2024-10-29 中电信无人科技(江苏)有限公司 Traffic congestion detection method, device, electronic device and non-volatile storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510358A (en) * 2009-03-20 2009-08-19 吉林大学 Method and apparatus for processing real time statistical vehicle flowrate using video image
CN101556697A (en) * 2008-04-10 2009-10-14 上海宝康电子控制工程有限公司 Method and system for motion target tracking based on rapid characteristic points
CN101872546A (en) * 2010-05-06 2010-10-27 复旦大学 A fast detection method for cross-border vehicles based on video

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556697A (en) * 2008-04-10 2009-10-14 上海宝康电子控制工程有限公司 Method and system for motion target tracking based on rapid characteristic points
CN101510358A (en) * 2009-03-20 2009-08-19 吉林大学 Method and apparatus for processing real time statistical vehicle flowrate using video image
CN101872546A (en) * 2010-05-06 2010-10-27 复旦大学 A fast detection method for cross-border vehicles based on video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》 20040615 尹朝征 基于视频虚拟线圈的交通流参数检测 I140-109 1-8 , 第02期 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981010A (en) * 2011-09-05 2013-03-20 业纳遥控设备有限公司 Method for verifying speed of appropriate vehicle by using camera
CN102981010B (en) * 2011-09-05 2017-11-28 业纳遥控设备有限公司 For the method for the speed for carrying out confirmatory measurement target vehicle by camera
CN102542812A (en) * 2012-01-14 2012-07-04 长安大学 PDA (Personal Digital Assistant)-based overall speed detecting and data processing method
CN102592456A (en) * 2012-03-09 2012-07-18 泉州市视通光电网络有限公司 Video-based vehicle speed measuring method
CN102708690A (en) * 2012-06-20 2012-10-03 中国计量学院 Method for measuring road noise on basis of road monitoring video
CN103077387A (en) * 2013-02-07 2013-05-01 东莞中国科学院云计算产业技术创新与育成中心 Automatic detection method of freight train carriages in video
CN103077387B (en) * 2013-02-07 2015-11-18 东莞中国科学院云计算产业技术创新与育成中心 Automatic detection method for freight train carriage in video
CN103197090A (en) * 2013-03-07 2013-07-10 上海电科智能系统股份有限公司 Video speed measuring method based on feature point change
CN104267209A (en) * 2014-10-24 2015-01-07 浙江力石科技股份有限公司 Method and system for expressway video speed measurement based on virtual coils
CN104267209B (en) * 2014-10-24 2017-01-11 浙江力石科技股份有限公司 Method and system for expressway video speed measurement based on virtual coils
WO2017161544A1 (en) * 2016-03-25 2017-09-28 深圳大学 Single-camera video sequence matching based vehicle speed measurement method and system
CN105761504A (en) * 2016-05-17 2016-07-13 重庆大学 Vehicle speed real-time measuring method based on inhomogeneous video image frame collection
CN105761504B (en) * 2016-05-17 2018-02-09 重庆大学 Speed method for real-time measurement based on the collection of non-homogeneous video frame image
CN107784839A (en) * 2016-08-26 2018-03-09 合盈光电科技股份有限公司 Vehicle detection system and method thereof
CN106781536A (en) * 2016-11-21 2017-05-31 四川大学 A kind of vehicle speed measuring method based on video detection
CN106959378A (en) * 2017-03-30 2017-07-18 梧州学院 Single width motion blur image speed computational methods
CN109389026A (en) * 2017-08-09 2019-02-26 三星电子株式会社 Lane detection method and equipment
CN109389026B (en) * 2017-08-09 2023-10-17 三星电子株式会社 Lane detection methods and equipment
CN108428347A (en) * 2018-05-14 2018-08-21 三峡大学 A kind of vehicle count method and system based on more detection zones
CN109686048A (en) * 2019-01-02 2019-04-26 平安科技(深圳)有限公司 Station platform gets over method for early warning, device, computer equipment and the storage medium of line
CN109686048B (en) * 2019-01-02 2022-03-18 平安科技(深圳)有限公司 Early warning method and device for line crossing of train platform, computer equipment and storage medium
CN112580402A (en) * 2019-09-30 2021-03-30 广州汽车集团股份有限公司 Monocular vision pedestrian distance measurement method and system, vehicle and medium thereof
CN116510277A (en) * 2023-05-26 2023-08-01 广西师范大学 A method for measuring approach speed of rapid long jump based on machine vision
CN116510277B (en) * 2023-05-26 2025-05-16 广西师范大学 A method for measuring the run-up speed of long jump based on machine vision
CN118865696A (en) * 2024-09-27 2024-10-29 中电信无人科技(江苏)有限公司 Traffic congestion detection method, device, electronic device and non-volatile storage medium

Similar Documents

Publication Publication Date Title
CN102136196A (en) Vehicle velocity measurement method based on image characteristics
CN104183127B (en) Traffic surveillance video detection method and device
CN103279791B (en) Based on pedestrian's computing method of multiple features
Lan et al. Vehicle speed measurement based on gray constraint optical flow algorithm
CN101826228B (en) Detection method of bus passenger moving objects based on background estimation
TWI734472B (en) Driving assistance system based on deep learning and the method thereof
CN102110376B (en) Roadside parking space detection device based on computer vision
CN102592454A (en) Intersection vehicle movement parameter measuring method based on detection of vehicle side face and road intersection line
CN104301712B (en) Monitoring camera shake detection method based on video analysis
CN101860664A (en) A Moving Object Detection Method Robust to Illumination Changes
CN102496281B (en) Vehicle red-light violation detection method based on combination of tracking and virtual loop
CN101364347A (en) A video-based detection method for vehicle control delays at intersections
CN103425764B (en) Vehicle matching method based on videos
CN103208190B (en) Traffic flow detection method based on object detection
CN102074022A (en) Infrared image-based weak and small moving target detecting method
CN104378539B (en) The video structural extraction of semantics video camera and its method of scene adaptive
CN107133610B (en) Visual detection and counting method for traffic flow under complex road conditions
CN103778645A (en) Circular target real-time tracking method based on images
CN104063882A (en) Vehicle video speed measuring method based on binocular camera
CN110718061A (en) Traffic intersection traffic flow statistics method, device, storage medium and electronic device
CN117152617A (en) An urban flood identification method and system
CN107067752A (en) Automobile speedestimate system and method based on unmanned plane image
CN107516423B (en) Video-based vehicle driving direction detection method
CN112052768A (en) Urban illegal parking detection method and device based on unmanned aerial vehicle and storage medium
Ua-Areemitr et al. Low-cost road traffic state estimation system using time-spatial image processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110727