Vehicle speed measurement method and device based on position estimation, equipment and storage medium

By using a vehicle speed measurement method based on position estimation, and by utilizing continuous keyframes of surveillance video and a neural network model, the key points and offset angles of the vehicle are obtained, and the vehicle speed is calculated in combination with the vehicle length. This solves the problems of convenience and efficiency in vehicle speed measurement in existing technologies.

CN116977945BActive Publication Date: 2026-05-08SINOVISION (JURONG) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SINOVISION (JURONG) TECH CO LTD
Filing Date
2023-04-23
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing vehicle speed measurement methods are costly to install and maintain, have limited flexibility, low utilization of existing resources, poor reusability, and make it difficult to obtain the true displacement of vehicle motion through continuous image sequences.

Method used

The vehicle speed measurement method based on position estimation uses continuous keyframes of surveillance video to obtain vehicle key points through target detection and key point extraction models, determines the offset angle by combining the attitude estimation model, and calculates the vehicle's movement distance and speed using the vehicle length.

Benefits of technology

Without relying on other information, road vehicle speed can be measured using only existing surveillance video resources, improving the convenience and efficiency of vehicle speed measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116977945B_ABST
    Figure CN116977945B_ABST
Patent Text Reader

Abstract

The application provides a vehicle speed measurement method and device based on position estimation, equipment and storage medium, and relates to the technical field of computer vision, which comprises the following steps: acquiring a plurality of target images based on the continuous key frames of the monitoring video of the road vehicle; performing position estimation on each target image to determine the vehicle key points of the road vehicle on the target image, and performing attitude estimation on each target image to determine the offset angle of the road vehicle compared with the camera optical axis; determining the moving distance of the road vehicle based on the vehicle key points, the offset angle and the body length of the road vehicle; and determining the moving speed of the road vehicle based on the first time, the second time and the moving distance. The application can measure the speed of the road vehicle by using the old monitoring video resources without using other information, thereby improving the convenience and efficiency of vehicle speed measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a method, apparatus, device, and storage medium for vehicle speed measurement based on position estimation. Background Technology

[0002] Vehicle speed measurement is a crucial component of traffic management systems, as abnormal vehicle speeds pose significant safety hazards. Effectively monitoring road vehicle speeds provides information and data for vehicle operation management, which is vital for refined road management, reducing traffic accidents, and ensuring road safety.

[0003] Traditional vehicle speed measurement methods mainly include inductive loops, ultrasonic sensors, and radar, which are costly to install and maintain and have limited flexibility. Video-based vehicle speed measurement methods are easy to install and flexible to set up. The main challenge of this method is how to obtain the actual displacement of the vehicle through a continuous sequence of images. Common solutions include camera calibration, road markings, binocular cameras, and multi-sensor fusion, but these have significant limitations in use, with low utilization and poor reusability of existing resources. Summary of the Invention

[0004] This invention provides a vehicle speed measurement method, device, equipment, and storage medium based on position estimation, to overcome the aforementioned deficiencies in the prior art, and to achieve road vehicle speed measurement using only existing surveillance video resources without relying on other information.

[0005] This invention provides a vehicle speed measurement method based on position estimation, comprising:

[0006] Multiple target images are acquired based on consecutive keyframes of road vehicle surveillance video.

[0007] Position estimation is performed on each of the target images to determine the vehicle key points of the road vehicle on the target image; pose estimation is performed on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis.

[0008] Based on the vehicle's key points, offset angle, and the vehicle's body length, the distance the road vehicle travels is determined.

[0009] The first and second moments corresponding to the key points of the vehicle are determined, the travel time of the road vehicle is determined based on the first and second moments, and the speed of the road vehicle is determined based on the travel time and the distance traveled.

[0010] According to a vehicle speed measurement method based on position estimation provided by the present invention, the steps of performing position estimation on each of the target images to determine the vehicle key points of the road vehicle on the target images, and performing attitude estimation on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis include:

[0011] Each of the target images is input into the trained target detection and key point extraction model to obtain the vehicle key points of the target images at different times.

