CN106370884B - Vehicle speed measuring method based on binocular camera computer vision technology - Google Patents

Vehicle speed measuring method based on binocular camera computer vision technology Download PDF

Info

Publication number
CN106370884B
CN106370884B CN201610814089.4A CN201610814089A CN106370884B CN 106370884 B CN106370884 B CN 106370884B CN 201610814089 A CN201610814089 A CN 201610814089A CN 106370884 B CN106370884 B CN 106370884B
Authority
CN
China
Prior art keywords
vehicle
image
running
real
binocular camera
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
CN201610814089.4A
Other languages
Chinese (zh)
Other versions
CN106370884A (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.)
Chengdu Tongjia Youbo Technology Co Ltd
Original Assignee
Chengdu Tongjia Youbo Technology Co Ltd
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 Chengdu Tongjia Youbo Technology Co Ltd filed Critical Chengdu Tongjia Youbo Technology Co Ltd
Priority to CN201610814089.4A priority Critical patent/CN106370884B/en
Publication of CN106370884A publication Critical patent/CN106370884A/en
Application granted granted Critical
Publication of CN106370884B publication Critical patent/CN106370884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/64Devices characterised by the determination of the time taken to traverse a fixed distance
    • G01P3/68Devices characterised by the determination of the time taken to traverse a fixed distance using optical means, i.e. using infrared, visible, or ultraviolet light

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a vehicle speed measurement technology in the field of computer vision, and discloses a vehicle speed measurement method based on a binocular camera computer vision technology, which solves the problem of inaccurate vehicle speed measurement in the traditional technology. The method comprises the following steps: A. acquiring a vehicle running video image by using a binocular camera; B. detecting, tracking and positioning a vehicle target in the video image; C. and acquiring coordinate information of the running vehicle in a real three-dimensional space, and acquiring the real distance which the vehicle runs through, so as to calculate the running speed of the vehicle. The invention is suitable for measuring the speed of the vehicle accurately in real time.

Description

