CN110307791A - Calculation method of vehicle length and speed based on 3D vehicle bounding box - Google Patents

Calculation method of vehicle length and speed based on 3D vehicle bounding box Download PDF

Info

Publication number
CN110307791A
CN110307791A CN201910509507.2A CN201910509507A CN110307791A CN 110307791 A CN110307791 A CN 110307791A CN 201910509507 A CN201910509507 A CN 201910509507A CN 110307791 A CN110307791 A CN 110307791A
Authority
CN
China
Prior art keywords
vehicle
bounding box
detection area
dimensional
length
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.)
Granted
Application number
CN201910509507.2A
Other languages
Chinese (zh)
Other versions
CN110307791B (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.)
Southeast University
Original Assignee
Southeast 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 Southeast University filed Critical Southeast University
Priority to CN201910509507.2A priority Critical patent/CN110307791B/en
Publication of CN110307791A publication Critical patent/CN110307791A/en
Application granted granted Critical
Publication of CN110307791B publication Critical patent/CN110307791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/04Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness specially adapted for measuring length or width of objects while moving
    • G01B11/043Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness specially adapted for measuring length or width of objects while moving for measuring length
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P5/00Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft
    • G01P5/18Measuring speed of fluids, e.g. of air stream; Measuring speed of bodies relative to fluids, e.g. of ship, of aircraft by measuring the time taken to traverse a fixed distance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • G06V20/42Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items of sport video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种基于三维车辆边界框的车辆长度及速度计算方法。该方法包括:(1)基于Mask R‑CNN网络生成车辆掩膜;(2)由场景中三个消失点向生成的车辆掩膜作切线进而构建三维车辆边界框;(3)建立车辆虚拟检测区,并根据三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内;(4)利用车道虚线段及场景消失点来确定路面参考点的像素坐标,再根据已知的车道虚线段长度、车道宽度来求解道路平面世界坐标与对应像素坐标之间的单应矩阵;(5)利用单应矩阵及三维车辆边界框计算车辆实际长度;(6)利用单应矩阵、三维车辆边界框及虚拟检测区计算车辆速度。本发明计算精度高且设备成本低,可有效应用于智慧交通系统当中。

The invention provides a method for calculating vehicle length and speed based on a three-dimensional vehicle bounding box. The method includes: (1) generating a vehicle mask based on the Mask R-CNN network; (2) making tangent lines from three vanishing points in the scene to the generated vehicle mask to construct a three-dimensional vehicle bounding box; (3) establishing a virtual vehicle detection area, and judge whether the vehicle is in the detection area according to whether the midpoint of the bottom front edge of the three-dimensional vehicle bounding box is in the detection area; The homography matrix between the world coordinates of the road plane and the corresponding pixel coordinates is solved by using the known length of the dotted line segment of the lane and the width of the lane; (5) Calculate the actual length of the vehicle by using the homography matrix and the three-dimensional vehicle bounding box; (6) Use the homography matrix , 3D vehicle bounding box and virtual detection area to calculate vehicle speed. The invention has high calculation precision and low equipment cost, and can be effectively applied to intelligent traffic systems.

Description

基于三维车辆边界框的车辆长度及速度计算方法Calculation method of vehicle length and speed based on 3D vehicle bounding box

技术领域technical field

本发明涉及一种基于三维车辆边界框的车辆长度及速度计算方法,属于计算机视觉技术及智慧交通领域。The invention relates to a method for calculating vehicle length and speed based on a three-dimensional vehicle bounding box, and belongs to the fields of computer vision technology and intelligent transportation.

背景技术Background technique

车辆长度及速度是交通车辆信息中重要的参数。车辆速度通常通过埋入路面下的传感器或通过在道路上布置雷达来获得。然而采用这种方式设备造价较高,且当车辆之间距离很近时,会带来较大检测误差甚至导致检测失败。视频技术作为一种低成本的检测技术,目前被广泛研究,但其检测精度仍不理想。而车辆长度是作为车型分类的重要指标,其有效且低成本的计算方法目前仍较欠缺。如何有效、高精度且低成本地实现车辆长度及速度的计算是当前交通领域面临的难题。Vehicle length and speed are important parameters in traffic vehicle information. Vehicle speed is usually obtained by sensors buried under the road surface or by placing radar on the road. However, the cost of equipment in this way is high, and when the distance between the vehicles is very close, it will bring a large detection error or even lead to detection failure. As a low-cost detection technology, video technology has been widely studied, but its detection accuracy is still not ideal. Vehicle length is an important indicator for vehicle classification, and its effective and low-cost calculation methods are still lacking. How to realize the calculation of vehicle length and speed effectively, with high precision and at low cost is a difficult problem in the current traffic field.