[0012] Each of the target images is input into the trained attitude estimation model to obtain the roll angle, pitch angle and yaw angle of the vehicle relative to the camera optical axis, and the offset angle is determined based on the roll angle, pitch angle and yaw angle.

[0013] The target detection and key point extraction model is trained based on target image samples and their corresponding position estimation labels, and the pose estimation model is trained based on target image samples and their corresponding pose angle labels.

[0014] According to the vehicle speed measurement method based on position estimation provided by the present invention, the vehicle key points include the front key point and the rear key point at a first moment and the rear key point at a second moment.

[0015] According to a vehicle speed measurement method based on position estimation provided by the present invention, determining the travel distance of the road vehicle based on the vehicle's key points, offset angle, and vehicle body length includes:

[0016] The first imaging length of the road vehicle is determined based on the key points at the front and rear of the vehicle at the first moment, and the second imaging length is determined based on the key points at the rear of the vehicle at the first moment and the key points at the rear of the vehicle at the second moment.

[0017] Based on the first imaging length, offset angle, and camera focal length, a first conversion relationship is determined, and based on the second imaging length, offset angle, and camera focal length, a second conversion relationship is determined.

[0018] Based on the first conversion relationship, the second conversion relationship, and the vehicle body length of the road vehicle, the travel distance of the road vehicle is determined.

[0019] According to a vehicle speed measurement method based on position estimation provided by the present invention, determining a first transformation relationship based on the first imaging length, offset angle, and camera focal length includes:

[0020] Determine the first target distance between the key point of the vehicle front at the first moment and the center of the target image; obtain a first difference based on the offset angle, camera focal length and the first target distance; and determine the first conversion relationship based on the first difference and the first imaging length.

[0021] The step of determining the second conversion relationship based on the second imaging length, offset angle, and camera focal length includes:

[0022] Determine the second target distance between the key point at the rear of the vehicle at the second moment and the center of the target image. Obtain a second difference based on the offset angle, camera focal length, and second target distance. Determine the second conversion relationship based on the second difference and the second imaging length.

[0023] According to the vehicle speed measurement method based on position estimation provided by the present invention, the first transformation relationship is shown in the following formula:

[0024]

[0025] Wherein, α represents the first transformation relationship, and f represents the camera focal length. θ is the distance to the first target, θ is the offset angle, and p1′p′2 is the first imaging length.

[0026] According to a vehicle speed measurement method based on position estimation provided by the present invention, the travel distance of the road vehicle is determined based on a first transformation relationship, a second transformation relationship, and the vehicle body length, as shown in the following formula:

[0027]

[0028] Where L is the distance traveled, L car Let f be the vehicle length and f be the focal length of the camera. θ is the distance to the second target, θ is the offset angle, and p′3p′2 is the second imaging length.

[0029] The present invention also provides a vehicle speed measuring device based on position estimation, comprising:

[0030] The acquisition unit is used to acquire multiple target images from consecutive key frames of road vehicle surveillance video.

[0031] An estimation unit is used to perform position estimation on each of the target images, determine the vehicle key points of the road vehicle on the target image, perform pose estimation on each of the target images, and determine the offset angle of the road vehicle relative to the camera optical axis.

[0032] The distance determination unit is used to determine the travel distance of the road vehicle based on the vehicle's key points, offset angle, and the vehicle's body length.

[0033] A speed determination unit is used to determine a first moment and a second moment corresponding to the key points of the vehicle, determine the travel time of the road vehicle based on the first moment and the second moment, and determine the speed of the road vehicle based on the travel time and the distance traveled.