Vehicle speed measuring method based on binocular camera computer vision technology
Technical Field
The invention relates to a vehicle speed measuring technology in the field of computer vision, in particular to a vehicle speed measuring method based on a binocular camera computer vision technology.
Background
The existing vehicle speed measurement is mainly based on laser, radar and image video monitoring methods:
the laser speed measuring system obtains the running speed of the vehicle by measuring the distance of the vehicle for a plurality of times and measuring the time ratio. The method requires that the distance measurement accuracy is highest when the speed measurement system is over against the moving direction of the vehicle, and when the measurement deviation angle exists, the measurement accuracy is reduced along with the increase of the measurement deviation angle, so that the actual speed measurement requirement of the vehicle is difficult to meet.
The radar speed measuring system applies Doppler effect, when the vehicle moves relative to the radar speed measuring system, the radar echo generates Doppler frequency change, and then the vehicle running speed is calculated by utilizing a Doppler frequency and speed formula according to the relation of the included angle between the radar system and the vehicle running direction. When the vehicle tests the speed, the vehicle can not be regarded as a simple point target relative to the radar speed measurement system, so radar echo signals are reflected by all parts of the vehicle, and the Doppler frequency is different, so that the accuracy of the radar speed measurement system is influenced.
The current image video monitoring vehicle speed measurement is mainly based on a monocular camera image processing technology, and the vehicle speed measurement is carried out through the following two modes:
measuring the moving distance of the vehicle in a known time period to obtain the running speed of the vehicle: the method comprises the steps that a standard measurement range is set in a shooting area in advance, for example, the distance between two baselines is calibrated in advance, the time difference between the front and the back of a vehicle passing through the baselines is obtained through camera shooting, and the vehicle running speed is calculated;
measuring the time required for the vehicle to pass a known distance to obtain the running speed of the vehicle: and comparing the coordinate change of the vehicle in the shot image in the known time period with the standard length coordinate in the image to obtain the converted real running distance, and then calculating to obtain the running speed of the vehicle.
When the vehicle running distance is obtained by the two monocular-camera-based vehicle speed measuring methods based on the computer vision technology, the former cannot ensure that the vehicle is captured by the camera at the moment of entering and exiting the base line due to hardware limitation, and the obtained time difference is not the time difference of the distance between the real passing base lines; the latter can ensure the accuracy of the time difference, but because the image shooting has perspective effect, the real distance represented by the long shot and the short shot with the same coordinate difference has larger difference, so the vehicle driving distance obtained by the coordinate change comparison method has larger error.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a vehicle speed measuring method based on a binocular camera computer vision technology is provided, and the problem of inaccurate vehicle speed measurement in the traditional technology is solved.
The scheme adopted by the invention for solving the technical problems is as follows:
a vehicle speed measuring method based on a binocular camera computer vision technology comprises the following steps:
A. acquiring a vehicle running video image by using a binocular camera;
B. detecting, tracking and positioning a vehicle target in the video image;
C. and acquiring coordinate information of the running vehicle in a real three-dimensional space, and acquiring the real distance which the vehicle runs through, so as to calculate the running speed of the vehicle.
As a further optimization, in step a, before the binocular camera is used to collect the vehicle running video image, the parameters of the binocular camera are calibrated.
In the step B, the vehicle is detected by training weak classifier cascade by adopting an Adaboost method, and vehicle tracking is carried out by adopting a Kernelized Correlation Filters (KCF) algorithm.
As a further optimization, in step C, the method for obtaining the coordinate information of the running vehicle in the real three-dimensional space, obtaining the real distance traveled by the vehicle, and calculating the speed traveled by the vehicle includes:
firstly, stereo matching is carried out on a left image and a right image collected at the same moment to obtain a disparity map, wherein the disparity D of a corresponding pixel point P in the disparity map is the corresponding abscissa X of an imaging point of the corresponding pixel point P on a left image plane and an imaging point of the corresponding pixel point P on a right image plane respectivelyleft、XrightThe difference of (a):
D=Xleft-Xright (1)
the base line distance B is the distance between the connecting lines of the projection centers of the two cameras, the focal length of the cameras is represented by f, and the triangular geometric relationship is obtained according to the triangulation principle:
calculating to obtain a three-dimensional coordinate value (x, y, z) of the pixel point P:
the geometric center of the running vehicle in the vehicle image taken at the previous moment is taken as the coordinate position of the vehicle in the plane image,
obtaining the real three-dimensional coordinates (x) of the vehicle at the previous moment through the formulas (1), (2) and (3)0,y0,z0);
The geometric center of the running vehicle in the vehicle image shot at the later moment is used as the coordinate position of the vehicle in the plane image, and the real three-dimensional coordinates (x) of the vehicle at the later moment are obtained by calculation through the formulas (1), (2) and (3)1,y1,z1)
Then, the real driving distance between the front and rear time of the vehicle is calculated and obtained:
finally according to the time point t of the previous moment0Time t of the next moment1Calculating the running speed of the vehicle:
the invention has the beneficial effects that:
according to the invention, the coordinate information of the running vehicle in the real three-dimensional space is acquired through the binocular camera, the real running distance of the running vehicle in the camera acquisition process can be calculated, and the distance is directly calculated according to the coordinates, so that the method is faster and more accurate, and the real-time performance and accuracy of vehicle speed measurement are effectively improved.
Drawings
FIG. 1 is a simplified flow chart of a vehicle speed measuring method based on a binocular camera computer vision technology;
fig. 2 is a schematic diagram of triangulation by a binocular camera.
Detailed Description
The binocular camera is the embodiment of human binocular function extension, and the human can also perceive the three-dimensional depth of an external object through eyes on the basis of acquiring an external image. And the binocular camera collects the external images at the same time, and three-dimensional coordinate information of the external object can be obtained through the processing of a computer vision algorithm. In order to solve the problem that the distance error calculated by a monocular camera coordinate change comparison mode is large, the invention acquires the three-dimensional coordinate information of an object by a binocular camera, calculates the driving distance by a geometric method, and greatly reduces the influence caused by time difference by freely selecting a time point and calculating the time difference.
As shown in fig. 1, the vehicle speed measuring method based on the binocular camera computer vision technology in the present invention includes the following steps:
1) video acquisition:
before the step, the binocular camera needs to be installed beside a road (such as a street lamp), and in order to ensure the accuracy of measurement, the parameters of the binocular camera are calibrated; when the binocular video camera is used, a binocular camera is used for collecting vehicle running video images, video sequence images are obtained and are transmitted into a vehicle detection and tracking module.
2) Vehicle detection and tracking:
the vehicle detection and tracking module detects, tracks and positions a vehicle target in the video image;
vehicle detection and tracking is the basis for achieving binocular ranging. Firstly, a vehicle in a scene needs to be detected, and the vehicle can be positioned only under the condition that a vehicle target is detected; the detected vehicle is then tracked, and the tracked coordinates are used to calculate the distance traveled by the vehicle during the tracked time period. The method adopts a classic Adaboost method to detect the vehicle in a mode of training weak classifier cascade, and then adopts Kernelized Correlation Filters (KCF) algorithm to track the vehicle.
Since the vehicle detection and tracking algorithms employed in the present invention are conventional algorithms in the art, detailed description of specific implementations thereof is omitted here.
3) Binocular measurement and calculation:
in this step, coordinate information of the running vehicle in a real three-dimensional space is obtained through a binocular matching and parallax calculation method, and a real distance that the vehicle runs through is obtained, so that the running speed of the vehicle is calculated, and the specific means is as follows:
first, stereo matching is performed on left and right images acquired at the same time to obtain a disparity map, as shown in fig. 2, the disparity D of a corresponding pixel point P in the disparity map is the abscissa X corresponding to the imaging point of the corresponding pixel point P on the left and right image planes respectivelyleft、XrightThe difference of (a):
D=Xleft-Xright (1)
the base line distance B is the distance between the connecting lines of the projection centers of the two cameras, the focal length of the cameras is represented by f, and the triangular geometric relationship is obtained according to the triangulation principle:
calculating to obtain a three-dimensional coordinate value (x, y, z) of the pixel point P:
the geometric center of the running vehicle in the vehicle image shot at the previous moment is taken as the coordinate position of the vehicle in the plane image, the coordinate position is taken as the pixel point P, and the real three-dimensional coordinate (x) of the vehicle at the previous moment is obtained through the formulas (1), (2) and (3)0,y0,z0);
The geometric center of the running vehicle in the vehicle image shot at the later moment is taken as the coordinate position of the vehicle in the plane image, the coordinate position is taken as the pixel point P, and the real three-dimensional coordinate (x) of the vehicle at the later moment is obtained by calculation through the formulas (1), (2) and (3)1,y1,z1);
Then, the real driving distance between the front and rear time of the vehicle is calculated and obtained:
finally according to the time point t of the previous moment0Time t of the next moment1Calculating the running speed of the vehicle:
according to the implementation scheme, the invention can calculate the moving distance of the vehicle in the images with different frame numbers through the three-dimensional coordinate change of the geometric center of the vehicle among the images with different frame numbers, and calculate the running speed of the vehicle according to the corresponding time, thereby calculating the running speed of the vehicle among any time points, and solving the problem that the measurement error is caused because the measurement time difference is the actual time difference passing through the front base line and the rear base line because a monocular camera is adopted for speed measurement in the prior art.