发明内容Contents of the invention

为了解决上述存在的问题,本发明公开了一种基于三维车辆边界框的车辆长度及速度计算方法,计算精度高且设备成本低。In order to solve the above existing problems, the present invention discloses a vehicle length and speed calculation method based on a three-dimensional vehicle bounding box, which has high calculation accuracy and low equipment cost.

上述的目的通过以下技术方案实现:The above-mentioned purpose is achieved through the following technical solutions:

一种基于三维车辆边界框的车辆长度及速度计算方法,该方法包括:A method for calculating vehicle length and speed based on a three-dimensional vehicle bounding box, the method comprising:

(1)基于Mask R-CNN网络生成车辆掩膜;(1) Generate a vehicle mask based on the Mask R-CNN network;

(2)由场景中三个消失点向生成的车辆掩膜作切线进而构建三维车辆边界框;(2) Make a tangent from the three vanishing points in the scene to the generated vehicle mask to construct a 3D vehicle bounding box;

(3)建立车辆虚拟检测区,并根据三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内;(3) Establish a vehicle virtual detection area, and judge whether the vehicle is in the detection area according to whether the bottom front midpoint of the three-dimensional vehicle bounding box is in the detection area;

(4)对路面标定,获得道路平面世界坐标与对应像素坐标之间的单应矩阵;(4) To calibrate the road surface, obtain the homography matrix between the world coordinates of the road plane and the corresponding pixel coordinates;

(5)利用单应矩阵及三维车辆边界框计算车辆的实际长度;(5) Calculate the actual length of the vehicle using the homography matrix and the three-dimensional vehicle bounding box;

(6)利用单应矩阵、三维车辆边界框及虚拟检测区来计算车辆速度。(6) Using the homography matrix, the 3D vehicle bounding box and the virtual detection area to calculate the vehicle speed.

所述的基于三维车辆边界框的车辆长度及速度计算方法,(2)中所述的构建三维车辆边界框,具体是根据交通场景中的车道线、车辆纹理、路灯位置分别确定场景第一、第二及第三正交消失点,并基于这三个正交消失点向由Mask R-CNN生成的车辆掩膜作切线构建三维车辆边界框。The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box, and the construction of the three-dimensional vehicle bounding box described in (2), specifically determine the scene first, vehicle texture, and street light positions according to the traffic scene in the traffic scene. The second and third orthogonal vanishing points, and based on these three orthogonal vanishing points, make a tangent to the vehicle mask generated by Mask R-CNN to construct a 3D vehicle bounding box.

所述的基于三维车辆边界框的车辆长度及速度计算方法,(3)中所述的建立车辆虚拟检测区是在镜头视野范围内建立车辆虚拟检测区,并根据三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内。According to the vehicle length and speed calculation method based on the three-dimensional vehicle bounding box, the establishment of the vehicle virtual detection area described in (3) is to establish the vehicle virtual detection area within the lens field of view, and according to the bottom front edge of the three-dimensional vehicle bounding box Whether the point is in the detection area to judge whether the vehicle is in the detection area.

所述的基于三维车辆边界框的车辆长度及速度计算方法,(4)中所述的路面标定进而获得道路平面世界坐标与对应像素坐标之间的单应矩阵H,The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box, the road surface calibration described in (4) and then obtain the homography matrix H between the world coordinates of the road plane and the corresponding pixel coordinates,

具体首先确定车道虚线段端点的像素坐标,再根据车道虚线段端点及场景第二消失点建立直线,然后获取这些直线与车道两侧实线交点的像素坐标;将上述这些已知像素坐标的点当作路面标定参考点;利用已知的车道虚线段实际长度与车道宽度,即可以获得这些参考点的世界坐标;将参考点的像素坐标及世界坐标带入式(2),通过利用最小二乘法或奇异值分解即可求得单应矩阵中八个独立参数,从而为基于三维车辆边界框的车辆长度及速度的计算提供基础。Specifically, first determine the pixel coordinates of the endpoints of the dotted line segment of the lane, and then establish a straight line according to the end point of the dotted line segment of the lane and the second vanishing point of the scene, and then obtain the pixel coordinates of the intersection points of these straight lines and the solid lines on both sides of the lane; As the reference point for pavement calibration; the world coordinates of these reference points can be obtained by using the known actual length of the dotted line segment of the lane and the width of the lane; the pixel coordinates and world coordinates of the reference point are brought into formula (2), and by using the least squares Eight independent parameters in the homography matrix can be obtained by multiplication or singular value decomposition, thus providing the basis for the calculation of vehicle length and speed based on the three-dimensional vehicle bounding box.

