Search

CN-116977945-B - Vehicle speed measurement method, device, equipment and storage medium based on position estimation

CN116977945BCN 116977945 BCN116977945 BCN 116977945BCN-116977945-B

Abstract

The invention provides a vehicle speed measurement method, device, equipment and storage medium based on position estimation, relating to the technical field of computer vision, wherein the method comprises the steps of acquiring a plurality of target images based on continuous key frames of a monitoring video of a road vehicle; the method comprises the steps of carrying out position estimation on each target image, determining a vehicle key point of a road vehicle on the target image, carrying out gesture estimation on each target image, determining an offset angle of the road vehicle relative to an optical axis of a camera, determining a moving distance of the road vehicle based on the vehicle key point, the offset angle and the length of a vehicle body of the road vehicle, and determining the moving speed of the road vehicle based on the first moment, the second moment and the moving distance. According to the invention, the speed measurement of the road vehicle can be performed by only using the old monitoring video resource without using other information, so that the convenience and the efficiency of the speed measurement of the vehicle are improved.

Inventors

  • WANG JINQIAO
  • ZHAO XU
  • Zhao Shuaihua
  • GUO HAIYUN
  • HE XIANGYU

Assignees

  • 中科视语(句容)科技有限公司

Dates

Publication Date
20260508
Application Date
20230423

Claims (8)

  1. 1. A vehicle speed measurement method based on position estimation, comprising: acquiring a plurality of target images based on continuous key frames of a monitoring video of a road vehicle; Performing position estimation on each target image, determining vehicle key points of the road vehicle on the target images, performing gesture estimation on each target image, and determining an offset angle of the road vehicle compared with a camera optical axis; determining a moving distance of the road vehicle based on the vehicle key point, the offset angle and the body length of the road vehicle; Determining a first moment and a second moment corresponding to the vehicle key points, determining the running time of the road vehicle based on the first moment and the second moment, and determining the moving speed of the road vehicle based on the running time and the moving distance; The determining the moving distance of the road vehicle based on the vehicle key point, the offset angle and the length of the vehicle body of the road vehicle comprises: determining a first imaging length of the road vehicle based on the head key point and the tail key point at the first moment, and determining a second imaging length based on the tail key point at the first moment and the tail key point at the second moment; Determining a first target distance between a headstock key point at the first moment and the center of the target image, obtaining a first difference value based on the offset angle, the camera focal length and the first target distance, and determining a first conversion relation based on the first difference value and a first imaging length; Determining a second target distance between the tail key point at the second moment and the center of the target image, obtaining a second difference value based on the offset angle, the camera focal length and the second target distance, and determining a second conversion relation based on the second difference value and a second imaging length; and determining the moving distance of the road vehicle based on the first conversion relation, the second conversion relation and the length of the body of the road vehicle.
  2. 2. The method for vehicle speed measurement based on position estimation according to claim 1, wherein the performing position estimation on each of the target images, determining vehicle key points of the road vehicle on the target images, performing attitude estimation on each of the target images, and determining an offset angle of the road vehicle with respect to a camera optical axis, comprises: inputting each target image into a trained target detection and key point extraction model to respectively obtain vehicle key points of the target images at different moments; Inputting each target image into a trained gesture estimation model to obtain a rolling angle, a pitch angle and a course angle of the vehicle compared with the optical axis of the camera, and determining the offset angle based on the rolling angle, the pitch angle and the course angle; the target detection and key point extraction model is obtained by training based on a target image sample and a position estimation label corresponding to the target image sample, and the gesture estimation model is obtained by training based on the target image sample and a gesture angle label corresponding to the target image sample.
  3. 3. The vehicle speed measurement method based on position estimation according to claim 1, wherein the vehicle keypoints include a head keypoint and a tail keypoint at a first time and a tail keypoint at a second time.
  4. 4. The vehicle speed measurement method based on position estimation according to claim 1, wherein the first conversion relation is as follows: ; Wherein, the For the first conversion relationship to be described, For the focal length of the camera in question, For the first target distance to be the same, In order for the angle of the offset to be, Is the first imaging length.
  5. 5. The vehicle speed measurement method based on position estimation according to claim 1, wherein the moving distance of the road vehicle is determined based on the first conversion relation, the second conversion relation, and the body length of the road vehicle, as shown in the following formula: ; Wherein, the In order to move the distance of the movement, For the length of the vehicle body, For the focal length of the camera in question, For the second target distance to be the same, In order for the angle of the offset to be, For a second imaging length.
  6. 6. A vehicle speed measurement device based on position estimation, comprising: an acquisition unit for acquiring a plurality of target images based on consecutive key frames of a monitoring video of a road vehicle; the estimating unit is used for carrying out position estimation on each target image, determining vehicle key points of the road vehicle on the target images, carrying out gesture estimation on each target image and determining an offset angle of the road vehicle compared with a camera optical axis; A distance determining unit configured to determine a moving distance of the road vehicle based on the vehicle key point, the offset angle, and the body length of the road vehicle; A speed determining unit, configured to determine a first time and a second time corresponding to the vehicle key point, determine a driving time of the road vehicle based on the first time and the second time, and determine a moving speed of the road vehicle based on the driving time and a moving distance; the distance determining unit is specifically configured to determine a first imaging length of the road vehicle based on the head key point and the tail key point at the first moment, determine a second imaging length based on the tail key point at the first moment and the tail key point at the second moment, determine a first target distance between the head key point at the first moment and the target image center, obtain a first difference value based on the offset angle, the camera focal length and the first target distance, determine a first conversion relationship based on the first difference value and the first imaging length, determine a second target distance between the tail key point at the second moment and the target image center, obtain a second difference value based on the offset angle, the camera focal length and the second target distance, determine a second conversion relationship based on the second difference value and the second imaging length, and determine a moving distance of the road vehicle based on the first conversion relationship, the second conversion relationship and the body length of the road vehicle.
  7. 7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the vehicle speed measurement method based on a position estimate according to any one of claims 1 to 5 when the program is executed by the processor.
  8. 8. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the vehicle speed measurement method based on position estimation according to any one of claims 1 to 5.