[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle speed measurement method based on position estimation as described above.

[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the vehicle speed measurement method based on position estimation as described above.

[0036] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the vehicle speed measurement method based on position estimation as described above.

[0037] This invention provides a vehicle speed measurement method, apparatus, device, and storage medium based on position estimation. It acquires multiple target images from consecutive keyframes of road vehicle surveillance video, then performs position estimation on each target image to determine the vehicle's key points on the target image. Next, it performs attitude estimation on each target image to determine the vehicle's offset angle relative to the camera's optical axis. Based on the vehicle's key points, offset angle, and vehicle length, it determines the vehicle's travel distance. Finally, based on the travel distance, a first time point, and a second time point, it determines the vehicle's speed. This invention obtains the vehicle's travel distance and speed by performing position and attitude estimation on the surveillance video images and combining this with the vehicle's length. Therefore, it eliminates the need for other information and utilizes only existing surveillance video resources for road vehicle speed measurement, improving the convenience and efficiency of vehicle speed measurement. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0039] Figure 1This is a flowchart illustrating the vehicle speed measurement method based on position estimation provided by the present invention.

[0040] Figure 2 This is a schematic diagram illustrating the principle of the vehicle speed measurement method based on position estimation provided by the present invention, which uses camera imaging to measure road vehicles.

[0041] Figure 3 This is a schematic diagram of the vehicle speed measuring device based on position estimation provided by the present invention;

[0042] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0044] Currently, the testing method for road vehicles usually involves obtaining the distance the vehicle travels and then determining its speed. However, the key to speed measurement is how to obtain the actual displacement of the vehicle through a continuous sequence of images. Common solutions include camera calibration, road markings, binocular cameras, and multi-sensor fusion, but these have significant limitations in use, with low utilization and poor reusability of existing resources.

[0045] In view of this, embodiments of the present invention provide a vehicle speed measurement method based on location estimation, which can measure the speed of road vehicles using existing surveillance video resources without the need for auxiliary testing with other related data, thus improving the convenience and efficiency of speed measurement.

[0046] Reference Figure 1 The vehicle speed measurement method based on position estimation provided by this invention includes the following steps:

[0047] Step 110: Based on continuous keyframes of road vehicle surveillance video, acquire multiple target images;

[0048] Step 120: Perform position estimation on each of the target images to determine the vehicle key points of the road vehicle on the target image; perform pose estimation on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis.

[0049] Step 130: Based on the vehicle's key points, offset angle, and the vehicle's body length, determine the distance the road vehicle travels;

[0050] Step 140: Determine the first and second moments corresponding to the key points of the vehicle, determine the travel time of the road vehicle based on the first and second moments, and determine the speed of the road vehicle based on the travel time and travel distance.

[0051] The steps of the present invention will be described in detail below.

[0052] In step 110 above, the surveillance video refers to old surveillance resources captured by cameras. By extracting keyframes from the surveillance video, target images corresponding to multiple time points can be obtained. For example, two adjacent keyframes can be selected and denoted as t1 and t2 respectively. Based on the positions of road vehicles in the images at times t1 and t2, the actual distance traveled by the road vehicles can be inferred.

[0053] In step 120 above, the position of the target image corresponding to times t1 and t2 in step 110 is estimated to obtain the key points of the road vehicles. In practice, the front, body, roof, and rear of the vehicle are usually selected as key points.

[0054] Optionally, the vehicle key points include the front and rear key points at a first moment and the rear key point at a second moment.

[0055] In other words, this embodiment only needs to collect the key points p1′ at the front of the vehicle and p′2 at the rear of the vehicle at the first time t1, and the key point p′3 at the rear of the vehicle at the second time.

[0056] Furthermore, pose estimation is performed on the target images corresponding to times t1 and t2 in step 110 above to obtain the offset angle of the road vehicles relative to the camera optical axis in the two target images, denoted as θ.

[0057] It should be noted that the offset angle in this embodiment can be formed by combining the three degrees of freedom attitude angles, namely roll angle, pitch angle and yaw angle.

[0058] In steps 130 and 140 above, the offset angle, the aforementioned key vehicle points, and the known vehicle length can be used to determine the distance the road vehicle travels. Finally, the travel time of the road vehicle is determined based on the first time t1 and the second time t2, thus obtaining the speed of the road vehicle, as shown in the following formula:

[0059] v = L / (t2-t1)

[0060] Where v is the speed of the road vehicle and L is the distance the road vehicle travels.

[0061] This invention provides a vehicle speed measurement method based on position estimation. It acquires multiple target images from consecutive keyframes of road vehicle surveillance video, then performs position estimation on each target image to determine the vehicle's key points on the target image. Next, it performs attitude estimation on each target image to determine the vehicle's offset angle relative to the camera's optical axis. Based on the vehicle's key points, offset angle, and vehicle length, it determines the vehicle's travel distance. Finally, based on the travel distance, a first time point, and a second time point, it determines the vehicle's speed. This invention obtains the vehicle's travel distance and speed by performing position and attitude estimation on the surveillance video images and combining this with the vehicle's length. Therefore, it eliminates the need for other information, utilizing only existing surveillance video resources for road vehicle speed measurement, thus improving the convenience and efficiency of vehicle speed measurement.