式中(xi,yi)和(Xi,Yi)分别代表参考点i的世界坐标与像素坐标,m为单应矩阵H中的独立参数。where ( xi ,y i ) and (X i ,Y i ) represent the world coordinates and pixel coordinates of the reference point i respectively, and m is an independent parameter in the homography matrix H.

所述的基于三维车辆边界框的车辆长度及速度计算方法,(5)中所述的车辆长度计算中,根据路面标定得到的单应矩阵计算三维车辆边界框底面前后两边的中点世界坐标,该两点世界坐标的差值即为车辆的实际长度。In the vehicle length and speed calculation method based on the three-dimensional vehicle bounding box, in the vehicle length calculation described in (5), the world coordinates of the midpoint of the three-dimensional vehicle bounding box bottom front and rear sides are calculated according to the homography matrix obtained by road surface calibration, The difference between the two world coordinates is the actual length of the vehicle.

所述的基于三维车辆边界框的车辆长度及速度计算方法,(6)中所述的车辆速度计算中,利用车辆在虚拟检测区中行驶的距离与时间来计算车辆速度,其中行驶距离根据车辆在进入及离开检测区时所对应的三维车辆边界框底面前边中点间的世界坐标差来计算,而行驶时间则根据视频帧率来确定,车速计算公式如下:In the vehicle length and speed calculation method based on the three-dimensional vehicle bounding box, in the vehicle speed calculation described in (6), the vehicle speed is calculated by using the distance and time the vehicle travels in the virtual detection area, wherein the travel distance is calculated according to the vehicle speed. When entering and leaving the detection area, the corresponding world coordinate difference between the bottom and front midpoints of the three-dimensional vehicle bounding box is calculated, and the driving time is determined according to the video frame rate. The formula for calculating the vehicle speed is as follows:

式中:V为车速,L及T分别是车辆在虚拟检测区内的行驶距离与时间,Nf是车辆在检测区内行驶过程中所对应的总帧数,Fr是视频的帧率,分别是车辆进入与离开检测区所对应的三维边界框的底面前边中点世界坐标。In the formula: V is the speed of the vehicle, L and T are the driving distance and time of the vehicle in the virtual detection area respectively, N f is the total number of frames corresponding to the vehicle driving in the detection area, F r is the frame rate of the video, and They are the world coordinates of the midpoint of the bottom front of the three-dimensional bounding box corresponding to the vehicle entering and leaving the detection area.

与现有技术相比,本发明的有益效果在于:Compared with prior art, the beneficial effect of the present invention is:

(1)本发明提出的道路平面标定方法较利用三个正交消失点及镜头高度的计算方法精度更高。(1) The road plane calibration method proposed by the present invention has higher accuracy than the calculation method using three orthogonal vanishing points and lens height.

(2)本发明与传统基于埋入式传感器或雷达的测速方案相比,所需设备成本大幅降低。(2) Compared with the traditional speed measurement scheme based on embedded sensors or radars, the required equipment cost of the present invention is greatly reduced.

(3)本发明提出了基于单目相机的车辆长度计算方法,为交通车辆分类提供了新的方式。(3) The present invention proposes a vehicle length calculation method based on a monocular camera, which provides a new way for traffic vehicle classification.

附图说明Description of drawings

图1是三维车辆边界框的构建;Figure 1 is the construction of the 3D vehicle bounding box;

图2是路面标定参考点位置及验证目标;Figure 2 is the location of reference points for pavement calibration and verification targets;

图3是车长计算示意图;Figure 3 is a schematic diagram of vehicle length calculation;

图4是车速计算示意图。Figure 4 is a schematic diagram of vehicle speed calculation.

具体实施方式Detailed ways

下面结合具体实施方式对本发明作更进一步的说明。The present invention will be further described below in combination with specific embodiments.

以某桥面交通场景为例,对镜头中通过车辆的长度及速度进行检测。具体包含如下内容:Taking a traffic scene on a bridge deck as an example, the length and speed of passing vehicles in the camera are detected. Specifically include the following:

1.根据交通场景中的车道线、车辆纹理、路灯位置分别确定场景第一、第二及第三消失点,根据最小二乘法来确定场景中同一方向不同直线的交点即消失点。并基于这三个正交消失点向由Mask R-CNN生成的车辆掩膜作切线进而构建三维车辆边界框,如图1所示,首先根据切线间交点可直接确定三维边界框的1,2,3,4角点,然后利用这四个角点可以确定三维边界框另外四个角点5,6,7,8。八个角点全部确定后即可构建出三维车辆边界框。1. Determine the first, second, and third vanishing points of the scene according to the lane line, vehicle texture, and street light position in the traffic scene, and determine the intersection point of different straight lines in the same direction in the scene, that is, the vanishing point, according to the least square method. And based on these three orthogonal vanishing points, make tangents to the vehicle mask generated by Mask R-CNN to construct a 3D vehicle bounding box, as shown in Figure 1, firstly, the 1,2 of the 3D bounding box can be directly determined according to the intersection points between tangents ,3,4 corner points, and then use these four corner points to determine the other four corner points 5,6,7,8 of the 3D bounding box. After all the eight corner points are determined, the 3D vehicle bounding box can be constructed.

2.为了计算车速,在镜头视野范围内建立车辆虚拟检测区,并利用三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内。2. In order to calculate the vehicle speed, a vehicle virtual detection area is established within the field of view of the lens, and whether the midpoint of the bottom face of the 3D vehicle bounding box is within the detection area is used to determine whether the vehicle is in the detection area.

3.因为式(1)中单应矩阵有8个独立的未知参数,因此需要至少4个不在一条直线上的参考点来求解单应矩阵H。首先确定车道虚线段端点的像素坐标,再根据车道虚线段端点及第二消失点建立直线,然后获取这些直线与车道两侧实线交点的像素坐标。将这些已知像素坐标的点当作标定参考点,如图2所示。利用已知的车道虚线段实际长度与车道宽度,可以获得这些参考点的世界坐标。将参考点的像素坐标及世界坐标带入式(2),通过最小二乘法或奇异值分解即可求得单应矩阵H。为了验证本发明所提标定方法的可靠性,15段已知长度的车道虚线段被当作验证目标来检验本发明的标定结果,验证目标如图2中所示。根据三个正交消失点及相机高度计算得出的验证目标长度及根据本专利方法计算得到的验证目标长度均列在表1中。从表中可以看出本专利提出方法的计算误差都小于5%,大幅超过传统方法。3. Because the homography matrix in formula (1) has 8 independent unknown parameters, at least 4 reference points that are not on a straight line are needed to solve the homography matrix H. First determine the pixel coordinates of the endpoints of the dashed lane segments, then establish straight lines based on the endpoints of the dashed lane segments and the second vanishing point, and then obtain the pixel coordinates of the intersections of these straight lines with the solid lines on both sides of the lane. These points with known pixel coordinates are taken as calibration reference points, as shown in Figure 2. The world coordinates of these reference points can be obtained by using the known actual length of the dashed lane segment and the width of the lane. Bring the pixel coordinates and world coordinates of the reference point into formula (2), and the homography matrix H can be obtained by the least square method or singular value decomposition. In order to verify the reliability of the calibration method proposed in the present invention, 15 lane dotted line segments with known lengths are used as verification targets to verify the calibration results of the present invention, and the verification targets are shown in FIG. 2 . The length of the verification target calculated according to the three orthogonal vanishing points and the height of the camera and the length of the verification target calculated according to the method of this patent are listed in Table 1. It can be seen from the table that the calculation errors of the methods proposed in this patent are all less than 5%, greatly exceeding the traditional methods.

4.将获得的单应矩阵求逆得H-1,然后根据三维车辆边界框底面前后两边的中点像素坐标的齐次形式乘以H-1得到相应的齐次世界坐标,再将齐次世界坐标用第三个分量进行归一化得到对应的二维世界坐标,车辆边界框底面前后两边的中点二维世界坐标的距离即为车辆的实际长度,车长计算示意图如图3所示。4. Invert the obtained homography matrix to obtain H -1 , and then multiply the homogeneous form of the pixel coordinates of the midpoint on both sides of the front and rear sides of the 3D vehicle bounding box by H -1 to obtain the corresponding homogeneous world coordinates, and then divide the homogeneous The world coordinates are normalized by the third component to obtain the corresponding two-dimensional world coordinates. The distance between the two-dimensional world coordinates of the midpoints of the front and rear sides of the bottom of the vehicle bounding box is the actual length of the vehicle. The schematic diagram of the calculation of the vehicle length is shown in Figure 3 .