Claims (1)

1. A vehicle speed measuring method based on a binocular camera computer vision technology is characterized by comprising the following steps:
A. calibrating parameters of a binocular camera, and acquiring a vehicle running video image by using the binocular camera to obtain a video sequence image;
B. detecting a vehicle target in a video sequence image in a training weak classifier cascade mode by adopting an Adaboost method, and tracking the vehicle by adopting a Kernelized Correlation Filters algorithm;
C. obtaining coordinate information of a running vehicle in a real three-dimensional space, obtaining a real distance that the vehicle runs through, freely selecting a time point to calculate a time difference, and calculating the running speed of the vehicle:
firstly, stereo matching is carried out on a left image and a right image collected at the same moment to obtain a disparity map, wherein the disparity D of a corresponding pixel point P in the disparity map is the corresponding abscissa X of an imaging point of the corresponding pixel point P on a left image plane and an imaging point of the corresponding pixel point P on a right image plane respectivelyleft、XrightThe difference of (a):
D=Xleft-Xright (1)
the base line distance B is the distance between the connecting lines of the projection centers of the two cameras, the focal length of the cameras is represented by f, and the triangular geometric relationship is obtained according to the triangulation principle:
calculating to obtain a three-dimensional coordinate value (x, y, z) of the pixel point P:
the geometric center of the running vehicle in the vehicle image taken at the previous moment is taken as the coordinate position of the vehicle in the plane image,
obtaining the real three-dimensional coordinates (x) of the vehicle at the previous moment through the formulas (1), (2) and (3)0,y0,z0);
The geometric center of the running vehicle in the vehicle image shot at the later moment is used as the coordinate position of the vehicle in the plane image, and the real three-dimensional coordinates (x) of the vehicle at the later moment are obtained by calculation through the formulas (1), (2) and (3)1,y1,z1)
Then, the real driving distance between the front and rear time of the vehicle is calculated and obtained:
finally according to the time point t of the previous moment0Time t of the next moment1Calculating the running speed of the vehicle:
CN201610814089.4A 2016-09-09 2016-09-09 Vehicle speed measuring method based on binocular camera computer vision technology Active CN106370884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610814089.4A CN106370884B (en) 2016-09-09 2016-09-09 Vehicle speed measuring method based on binocular camera computer vision technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610814089.4A CN106370884B (en) 2016-09-09 2016-09-09 Vehicle speed measuring method based on binocular camera computer vision technology