[0062] In some optional embodiments, the step of performing position estimation on each of the target images to determine the vehicle key points of the road vehicle on the target image, and performing pose estimation on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis, includes:

[0063] Each of the target images is input into the trained target detection and key point extraction model to obtain the vehicle key points of the target images at different times.

[0064] Each of the target images is input into the trained attitude estimation model to obtain the roll angle, pitch angle and yaw angle of the vehicle relative to the camera optical axis, and the offset angle is determined based on the roll angle, pitch angle and yaw angle.

[0065] The target detection and key point extraction model is trained based on target image samples and their corresponding position estimation labels, and the pose estimation model is trained based on target image samples and their corresponding pose angle labels.

[0066] It is understood that this embodiment describes a specific method for estimating the position and attitude of road vehicles. On one hand, each target image is input into a trained target detection and keypoint extraction model to obtain vehicle keypoints for the target images at different times. On the other hand, each target image is input into a trained attitude estimation model to obtain the vehicle's roll, pitch, and yaw angles relative to the camera's optical axis. Then, based on the roll, pitch, and yaw angles, a three-degree-of-freedom fusion is performed to determine the vehicle's offset angle relative to the camera's optical axis.

[0067] It should be noted that the target detection and key point extraction model and pose estimation model in this embodiment are all neural network models, and both are obtained through supervised training on samples and their corresponding labels.

[0068] The vehicle speed measurement method based on position estimation provided by this invention estimates the position and attitude of each target image by using a target detection and key point extraction model and an attitude prediction model, respectively. This yields the vehicle key points and the three degrees of freedom angle of the road vehicle relative to the camera optical axis, thereby determining the offset angle of the road vehicle relative to the camera optical axis, which in turn determines the distance traveled by the road vehicle. Finally, the speed of the road vehicle is calculated. Speed ​​measurement can be performed using only old surveillance videos and a trained neural network model, ensuring the convenience and efficiency of vehicle speed measurement.

[0069] In some optional embodiments, determining the travel distance of the road vehicle based on the vehicle key points, offset angle, and the vehicle body length includes:

[0070] The first imaging length of the road vehicle is determined based on the key points at the front and rear of the vehicle at the first moment, and the second imaging length is determined based on the key points at the rear of the vehicle at the first moment and the key points at the rear of the vehicle at the second moment.

[0071] Based on the first imaging length, offset angle, and camera focal length, a first conversion relationship is determined, and based on the second imaging length, offset angle, and camera focal length, a second conversion relationship is determined.

[0072] Based on the first conversion relationship, the second conversion relationship, and the vehicle body length of the road vehicle, the travel distance of the road vehicle is determined.

[0073] It is understood that this embodiment describes a specific method for determining the movement of road vehicles.

[0074] First, the first imaging length of the road vehicle is determined based on the key points at the front and rear of the vehicle at the first moment, and the second imaging length is determined based on the key points at the rear of the vehicle at the first moment and the key points at the rear of the vehicle at the second moment.

[0075] It should be noted that the first imaging length in this embodiment is the length of the road vehicle on the imaging plane (i.e., the target image). Based on the key point p′1 of the front of the vehicle and the key point p′2 of the rear of the vehicle at the first time t1 in the above embodiment, the first imaging length can be recorded as p′1p′2. Similarly, the second imaging length in this embodiment is the length of the road vehicle on the imaging plane (i.e., the target image). Based on the key point p′2 of the rear of the vehicle at the first time t2 and the key point p′3 of the rear of the vehicle at the second time in the above embodiment, the second imaging length can be recorded as p′3p′2.

[0076] Then, based on the first imaging length, offset angle, and camera focal length, a first transformation relationship is determined, and based on the second imaging length, offset angle, and camera focal length, a second transformation relationship is determined. Finally, the first and second transformation relationships are combined with the vehicle's body length to determine the vehicle's travel distance.