5.利用车辆在虚拟检测区中行驶的距离与时间来计算车辆速度,如图4所示,其中行驶距离利用车辆在进入及离开检测区时所对应的三维车辆边界框底面前边中点间的世界坐标差来计算,而行驶时间则根据视频帧率来确定,车速按公式(3)计算如下:5. Use the distance and time the vehicle travels in the virtual detection area to calculate the vehicle speed, as shown in Figure 4, where the travel distance is the distance between the midpoints of the bottom front and the front edge of the three-dimensional vehicle bounding box corresponding to the vehicle entering and leaving the detection area The world coordinate difference is calculated, while the driving time is determined according to the video frame rate, and the vehicle speed is calculated according to formula (3) as follows:

综上,根据本发明提出的基于三维车辆边界框的车辆长度及速度计算方法可有效应用于智慧交通系统当中。In conclusion, the vehicle length and speed calculation method based on the three-dimensional vehicle bounding box proposed by the present invention can be effectively applied in intelligent transportation systems.

表1路面上验证目标长度计算结果Table 1 Calculation results of verification target length on the road

Claims (6)

1.一种基于三维车辆边界框的车辆长度及速度计算方法,其特征在于该方法包括:1. A vehicle length and speed calculation method based on a three-dimensional vehicle bounding box, characterized in that the method comprises: (1)基于Mask R-CNN网络生成车辆掩膜;(1) Generate a vehicle mask based on the Mask R-CNN network; (2)由场景中三个消失点向生成的车辆掩膜作切线进而构建三维车辆边界框;(2) Make a tangent from the three vanishing points in the scene to the generated vehicle mask to construct a 3D vehicle bounding box; (3)建立车辆虚拟检测区,并根据三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内;(3) Establish a vehicle virtual detection area, and judge whether the vehicle is in the detection area according to whether the bottom front midpoint of the three-dimensional vehicle bounding box is in the detection area; (4)对路面标定,获得道路平面世界坐标与对应像素坐标之间的单应矩阵;(4) To calibrate the road surface, obtain the homography matrix between the world coordinates of the road plane and the corresponding pixel coordinates; (5)利用单应矩阵及三维车辆边界框计算车辆的实际长度;(5) Calculate the actual length of the vehicle using the homography matrix and the three-dimensional vehicle bounding box; (6)利用单应矩阵、三维车辆边界框及虚拟检测区来计算车辆速度。(6) Using the homography matrix, the 3D vehicle bounding box and the virtual detection area to calculate the vehicle speed. 2.根据权利要求1所述的基于三维车辆边界框的车辆长度及速度计算方法,其特征在于:(2)中所述的构建三维车辆边界框,具体是根据交通场景中的车道线、车辆纹理、路灯位置分别确定场景第一、第二及第三正交消失点,并基于这三个正交消失点向由Mask R-CNN生成的车辆掩膜作切线构建三维车辆边界框。2. The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box according to claim 1, characterized in that: the construction of the three-dimensional vehicle bounding box described in (2) is specifically based on the lane lines in the traffic scene, the vehicle The first, second, and third orthogonal vanishing points of the scene are respectively determined by the texture and the position of the street lamp, and based on these three orthogonal vanishing points, a tangent to the vehicle mask generated by Mask R-CNN is used to construct a 3D vehicle bounding box. 3.根据权利要求1所述的基于三维车辆边界框的车辆长度及速度计算方法,其特征在于:(3)中所述的建立车辆虚拟检测区是在镜头视野范围内建立车辆虚拟检测区,并根据三维车辆边界框的底面前边中点是否在检测区内来判断车辆是否在检测区内。3. The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box according to claim 1, characterized in that: the establishment of a vehicle virtual detection area described in (3) is to establish a vehicle virtual detection area within the lens field of view, And judge whether the vehicle is in the detection area according to whether the midpoint of the bottom front edge of the three-dimensional vehicle bounding box is in the detection area. 4.根据权利要求1所述的基于三维车辆边界框的车辆长度及速度计算方法,其特征在于:(4)中所述的路面标定进而获得道路平面世界坐标与对应像素坐标之间的单应矩阵H,4. The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box according to claim 1, characterized in that: the road surface calibration described in (4) further obtains the homography between the road plane world coordinates and the corresponding pixel coordinates matrix H, 首先确定车道虚线段端点的像素坐标,再根据车道虚线段端点及场景第二消失点建立直线,然后获取这些直线与车道两侧实线交点的像素坐标;将上述这些已知像素坐标的点当作路面标定参考点;利用已知的车道虚线段实际长度与车道宽度,即可以获得这些参考点的世界坐标;将参考点的像素坐标及世界坐标带入式(2),通过利用最小二乘法或奇异值分解即可求得单应矩阵中八个独立参数,从而为基于三维车辆边界框的车辆长度及速度的计算提供基础;First determine the pixel coordinates of the endpoints of the dotted line segment of the lane, then establish straight lines according to the end points of the dotted line segment of the lane and the second vanishing point of the scene, and then obtain the pixel coordinates of the intersection points of these straight lines and the solid lines on both sides of the lane; use the above-mentioned points with known pixel coordinates as Use the known actual length of the dotted line segment of the lane and the width of the lane to obtain the world coordinates of these reference points; bring the pixel coordinates and world coordinates of the reference points into formula (2), and use the least squares method Or singular value decomposition can obtain eight independent parameters in the homography matrix, thus providing a basis for the calculation of vehicle length and speed based on the three-dimensional vehicle bounding box; 式中(xi,yi)和(Xi,Yi)分别代表参考点i的世界坐标与像素坐标,m为单应矩阵H中的独立参数。where ( xi ,y i ) and (X i ,Y i ) represent the world coordinates and pixel coordinates of the reference point i respectively, and m is an independent parameter in the homography matrix H. 5.根据权利要求1所述的基于三维车辆边界框的车辆长度及速度计算方法,其特征在于:(5)中所述的车辆长度计算中,根据路面标定得到的单应矩阵计算三维车辆边界框底面前后两边的中点世界坐标,该两点世界坐标的差值即为车辆的实际长度。5. The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box according to claim 1, characterized in that: in the vehicle length calculation described in (5), the three-dimensional vehicle boundary is calculated according to the homography matrix obtained by road surface calibration The world coordinates of the midpoint of the front and rear sides of the bottom of the frame, and the difference between the two world coordinates is the actual length of the vehicle. 6.根据权利要求1所述的基于三维车辆边界框的车辆长度及速度计算方法,其特征在于:(6)中所述的车辆速度计算中,利用车辆在虚拟检测区中行驶的距离与时间来计算车辆速度,其中行驶距离根据车辆在进入及离开检测区时所对应的三维车辆边界框底面前边中点间的世界坐标差来计算,而行驶时间则根据视频帧率来确定,车速计算公式如下:6. The vehicle length and speed calculation method based on the three-dimensional vehicle bounding box according to claim 1, characterized in that: in the vehicle speed calculation described in (6), the distance and time traveled by the vehicle in the virtual detection zone are utilized To calculate the vehicle speed, the driving distance is calculated according to the world coordinate difference between the midpoint of the bottom front and the front side of the three-dimensional vehicle bounding box corresponding to the vehicle entering and leaving the detection area, and the driving time is determined according to the video frame rate. The vehicle speed calculation formula as follows: 式中:V为车速,L及T分别是车辆在虚拟检测区内的行驶距离与时间,Nf是车辆在检测区内行驶过程中所对应的总帧数,Fr是视频的帧率,分别是车辆进入与离开检测区所对应的三维边界框的底面前边中点世界坐标。In the formula: V is the speed of the vehicle, L and T are the driving distance and time of the vehicle in the virtual detection area respectively, N f is the total number of frames corresponding to the vehicle driving in the detection area, F r is the frame rate of the video, and They are the world coordinates of the midpoint of the bottom front of the three-dimensional bounding box corresponding to the vehicle entering and leaving the detection area.
CN201910509507.2A 2019-06-13 2019-06-13 Calculation method of vehicle length and speed based on 3D vehicle bounding box Active CN110307791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910509507.2A CN110307791B (en) 2019-06-13 2019-06-13 Calculation method of vehicle length and speed based on 3D vehicle bounding box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910509507.2A CN110307791B (en) 2019-06-13 2019-06-13 Calculation method of vehicle length and speed based on 3D vehicle bounding box