Publications (2)

Publication Number Publication Date
CN106370884A CN106370884A (en) 2017-02-01
CN106370884B true CN106370884B (en) 2019-12-24

Family

ID=57900254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610814089.4A Active CN106370884B (en) 2016-09-09 2016-09-09 Vehicle speed measuring method based on binocular camera computer vision technology

Country Status (1)

Country Link
CN (1) CN106370884B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106950985B (en) * 2017-03-20 2020-07-03 成都通甲优博科技有限责任公司 Automatic delivery method and device
CN107705331B (en) * 2017-10-30 2020-07-10 中原工学院 Vehicle video speed measurement method based on multi-viewpoint camera
CN108051609A (en) * 2017-12-07 2018-05-18 南京大学 A kind of speed measuring device and method based on single-photon avalanche detector lines array camera
CN109711274A (en) * 2018-12-05 2019-05-03 斑马网络技术有限公司 Vehicle checking method, device, equipment and storage medium
CN110243338B (en) * 2019-07-16 2021-06-11 北京宇航时代科技发展有限公司 Real-time dynamic binocular ranging method and system
CN110824188B (en) * 2019-10-17 2022-10-04 浙江大华技术股份有限公司 Speed measuring method and device for highway vehicles, coder-decoder and storage device
CN111415369B (en) * 2020-03-23 2023-06-13 福州视驰科技有限公司 Target real-time speed measurement method based on road-side monocular camera
US11227402B2 (en) * 2020-05-29 2022-01-18 Icatch Technology, Inc. Velocity measuring device
CN111650392A (en) * 2020-07-03 2020-09-11 东北大学 Metal sheet movement speed detection method based on linear array camera stereoscopic vision
CN112485462B (en) * 2020-11-19 2022-08-16 易思维(杭州)科技有限公司 Train speed measuring system
CN112415217A (en) * 2020-12-24 2021-02-26 中建材信息技术股份有限公司 Vehicle speed measuring method based on video
CN112866673B (en) * 2021-01-12 2022-10-21 北京格灵深瞳信息技术股份有限公司 Image acquisition equipment, camera control method and device and train image acquisition system
CN113504385B (en) * 2021-06-30 2023-07-14 安徽爱观视觉科技有限公司 Speed measuring method and device for plural cameras
CN114066968A (en) * 2021-11-05 2022-02-18 郑州高识智能科技有限公司 Vehicle speed measuring method based on visual image processing
CN114280323A (en) * 2021-12-24 2022-04-05 凌云光技术股份有限公司 Measuring equipment, system and method for vector velocity of railway vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2138055C1 (en) * 1998-06-08 1999-09-20 Военная инженерно-космическая академия им. А.Ф.Можайского Gear measuring speed of vehicle
RU2223504C1 (en) * 2002-05-06 2004-02-10 Федосов Иван Владленович Method measuring velocity of diffusing microobjects
CN101373560A (en) * 2008-10-17 2009-02-25 安徽宏实光机电高科有限公司 Method for measuring position and speed of vehicle on highway based on linear array CCD
CN203365452U (en) * 2013-05-02 2013-12-25 中国计量学院 Vehicle speed detection system based on binocular stereoscopic vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2138055C1 (en) * 1998-06-08 1999-09-20 Военная инженерно-космическая академия им. А.Ф.Можайского Gear measuring speed of vehicle
RU2223504C1 (en) * 2002-05-06 2004-02-10 Федосов Иван Владленович Method measuring velocity of diffusing microobjects
CN101373560A (en) * 2008-10-17 2009-02-25 安徽宏实光机电高科有限公司 Method for measuring position and speed of vehicle on highway based on linear array CCD
CN203365452U (en) * 2013-05-02 2013-12-25 中国计量学院 Vehicle speed detection system based on binocular stereoscopic vision