[0077] The vehicle speed measurement method based on position estimation provided by this invention calculates the first and second imaging lengths by utilizing key points at the front and rear of the vehicle at a first moment and at a second moment, respectively. This yields two different transformation relationships: a first transformation relationship and a second transformation relationship. Finally, the distance traveled is determined by combining these with the vehicle's body length. Therefore, without utilizing other information, road vehicle speed measurement can be performed using only existing surveillance video resources, improving the convenience and efficiency of vehicle speed measurement.

[0078] In some optional embodiments, determining the first conversion relationship based on the first imaging length, offset angle, and camera focal length includes:

[0079] Determine the first target distance between the key point of the vehicle front at the first moment and the center of the target image; obtain a first difference based on the offset angle, camera focal length and the first target distance; and determine the first conversion relationship based on the first difference and the first imaging length.

[0080] The step of determining the second conversion relationship based on the second imaging length, offset angle, and camera focal length includes:

[0081] Determine the second target distance between the key point at the rear of the vehicle at the second moment and the center of the target image. Obtain a second difference based on the offset angle, camera focal length, and second target distance. Determine the second conversion relationship based on the second difference and the second imaging length.

[0082] It is understood that this embodiment describes the method for determining the first and second transformation relationships. First, the first target distance between the key point at the front of the vehicle and the center of the target image at the first moment is determined. This distance is determined by using the coordinates of the key point at the front of the vehicle (with the center of the target image as the origin). Then, a first difference is obtained based on the offset angle, camera focal length, and the first target distance. The first transformation relationship is then determined based on the first difference and the first imaging length.

[0083] Similarly, the second target distance between the key point at the rear of the vehicle and the center of the target image at the second moment can be determined. This distance is determined by using the coordinates of the key point at the rear of the vehicle (with the center of the target image as the origin). Then, based on the offset angle, camera focal length, and the second target distance, a second difference is obtained. Finally, based on this second difference and the second imaging length, a second transformation relationship is determined.

[0084] Specifically, the first transformation relation can be denoted as α, and the second transformation relation as β.

[0085] It should be noted that this embodiment utilizes the imaging principle and uses data such as camera focal length and imaging coordinates of different vehicle key points to obtain the first transformation relationship and the second transformation relationship.

[0086] The following is a detailed description based on the imaging principle, which can be found in [reference]. Figure 2 , Figure 2 This is a schematic diagram illustrating the principle of how road vehicles are imaged by a camera.

[0087] If the key points of the front and rear of a road vehicle at the first moment t1 in the surveillance video are p′1 and p′2 respectively, then the actual front position can be recorded as p1 and the rear position as p2, and their vertical projections on the optical axis are A and B.

[0088] The optical center of the camera plane is denoted as O. C Let O be the center of the image plane, and let α be the plane perpendicular to the optical axis where p2 lies. Let ray O be... C The intersection point of p1 and plane α is p″1, and the perpendicular projection of p1 onto plane α is C.

[0089] Based on the imaging principle and the similarity of triangles, we can obtain the following formulas (1)-(9).

[0090] First, based on triangle p′1p′2O C With triangle p″1p2O C Similarity yields the following:

[0091] p′1p′2 / f=p″1p2 / O C B (1)

[0092] Based on trigonometric relationships, we can obtain:

[0093] AB = Lcar·cosθ (2)

[0094] Based on triangle p′1OO C Similar to triangle p″1p1C, we can obtain:

[0095] p″1C / AB=p″1C / p1C=Op′1 / f (3)

[0096] Based on the coordinates of p′1, the distance from the first target to Op′1 can be obtained.

[0097]

[0098]

[0099] p″1p2=p2C-p″1C=L car ·sinθ-p″1C (6)

[0100] Then formula (1) can be converted to:

[0101]

[0102] Furthermore,

[0103]

[0104]

[0105] The first transformation relationship is shown in the following formula:

[0106]

[0107] Wherein, α represents the first transformation relationship, and f represents the camera focal length. θ is the distance to the first target, θ is the offset angle, and p′1p′2 is the first imaging length.