Publications (2)

Publication Number Publication Date
CN110307791A true CN110307791A (en) 2019-10-08
CN110307791B CN110307791B (en) 2020-12-29

Family

ID=68076628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910509507.2A Active CN110307791B (en) 2019-06-13 2019-06-13 Calculation method of vehicle length and speed based on 3D vehicle bounding box

Country Status (1)

Country Link
CN (1) CN110307791B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909620A (en) * 2019-10-30 2020-03-24 北京迈格威科技有限公司 Vehicle detection method and device, electronic equipment and storage medium
CN112489106A (en) * 2020-12-08 2021-03-12 深圳市哈工交通电子有限公司 Video-based vehicle size measuring method and device, terminal and storage medium
CN112798811A (en) * 2020-12-30 2021-05-14 杭州海康威视数字技术股份有限公司 Speed measurement method, device and equipment
CN113011388A (en) * 2021-04-23 2021-06-22 吉林大学 Vehicle outer contour size detection method based on license plate and lane line
CN113689713A (en) * 2020-05-19 2021-11-23 昆山研达电脑科技有限公司 Vehicle speed monitoring method based on automobile data recorder
WO2021237750A1 (en) * 2020-05-29 2021-12-02 Siemens Ltd., China Method and apparatus for vehicle length estimation
CN114419547A (en) * 2021-12-30 2022-04-29 山东奥邦交通设施工程有限公司 Vehicle detection method and system based on monocular vision and deep learning
CN114863025A (en) * 2022-05-18 2022-08-05 禾多科技(北京)有限公司 Three-dimensional lane line generation method and device, electronic device and computer readable medium
CN115019557A (en) * 2022-06-09 2022-09-06 杭州电子科技大学 TUIO protocol-based lane virtual boundary construction and boundary crossing detection method

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010214258A (en) * 2009-03-13 2010-09-30 Toyota Motor Corp Masking jig
CN102410836A (en) * 2011-07-26 2012-04-11 清华大学 Space six-freedom degrees article locating system based on two-dimensional sensitive sensor
US20130128064A1 (en) * 2011-04-08 2013-05-23 Hailin Jin Methods and Apparatus for Robust Video Stabilization
CN104200483A (en) * 2014-06-16 2014-12-10 南京邮电大学 Human body central line based target detection method under multi-camera environment
CN105573047A (en) * 2014-10-10 2016-05-11 中芯国际集成电路制造(上海)有限公司 System and method for detecting mask figure fidelity
CN105718870A (en) * 2016-01-15 2016-06-29 武汉光庭科技有限公司 Road marking line extracting method based on forward camera head in automatic driving
CN106408589A (en) * 2016-07-14 2017-02-15 浙江零跑科技有限公司 Vehicle-mounted overlooking camera based vehicle movement measurement method
CN107122792A (en) * 2017-03-15 2017-09-01 山东大学 Indoor arrangement method of estimation and system based on study prediction
US10055853B1 (en) * 2017-08-07 2018-08-21 Standard Cognition, Corp Subject identification and tracking using image recognition
CN108550143A (en) * 2018-04-03 2018-09-18 长安大学 A kind of measurement method of the vehicle length, width and height size based on RGB-D cameras
CN108759667A (en) * 2018-05-29 2018-11-06 福州大学 Front truck distance measuring method based on monocular vision and image segmentation under vehicle-mounted camera
US20190103026A1 (en) * 2017-09-29 2019-04-04 Uber Technologies, Inc. Image Processing for Vehicle Collision Avoidance System
WO2019097456A1 (en) * 2017-11-17 2019-05-23 C 3 Limited Object measurement system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010214258A (en) * 2009-03-13 2010-09-30 Toyota Motor Corp Masking jig
US20130128064A1 (en) * 2011-04-08 2013-05-23 Hailin Jin Methods and Apparatus for Robust Video Stabilization
CN102410836A (en) * 2011-07-26 2012-04-11 清华大学 Space six-freedom degrees article locating system based on two-dimensional sensitive sensor
CN104200483A (en) * 2014-06-16 2014-12-10 南京邮电大学 Human body central line based target detection method under multi-camera environment
CN105573047A (en) * 2014-10-10 2016-05-11 中芯国际集成电路制造(上海)有限公司 System and method for detecting mask figure fidelity
CN105718870A (en) * 2016-01-15 2016-06-29 武汉光庭科技有限公司 Road marking line extracting method based on forward camera head in automatic driving
CN106408589A (en) * 2016-07-14 2017-02-15 浙江零跑科技有限公司 Vehicle-mounted overlooking camera based vehicle movement measurement method
CN107122792A (en) * 2017-03-15 2017-09-01 山东大学 Indoor arrangement method of estimation and system based on study prediction
US10055853B1 (en) * 2017-08-07 2018-08-21 Standard Cognition, Corp Subject identification and tracking using image recognition
US20190103026A1 (en) * 2017-09-29 2019-04-04 Uber Technologies, Inc. Image Processing for Vehicle Collision Avoidance System
WO2019097456A1 (en) * 2017-11-17 2019-05-23 C 3 Limited Object measurement system
CN108550143A (en) * 2018-04-03 2018-09-18 长安大学 A kind of measurement method of the vehicle length, width and height size based on RGB-D cameras
CN108759667A (en) * 2018-05-29 2018-11-06 福州大学 Front truck distance measuring method based on monocular vision and image segmentation under vehicle-mounted camera

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BENJAMIN COIFMAN等: "Speed estimation and length based vehicle classification from freeway single-loop detectors", 《TRANSPORTATION RESEARCH PART C》 *
张利平等: "基于光流旳运动车辆检测和跟踪技术的研究", 《车辆与动力技术》 *
赵俊梅等: "交通视频中运动车辆检测和跟踪技术的研究", 《车辆与动力技术》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909620A (en) * 2019-10-30 2020-03-24 北京迈格威科技有限公司 Vehicle detection method and device, electronic equipment and storage medium
CN113689713A (en) * 2020-05-19 2021-11-23 昆山研达电脑科技有限公司 Vehicle speed monitoring method based on automobile data recorder
CN115668297A (en) * 2020-05-29 2023-01-31 西门子(中国)有限公司 Method and apparatus for vehicle length estimation
WO2021237750A1 (en) * 2020-05-29 2021-12-02 Siemens Ltd., China Method and apparatus for vehicle length estimation
CN112489106A (en) * 2020-12-08 2021-03-12 深圳市哈工交通电子有限公司 Video-based vehicle size measuring method and device, terminal and storage medium
CN112798811A (en) * 2020-12-30 2021-05-14 杭州海康威视数字技术股份有限公司 Speed measurement method, device and equipment
CN113011388A (en) * 2021-04-23 2021-06-22 吉林大学 Vehicle outer contour size detection method based on license plate and lane line
CN113011388B (en) * 2021-04-23 2022-05-06 吉林大学 A detection method of vehicle outer contour size based on license plate and lane line
CN114419547A (en) * 2021-12-30 2022-04-29 山东奥邦交通设施工程有限公司 Vehicle detection method and system based on monocular vision and deep learning
CN114863025A (en) * 2022-05-18 2022-08-05 禾多科技(北京)有限公司 Three-dimensional lane line generation method and device, electronic device and computer readable medium
CN114863025B (en) * 2022-05-18 2023-03-10 禾多科技(北京)有限公司 Three-dimensional lane line generation method, device, electronic device and computer readable medium
CN115019557A (en) * 2022-06-09 2022-09-06 杭州电子科技大学 TUIO protocol-based lane virtual boundary construction and boundary crossing detection method
CN115019557B (en) * 2022-06-09 2024-05-14 杭州电子科技大学 Lane virtual boundary construction and boundary crossing detection method based on TUIO protocol