Also Published As

Publication number Publication date
CN106370884A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106370884B (en) Vehicle speed measuring method based on binocular camera computer vision technology
CN110322702B (en) Intelligent vehicle speed measuring method based on binocular stereo vision system
CN110285793B (en) Intelligent vehicle track measuring method based on binocular stereo vision system
CN111436216B (en) Method and system for color point cloud generation
US10061993B2 (en) Warning method of obstacles and device of obstacles
CN105225482B (en) Vehicle detecting system and method based on binocular stereo vision
CN106375706B (en) method and device for measuring speed of moving object by using double cameras and mobile terminal
EP3792660B1 (en) Method, apparatus and system for measuring distance
US10909395B2 (en) Object detection apparatus
CN109263637B (en) Collision prediction method and device
CN106605154B (en) A kind of monitoring method of moving target, wearable device and server
CN108088414A (en) A kind of monocular distance measuring method
CN105043350A (en) Binocular vision measuring method
JP2009014445A (en) Range finder
CN102806913A (en) Novel lane line deviation detection method and device
CN110220500B (en) Binocular camera-based distance measurement method for unmanned driving
CN110007313A (en) Obstacle detection method and device based on unmanned plane
GB2560110A (en) Detection and documentation of tailgating and speeding violations
KR101709317B1 (en) Method for calculating an object's coordinates in an image using single camera and gps
WO2018179281A1 (en) Object detection device and vehicle
CN111723778B (en) Vehicle distance measuring system and method based on MobileNet-SSD
JPH09226490A (en) Detector for crossing object
CN109407080A (en) Vehicle distance measuring system based on binocular camera and distance measuring method thereof
WO2024114119A1 (en) Sensor fusion method based on binocular camera guidance
CN117058236A (en) Target identification positioning method based on multi-vision system self-switching

Legal Events

Date Code Title Description
C06 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