[0108] Similarly, the method for determining the travel distance of the road vehicle based on the first conversion relationship, the second conversion relationship, and the vehicle body length is as follows:

[0109]

[0110] Where β represents the second transformation relationship, and f represents the camera focal length. θ is the distance to the second target, θ is the offset angle, and p′3p′2 is the second imaging length.

[0111]

[0112] Where L is the distance traveled, L car Let f be the vehicle length and f be the focal length of the camera. θ is the distance to the second target, θ is the offset angle, and p′3p′2 is the second imaging length.

[0113] The vehicle speed measurement method based on position estimation provided by this invention calculates the vehicle's travel distance more accurately by utilizing imaging principles combined with factors such as vehicle length, camera focal length, vehicle key points, and offset angle. Since the vehicle length of the same model is relatively fixed, L can be obtained once the vehicle type is determined. car The actual size of the vehicle is obtained, thereby continuously estimating the vehicle's position and attitude to acquire the vehicle's real-time travel distance.

[0114] Furthermore, this embodiment directly uses existing surveillance camera data as input video, employs a deep neural network model to detect vehicle targets in the speed measurement area, and obtains the accurate trajectory of the vehicle through vehicle position estimation. The entire vehicle speed measurement process does not require additional road markings, camera calibration, or information from other sensors, effectively utilizing existing surveillance camera resources.

[0115] It should be noted that during the actual measurement process, after measuring the vehicle speed between the first time t1 and the second time t2, it is necessary to update the time and location information to facilitate the next measurement.

[0116] The vehicle speed measuring device based on position estimation provided by the present invention will be described below. The vehicle speed measuring device based on position estimation described below can be referred to in correspondence with the vehicle speed measuring method based on position estimation described above.

[0117] Reference Figure 3 The vehicle speed measurement device based on position estimation provided by the present invention includes:

[0118] The acquisition unit 310 is used to acquire multiple target images from continuous key frames of surveillance video of road vehicles;

[0119] The estimation unit 320 is used to perform position estimation on each of the target images, determine the vehicle key points of the road vehicle on the target image, perform attitude estimation on each of the target images, and determine the offset angle of the road vehicle relative to the camera optical axis.

[0120] The distance determination unit 330 is used to determine the travel distance of the road vehicle based on the vehicle key points, offset angle and the body length of the road vehicle;

[0121] The speed determination unit 340 is used to determine the first moment and the second moment corresponding to the key points of the vehicle, determine the travel time of the road vehicle based on the first moment and the second moment, and determine the speed of the road vehicle based on the travel time and the distance traveled.

[0122] The vehicle speed measurement device based on position estimation provided by this invention acquires multiple target images from consecutive keyframes of road vehicle surveillance video. Then, it performs position estimation on each target image to determine the vehicle's key points on the target image, performs attitude estimation on each target image to determine the vehicle's offset angle relative to the camera's optical axis, and determines the vehicle's travel distance based on the vehicle's key points, offset angle, and vehicle length. Finally, it determines the vehicle's speed based on the travel distance, a first time point, and a second time point. This invention obtains the vehicle's travel distance and speed by performing position and attitude estimation on the surveillance video images and combining this with the vehicle's length. Therefore, it eliminates the need for other information and utilizes only existing surveillance video resources for road vehicle speed measurement, improving the convenience and efficiency of vehicle speed measurement.

[0123] In some optional embodiments, the estimation unit is specifically used for:

[0124] Each of the target images is input into the trained target detection and key point extraction model to obtain the vehicle key points of the target images at different times.

[0125] Each of the target images is input into the trained attitude estimation model to obtain the roll angle, pitch angle and yaw angle of the vehicle relative to the camera optical axis, and the offset angle is determined based on the roll angle, pitch angle and yaw angle.

[0126] The target detection and key point extraction model is trained based on target image samples and their corresponding position estimation labels, and the pose estimation model is trained based on target image samples and their corresponding pose angle labels.

[0127] In some optional embodiments, the vehicle key points include the front and rear key points at a first moment and the rear key point at a second moment.

[0128] In some optional embodiments, the distance determination unit is specifically used for:

[0129] The first imaging length of the road vehicle is determined based on the key points at the front and rear of the vehicle at the first moment, and the second imaging length is determined based on the key points at the rear of the vehicle at the first moment and the key points at the rear of the vehicle at the second moment.

[0130] Based on the first imaging length, offset angle, and camera focal length, a first conversion relationship is determined, and based on the second imaging length, offset angle, and camera focal length, a second conversion relationship is determined.

[0131] Based on the first conversion relationship, the second conversion relationship, and the vehicle body length of the road vehicle, the travel distance of the road vehicle is determined.

[0132] In some optional embodiments, the distance determination unit is specifically used for:

[0133] Determine the first target distance between the key point of the vehicle front at the first moment and the center of the target image; obtain a first difference based on the offset angle, camera focal length and the first target distance; and determine the first conversion relationship based on the first difference and the first imaging length.

[0134] Determine the second target distance between the key point at the rear of the vehicle at the second moment and the center of the target image. Obtain a second difference based on the offset angle, camera focal length, and second target distance. Determine the second conversion relationship based on the second difference and the second imaging length.

[0135] In some optional embodiments, the first transformation relationship is shown in the following formula:

[0136]

[0137] Wherein, α represents the first transformation relationship, and f represents the camera focal length. θ is the distance to the first target, θ is the offset angle, and p11p′2 is the first imaging length.

[0138] In some optional embodiments, the distance traveled by the road vehicle is determined based on the first transformation relationship, the second transformation relationship, and the vehicle's body length, as shown in the following formula:

[0139]

[0140] Where L is the distance traveled, L car Let f be the vehicle length and f be the focal length of the camera. θ is the distance to the second target, θ is the offset angle, and p′3p′2 is the second imaging length.

[0141] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a vehicle speed measurement method based on position estimation, the method including:

[0142] Multiple target images are acquired based on consecutive keyframes of road vehicle surveillance video.

[0143] Position estimation is performed on each of the target images to determine the vehicle key points of the road vehicle on the target image; pose estimation is performed on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis.

[0144] Based on the vehicle's key points, offset angle, and the vehicle's body length, the distance the road vehicle travels is determined.

[0145] The first and second moments corresponding to the key points of the vehicle are determined, the travel time of the road vehicle is determined based on the first and second moments, and the speed of the road vehicle is determined based on the travel time and the distance traveled.

[0146] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0147] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the vehicle speed measurement method based on position estimation provided by the above methods, the method comprising:

[0148] Multiple target images are acquired based on consecutive keyframes of road vehicle surveillance video.

[0149] Position estimation is performed on each of the target images to determine the vehicle key points of the road vehicle on the target image; pose estimation is performed on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis.

[0150] Based on the vehicle's key points, offset angle, and the vehicle's body length, the distance the road vehicle travels is determined.

[0151] The first and second moments corresponding to the key points of the vehicle are determined, the travel time of the road vehicle is determined based on the first and second moments, and the speed of the road vehicle is determined based on the travel time and the distance traveled.

[0152] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the vehicle speed measurement method based on position estimation provided by the methods described above, the method comprising:

[0153] Multiple target images are acquired based on consecutive keyframes of road vehicle surveillance video.

[0154] Position estimation is performed on each of the target images to determine the vehicle key points of the road vehicle on the target image; pose estimation is performed on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis.

[0155] Based on the vehicle's key points, offset angle, and the vehicle's body length, the distance the road vehicle travels is determined.

[0156] The first and second moments corresponding to the key points of the vehicle are determined, the travel time of the road vehicle is determined based on the first and second moments, and the speed of the road vehicle is determined based on the travel time and the distance traveled.