Description

Vehicle speed measurement method, device, equipment and storage medium based on position estimation Technical Field The present invention relates to the field of computer vision, and in particular, to a vehicle speed measurement method, apparatus, device and storage medium based on position estimation. Background The vehicle speed measurement is one of important contents in a traffic management system, and abnormal vehicle running speed brings great hidden trouble to running safety. The road vehicle running speed is effectively monitored, information and basis are provided for vehicle running management, and the method has important significance for refining road management, reducing traffic accidents and guaranteeing running safety. The traditional vehicle speed measuring method mainly comprises a ground induction coil, ultrasonic waves, a radar and the like, and is high in installation and maintenance cost and limited in flexibility. The vehicle speed measuring method based on the video is simple and convenient to install and flexible to set, and has the main difficulties of obtaining the real displacement of the vehicle motion through a continuous image sequence, wherein common solutions include camera calibration, road marking, binocular camera, multi-sensor fusion and the like, but the method has great limitation in use, low utilization rate of old resources and poor reusability. Disclosure of Invention The invention provides a vehicle speed measuring method, device, equipment and storage medium based on position estimation, which are used for solving the defects existing in the prior art and realizing the speed measurement of a road vehicle by only utilizing the existing monitoring video resource without other information. The invention provides a vehicle speed measurement method based on position estimation, which comprises the following steps: acquiring a plurality of target images based on continuous key frames of a monitoring video of a road vehicle; Performing position estimation on each target image, determining vehicle key points of the road vehicle on the target images, performing gesture estimation on each target image, and determining an offset angle of the road vehicle compared with a camera optical axis; determining a moving distance of the road vehicle based on the vehicle key point, the offset angle and the body length of the road vehicle; and determining a first moment and a second moment corresponding to the vehicle key point, determining the running time of the road vehicle based on the first moment and the second moment, and determining the moving speed of the road vehicle based on the running time and the moving distance. According to the vehicle speed measurement method based on position estimation provided by the invention, the method for estimating the position of each target image, determining the vehicle key point of the road vehicle on the target image, estimating the gesture of each target image, and determining the offset angle of the road vehicle compared with the optical axis of a camera comprises the following steps: inputting each target image into a trained target detection and key point extraction model to respectively obtain vehicle key points of the target images at different moments; Inputting each target image into a trained gesture estimation model to obtain a rolling angle, a pitch angle and a course angle of the vehicle compared with the optical axis of the camera, and determining the offset angle based on the rolling angle, the pitch angle and the course angle; the target detection and key point extraction model is obtained by training based on a target image sample and a position estimation label corresponding to the target image sample, and the gesture estimation model is obtained by training based on the target image sample and a gesture angle label corresponding to the target image sample. According to the vehicle speed measurement method based on the position estimation, the vehicle key points comprise a head key point and a tail key point at a first moment and a tail key point at a second moment. According to the vehicle speed measurement method based on the position estimation provided by the invention, the moving distance of the road vehicle is determined based on the vehicle key point, the offset angle and the length of the vehicle body of the road vehicle, and the method comprises the following steps: determining a first imaging length of the road vehicle based on the head key point and the tail key point at the first moment, and determining a second imaging length based on the tail key point at the first moment and the tail key point at the second moment; determining a first conversion relationship based on the first imaging length, offset angle, and camera focal length, and determining a second conversion relationship based on the second imaging length, offset angle, and camera focal length; And determining the moving distance of the road vehicle ba