Also Published As

Publication number Publication date
CN110307791B (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN110307791B (en) Calculation method of vehicle length and speed based on 3D vehicle bounding box
CN103760569B (en) A kind of drivable region detection method based on laser radar
CN110031829B (en) An accurate ranging method for targets based on monocular vision
CN107705331A (en) A kind of automobile video frequency speed-measuring method based on multiple views video camera
CN110349221A (en) A kind of three-dimensional laser radar merges scaling method with binocular visible light sensor
CN103065323B (en) Subsection space aligning method based on homography transformational matrix
CN106228110A (en) A kind of barrier based on vehicle-mounted binocular camera and drivable region detection method
CN107284455B (en) An ADAS system based on image processing
CN107590438A (en) A kind of intelligent auxiliary driving method and system
CN107577996A (en) A method and system for identifying vehicle driving path deviation
CN107133985A (en) A kind of vehicle-mounted vidicon automatic calibration method for the point that disappeared based on lane line
CN103487034A (en) Method for measuring distance and height by vehicle-mounted monocular camera based on vertical type target
CN107705563B (en) Continuous vehicle speed detection method based on lidar
CN105203034A (en) Height and area measurement method based on monocular camera three-dimensional distance measurement model
CN106156723A (en) A kind of crossing fine positioning method of view-based access control model
CN106651953A (en) Vehicle position and gesture estimation method based on traffic sign
CN114758504B (en) Online vehicle overspeed early warning method and system based on filtering correction
CN102592454A (en) Intersection vehicle movement parameter measuring method based on detection of vehicle side face and road intersection line
WO2014129064A1 (en) Obstacle detection device and obstacle detection method
CN104729485A (en) Visual positioning method based on vehicle-mounted panorama image and streetscape matching
WO2020156923A2 (en) Map and method for creating a map
CN112489106A (en) Video-based vehicle size measuring method and device, terminal and storage medium
Hayakawa et al. Ego-motion and surrounding vehicle state estimation using a monocular camera
CN115265493B (en) Lane-level positioning method and device based on non-calibrated camera
CN111380503A (en) Monocular camera ranging method adopting laser-assisted calibration

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
GR01 Patent grant
GR01 Patent grant