[0157] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A vehicle speed measurement method based on position estimation, characterized in that, include: Multiple target images are acquired based on consecutive keyframes of road vehicle surveillance video. Position estimation is performed on each of the target images to determine the vehicle key points of the road vehicle on the target image; pose estimation is performed on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis. Based on the vehicle's key points, offset angle, and the vehicle's body length, the distance the road vehicle travels is determined. Determine the first and second moments corresponding to the key points of the vehicle, determine the travel time of the road vehicle based on the first and second moments, and determine the speed of the road vehicle based on the travel time and travel distance. Determining the travel distance of the road vehicle based on the vehicle's key points, offset angle, and vehicle length includes: The first imaging length of the road vehicle is determined based on the key points at the front and rear of the vehicle at the first moment, and the second imaging length is determined based on the key points at the rear of the vehicle at the first moment and the key points at the rear of the vehicle at the second moment. Determine the first target distance between the key point of the vehicle's front at the first moment and the center of the target image; obtain a first difference based on the offset angle, camera focal length, and the first target distance; and determine a first transformation relationship based on the first difference and the first imaging length. Determine the second target distance between the key point at the rear of the vehicle at the second moment and the center of the target image; obtain a second difference based on the offset angle, camera focal length, and second target distance; and determine a second conversion relationship based on the second difference and the second imaging length. Based on the first conversion relationship, the second conversion relationship, and the vehicle body length of the road vehicle, the travel distance of the road vehicle is determined.

2. The vehicle speed measurement method based on position estimation according to claim 1, characterized in that, The step of performing position estimation on each of the target images to determine the vehicle key points of the road vehicle on the target images, and performing pose estimation on each of the target images to determine the offset angle of the road vehicle relative to the camera optical axis, includes: Each of the target images is input into the trained target detection and key point extraction model to obtain the vehicle key points of the target images at different times. Each of the target images is input into the trained attitude estimation model to obtain the roll angle, pitch angle and yaw angle of the vehicle relative to the camera optical axis, and the offset angle is determined based on the roll angle, pitch angle and yaw angle. The target detection and key point extraction model is trained based on target image samples and their corresponding position estimation labels, and the pose estimation model is trained based on target image samples and their corresponding pose angle labels.

3. The vehicle speed measurement method based on position estimation according to claim 1, characterized in that, The vehicle key points include the front and rear key points at the first moment and the rear key point at the second moment.

4. The vehicle speed measurement method based on position estimation according to claim 1, characterized in that, The first transformation relationship is shown in the following formula: ; in, This is the first transformation relationship. The focal length of the camera, The distance to the first target. For offset angle, This is the first imaging length.

5. The vehicle speed measurement method based on position estimation according to claim 1, characterized in that, Based on the first conversion relationship, the second conversion relationship, and the vehicle body length, the travel distance of the road vehicle is determined as shown in the following formula: ; in, For the distance traveled, For vehicle body length, The focal length of the camera, The distance to the second target. For offset angle, This is the second imaging length.

6. A vehicle speed measuring device based on position estimation, characterized in that, include: The acquisition unit is used to acquire multiple target images from consecutive key frames of road vehicle surveillance video. An estimation unit is used to perform position estimation on each of the target images, determine the vehicle key points of the road vehicle on the target image, perform pose estimation on each of the target images, and determine the offset angle of the road vehicle relative to the camera optical axis. The distance determination unit is used to determine the travel distance of the road vehicle based on the vehicle's key points, offset angle, and the vehicle's body length. A speed determination unit is used to determine a first moment and a second moment corresponding to the key points of the vehicle, determine the travel time of the road vehicle based on the first moment and the second moment, and determine the speed of the road vehicle based on the travel time and the distance traveled. The distance determination unit is specifically used to determine the first imaging length of the road vehicle based on the front key point and the rear key point at the first moment, and to determine the second imaging length based on the rear key point at the first moment and the rear key point at the second moment; to determine the first target distance between the front key point at the first moment and the center of the target image, to obtain a first difference based on the offset angle, the camera focal length and the first target distance, and to determine a first conversion relationship based on the first difference and the first imaging length; Determine the second target distance between the key point at the rear of the vehicle at the second moment and the center of the target image; obtain a second difference based on the offset angle, camera focal length, and second target distance; and determine a second conversion relationship based on the second difference and the second imaging length. Based on the first conversion relationship, the second conversion relationship, and the vehicle body length of the road vehicle, the travel distance of the road vehicle is determined.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the vehicle speed measurement method based on position estimation as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the vehicle speed measurement method based on position estimation as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vehicle speed estimation method and device

    CN115908486A

  • System and method for detecting, tracking and estimating the speed of vehicles from a mobile platform

    US20140336848A1