Vehicle speed detection method, vehicle and computer storage medium

By detecting feature points on road video images and removing moving feature points, and using relatively stationary feature points to determine the vehicle's driving speed, the problem of inaccurate driving speed detection in complex outdoor environments in the prior art is solved, and higher detection accuracy and applicability are achieved.

CN119757791APending Publication Date: 2025-04-04BYD CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410681114.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, monocular visual speed detection method for pixel displacement is difficult to accurately detect vehicle driving speed in complex outdoor environments, mainly due to interference from moving targets, pixel displacement calculation errors.

Method used

The driving speed of the vehicle is determined by performing feature point detection on the road video image and removing the moving feature point to obtain effective feature points. This method uses relatively stationary feature points for detection, avoiding interference with moving targets on driving speed detection.

Benefits of technology

It improves the accuracy of driving speed detection, is suitable for complex outdoor environments, and reduces interference from external factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119757791A_ABST
    Figure CN119757791A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle speed detection method, a vehicle and a computer storage medium. The method comprises the following steps: acquiring a road video image; performing feature point detection on the road video image, and removing motion feature points in the road video image to obtain effective feature points; and determining the driving speed of the vehicle according to the effective feature points. The method can avoid the interference of the motion feature points on the driving speed detection, improves the accuracy of the driving speed detection, and is suitable for an outdoor complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicles, and in particular to a vehicle speed detection method, a vehicle and a computer storage medium. Background Art

[0002] In the related art, a monocular vision speed detection method based on pixel displacement is used to determine the vehicle's driving speed. That is, the vehicle's driving distance is estimated by the displacement of all pixels in two frames of images to determine the driving speed. However, when there are other moving targets in the image, the movement of these moving targets will cause errors in the calculation of pixel displacement, which will cause errors in the estimation of the vehicle's driving distance, thereby affecting the accuracy of driving speed detection. Therefore, this detection method cannot be applied to complex outdoor environments. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, one object of the present invention is to provide a vehicle speed detection method, which analyzes and processes road video images to remove motion feature points, thereby avoiding the interference of motion feature points on driving speed detection, improving the accuracy of driving speed detection, and being applicable to outdoor complex environments.

[0004] A second object of the present invention is to provide a vehicle.

[0005] A third object of the present invention is to provide a computer storage medium.

[0006] In order to solve the above problems, an embodiment of the first aspect of the present invention proposes a vehicle speed detection method, comprising: acquiring a road video image; performing feature point detection on the road video image, and removing motion feature points in the road video image to obtain valid feature points; and determining the driving speed of the vehicle based on the valid feature points.

[0007] According to the vehicle speed detection method of the embodiment of the present invention, feature points excluding motion feature points from all feature points of the road video image are taken as effective feature points, and then the vehicle's driving speed is determined based on the effective feature points, that is, the vehicle's driving speed is determined using relatively static feature points in the road video image, so as to eliminate the interference of moving targets on driving speed detection. Therefore, compared with the method of determining the vehicle's driving speed by using a monocular vision speed detection method, the driving speed detection implemented by the effective feature points in the present application can avoid the interference of motion feature points on driving speed detection, so as to improve the accuracy of driving speed detection. In addition, the detection method of the present application is less affected by external factors and can be applied to complex outdoor environments.

[0008] In some embodiments, feature point detection is performed on the road video image, and moving feature points in the road video image are removed to obtain valid feature points, including: target reference object detection is performed on the road video image to extract the target reference object area in the road video image, and non-target reference object areas in the road video image are set to zero; feature point detection is performed on the target reference object area, and moving feature points in the target reference object area are removed to obtain valid feature points.

[0009] In some embodiments, the target reference object is a lane line, and target reference object detection is performed on the road video image to extract the target reference object area in the road video image, including: performing lane line detection on the road video image to extract the lane line area in the road video image.

[0010] In some embodiments, the target reference object is a roadside line, and target reference object detection is performed on the road video image to extract the target reference object area in the road video image, including: performing roadside line detection on the road video image to extract the roadside line area in the road video image.

[0011] In some embodiments, the road video image includes a continuous previous frame road video image and a current frame road video image, the effective feature points include a first group of effective feature points and a second group of effective feature points, the first group of effective feature points are effective feature points in the previous frame road video image, and the second group of effective feature points are effective feature points in the current frame road video image, and determining the vehicle's driving speed based on the effective feature points includes: determining the time interval between two frames of images based on the previous frame road video image and the current frame road video image; determining the vehicle's driving distance based on the first group of effective feature points and the second group of effective feature points; and determining the vehicle's driving speed based on the time interval and the driving distance.

[0012] In some embodiments, determining the driving distance of the vehicle based on the first group of valid feature points and the second group of valid feature points includes: performing feature matching of images based on the first group of valid feature points and the second group of valid feature points, and stitching the images after feature matching to obtain a target reference object stitched image; determining a stitching distance between two frames of images based on the target reference object stitched image, and using the stitching distance as the driving distance of the vehicle.

[0013] In some embodiments, the target reference object includes a left lane line and a right lane line, and determining the stitching distance between two frames of images according to the target reference object stitching image includes: obtaining a first positioning point on the left lane line in the target reference object stitching image and a second positioning point on the right lane line in the target reference object stitching image; obtaining a first stitching point and a second stitching point at a stitching position in the target reference object stitching image, wherein the first stitching point and the first positioning point are located on the same straight line, and the second stitching point and the second positioning point are located on the same straight line; calculating a first length value between the first positioning point and the first stitching point, and calculating a first length value between the second positioning point and the second stitching point. ; obtaining a first reference point and a second reference point on the bottom edge of the image in the stitched image of the target reference object, wherein the first reference point and the first positioning point are located on the same straight line, and the second reference point and the second positioning point are located on the same straight line; calculating a third length value between the first positioning point and the first reference point, and calculating a fourth length value between the second positioning point and the second reference point; performing a difference operation on the third length value and the first length value to obtain a first difference, and performing a difference operation on the fourth length value and the second length value to obtain a second difference; determining a stitching distance between two frames of images according to the first difference and the second difference.

[0014] In some embodiments, determining the stitching distance between two frames of images according to the first difference and the second difference includes: performing a mean operation on the first difference and the second difference to obtain a mean result, and using the mean result as the stitching distance.

[0015] A second aspect of the present invention provides a vehicle, comprising: at least one processor; a memory communicatively connected to at least one of the processors; wherein the memory stores a computer program executable by at least one of the processors, and when at least one of the processors executes the computer program, the vehicle speed detection method of the above embodiment is implemented.

[0016] According to the vehicle of the embodiment of the present invention, by adopting the vehicle speed detection method of the above embodiment, the road video image can be analyzed and processed to remove the motion feature points, thereby avoiding interference from moving targets, ensuring the accuracy of vehicle speed detection, and can be used in complex outdoor environments.

[0017] A third aspect of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the vehicle speed detection method of the above embodiment.

[0018] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0020] Figure 1 is a flow chart of a vehicle speed detection method according to an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of a previous frame of a road video image according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a current frame road video image according to an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of a target reference object stitching image according to an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of a target reference object stitching image according to an embodiment of the present invention;

[0025] Figure 6 is a flow chart of a vehicle speed detection method according to another embodiment of the present invention;

[0026] Figure 7 is a structural block diagram of a vehicle according to an embodiment of the present invention.

[0027] Reference numerals:

[0028] Vehicle 10;

[0029] Processor 1; Memory 2. DETAILED DESCRIPTION

[0030] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.

[0031] When detecting the vehicle's own speed, a monocular vision speed detection method based on pixel displacement is used. The vehicle's travel distance is estimated by calculating the displacement of all pixels in two frames of images. However, this method will be interfered by moving targets. When there are moving targets in the image, the movement of these targets will cause deviations in the calculation of pixel displacement, resulting in larger errors in estimating the vehicle's travel distance, and then larger errors in real-time vehicle speed estimation, affecting the accuracy of speed detection. This limits the use of this method in complex outdoor environments.

[0032] In order to solve the above problems, an embodiment of the first aspect of the present invention provides a vehicle speed detection method, which can avoid the interference of motion feature points on driving speed detection, improve the accuracy of driving speed detection, and is suitable for complex outdoor environments.

[0033] Reference below Figure 1 A vehicle speed detection method according to an embodiment of the present invention is described. The vehicle speed detection method at least includes steps S1 to S3.

[0034] Step S1, acquiring a road video image.

[0035] Specifically, a camera installed on a vehicle is used to capture a road video stream of the vehicle while it is traveling, and the acquired road video stream is parsed to obtain a continuous image sequence, wherein the image sequence is composed of a series of continuous road video images, thereby obtaining a road video image, so as to facilitate visual detection and positioning through the road video image. Exemplarily, after the video stream of the road ahead is captured by the camera, the acquired video stream is parsed using the video processing tool of Opencv (Open Source Computer Vision Library, open source computer vision library) to obtain a continuous image sequence, i.e., a continuous road video image. In addition, the camera in the present application may be a monocular camera.

[0036] Step S2: perform feature point detection on the road video image, and remove motion feature points in the road video image to obtain valid feature points.

[0037] Specifically, feature point detection is performed on the road video image to obtain feature points in the road video image, wherein the feature point is a point in the road video image where the grayscale value of the image changes dramatically or a point on the edge of the image with a large curvature. The feature point can be an edge intersection point, a corner point, a spot or other significant pixel point of the image, etc., and there is no limitation on this. Exemplarily, for obtaining feature points in the road video image, feature point detection can be performed on the road video image through a feature point detection algorithm, wherein the feature point detection algorithm can be SIFT (Scale-invariant Feature Transform), SURF (Speeded-Up Robust Features), FAST (Feature from Accelerated Segment Test), etc., and there is no specific limitation here, wherein SIFT is a local feature point detection algorithm, SURF is a fast feature point detection algorithm, and FAST is a feature corner point detection algorithm.

[0038] Then, there are motion feature points among all feature points of the road video image, wherein the motion feature points are dynamically changing pixel points in the road video image, and these motion feature points will cause interference when the feature points are used for subsequent processing, thereby affecting the accuracy of the subsequent processing. Therefore, after obtaining the feature points in the road video image, the motion feature points in the road video image are removed to obtain effective feature points, that is, the feature points other than the motion feature points in all feature points of the road video image are taken as effective feature points, wherein the effective feature points are relatively static feature points. As a result, the interference of the motion feature points can be avoided when the effective feature points are used for subsequent processing, thereby improving the accuracy of the subsequent processing.

[0039] In addition, the motion feature points in the road video image can be determined by an image segmentation method, wherein the image segmentation method can be a deep learning method, and the models of the deep learning method include Deeplab (Deep Learning for Dense Panoptic Segmeantation), Unet (Convolutional Networksfor Biomedical Image Segmentation), Hrnet (High-Resolution Net), and other models, which are not specifically limited here.

[0040] Step S3, determining the vehicle's travel speed according to the effective feature points.

[0041] Specifically, in order to solve this problem, in the present application, after obtaining feature points in a road video image, moving feature points in the road video image are removed to obtain effective feature points, so as to eliminate the interference of moving targets on driving speed detection, and then the driving speed of the vehicle is determined according to the effective feature points, that is, the driving speed of the vehicle is determined by using relatively static feature points in the road video image, for example, the driving distance of the vehicle between two adjacent frames of road video images is estimated by the position change or displacement of the effective feature points in two adjacent frames of road video images, and the frame rate and frame number of the road video are obtained through the road video, so as to obtain the time interval between two adjacent frames of road video images through the frame rate and frame number calculation, and then the time interval and driving distance are replaced by The speed calculation formula is input to calculate the driving speed. Therefore, compared with the method of determining the driving speed of the vehicle by using a monocular vision speed detection method, the driving speed detection achieved by the effective feature points in the present application, that is, the driving speed of the vehicle is determined by using relatively static feature points in the road video image, thereby avoiding the interference of moving feature points on the driving speed detection, so as to improve the accuracy of driving speed detection. In addition, the present application adopts a monocular camera pure vision method to realize the driving speed detection, and does not rely on sensors to realize driving speed detection. It is less affected by external factors and can be applied to complex outdoor environments. It only uses a monocular camera to collect images, and the hardware structure is simple, which can be applied to vehicle platforms of different models.

[0042] According to the vehicle speed detection method of the embodiment of the present invention, feature points excluding motion feature points from all feature points of the road video image are taken as effective feature points, and then the vehicle's driving speed is determined based on the effective feature points, that is, the vehicle's driving speed is determined using relatively static feature points in the road video image, so as to eliminate the interference of moving targets on driving speed detection. Therefore, compared with the method of determining the vehicle's driving speed by using a monocular vision speed detection method, the driving speed detection implemented by the effective feature points in the present application can avoid the interference of motion feature points on driving speed detection, so as to improve the accuracy of driving speed detection. In addition, the detection method of the present application is less affected by external factors and can be applied to complex outdoor environments.

[0043] In some embodiments, feature point detection is performed on a road video image, and moving feature points in the road video image are removed to obtain valid feature points, including: target reference object detection is performed on the road video image to extract the target reference object area in the road video image, and non-target reference object areas in the road video image are set to zero; feature point detection is performed on the target reference object area, and moving feature points in the target reference object area are removed to obtain valid feature points.

[0044] Specifically, there are moving targets on the road, such as vehicles, pedestrians, or animals. When the moving feature points are matched to the above moving targets, a relative moving speed will be generated with the vehicle, thereby increasing the estimated driving speed deviation. In order to eliminate the interference of moving objects on the detection of driving speed, the present application determines the driving speed by selecting effective feature points in the target reference area, thereby improving the detection accuracy of the driving speed. First, target reference object detection is performed on the road video image, wherein the target reference object in the road video image can be a road environment reference object, for example, a road environment reference object is a road lane marking, a road sign, a roadside tree, or other fixed reference objects, in order to provide A target reference object region in a road video image is taken out, that is, a region corresponding to a static reference object in the road video image is taken as the target reference object region, thereby, when determining the driving speed through effective feature points in the target reference object region, interference with the detection of the driving speed can be effectively eliminated, and, before determining effective feature points in the target reference object region in the road video image, a non-target reference object region in the road video image is set to 0, that is, the pixel values ​​of the pixel points in the non-target reference object region in the road video image are set to 0, so as to remove the non-target reference object region in the road video image and reduce the amount of data processed by the road video image. Then, when determining the effective feature points of the target reference object area, the target reference object area is firstly detected by a feature point detection algorithm to obtain the feature points in the target reference object area. Then, in order to avoid the interference of the motion feature points in the target reference object area with the detection of the driving speed, the motion feature points in the target reference object area are determined by an image segmentation method, and the motion feature points in the target reference object area are removed to obtain the effective feature points, that is, the feature points except the motion feature points in all the feature points of the target reference object area are taken as the effective feature points. Therefore, in the present application, the driving speed is determined by selecting the effective feature points of the target reference object area, thereby improving the detection accuracy of the driving speed.

[0045] In the embodiment, a large number of feature points are obtained by performing feature point detection on a road video image, and the number of feature points required when using feature points of multiple road video images for image feature matching is at least four. Therefore, even if the feature points of the moving target are removed, it will not affect the detection of the vehicle's driving speed.

[0046] In some embodiments, the target reference object is a lane line, and target reference object detection is performed on the road video image to extract the target reference object area in the road video image, including: performing lane line detection on the road video image to extract the lane line area in the road video image.

[0047] Specifically, the driving speed is calculated by the distance between the target reference object and the vehicle, and the lane lines are ubiquitous on the road and have obvious features, so that the lane lines can be more easily captured by the camera. In addition, the lane lines can accurately indicate the direction of the road, and the lane lines are parallel to the ground and closely fit, which is convenient for the monocular camera to estimate the driving distance of the vehicle through the collected road video images. Therefore, the target reference object in this application is set to the lane line, and then the lane line detection is performed on the road video image, that is, the two nearest lane lines on the lane where the vehicle is located are detected through the road video image. For example, a deep learning method is used to detect the lane line of the road video image. The models that can be used for the deep learning method are Lanenet or UFLD (Ultra Fast Lane Lane line detection, ultra-fast lane line detection), etc., without restriction, is used to extract the lane line area in the road video image. In addition, the lane line detection result can be represented by a polynomial equation, and polynomial fitting can solve problems such as lane line damage, occlusion or discontinuity. At the same time, the polynomial equation can accurately represent the straight or curved lanes. Therefore, in this application, the lane line is used as the target reference, and the lane line area is collected by a monocular camera, which is conducive to improving the accuracy of driving distance estimation.

[0048] In the embodiment, the position information of the lane line in the previous frame of the road video image is obtained, and then the position information of the lane line in the current frame of the road video image is tracked through the video tracking algorithms Sort (Simple Online and Realtime Tracking), Deepsort (Deeplearning based SORT) and Bytetrack. In addition, if the lane line is blocked or the lane line is beyond the detection range of the vehicle monocular camera, the lane line is re-matched or tracked from the road video image collected in real time.

[0049] In some embodiments, the target reference object is a roadside line, and target reference object detection is performed on the road video image to extract the target reference object area in the road video image, including: performing roadside line detection on the road video image to extract the roadside line area in the road video image.

[0050] Specifically, if there are no lane lines on the road on which the vehicle is traveling, in order to be able to estimate the vehicle's traveling distance through target reference objects to detect the driving speed, the roadside lines are used as target reference objects, that is, the roadside lines on both sides of the road are used to replace the lane lines, and roadside line detection is performed on the road video image to extract the roadside line area in the road video image. Therefore, when determining the driving speed through the effective feature points of the road video image, interference with the detection of the driving speed can be effectively eliminated.

[0051] In some embodiments, the road video image includes a continuous previous frame road video image and a current frame road video image, the effective feature points include a first group of effective feature points and a second group of effective feature points, the first group of effective feature points are effective feature points in the previous frame road video image, and the second group of effective feature points are effective feature points in the current frame road video image, and the vehicle's driving speed is determined according to the effective feature points, including: determining the time interval between the two frames of images according to the previous frame road video image and the current frame road video image; determining the vehicle's driving distance according to the first group of effective feature points and the second group of effective feature points; determining the vehicle's driving speed according to the time interval and the driving distance.

[0052] Specifically, a road video of the vehicle during driving is collected by a camera installed on the vehicle, and the road video stream is parsed to obtain a continuous image sequence, and a previous frame of road video image and a current frame of road video image are obtained from the image sequence, and then the time interval between the two frames of image is determined according to the previous frame of road video image and the current frame of road video image, for example, by dividing the difference between the index of the previous frame of road video image and the index of the current frame of road video image by the frame rate of the road video, wherein the frame rate of the road video is the number of continuous road video image frames played within 1 second, and the valid feature points in the previous frame of road video image are used as A first group of effective feature points, and the effective feature points in the current frame road video image are used as the second group of effective feature points, and then the vehicle's driving distance is determined according to the first group of effective feature points and the second group of effective feature points. For example, the vehicle's driving distance is estimated by the position change or displacement of the second group of effective feature points in the current frame road video image and the first group of effective feature points in the previous frame road video image, and then the driving speed is calculated according to the time interval and the driving distance. Therefore, the detection of the driving speed achieved by the effective feature points in the present application can avoid the interference of the moving feature points on the driving speed detection, so as to improve the accuracy of the driving speed detection.

[0053] In some embodiments, determining the driving distance of a vehicle based on a first group of valid feature points and a second group of valid feature points includes: performing feature matching of images based on the first group of valid feature points and the second group of valid feature points, and stitching the images that have completed feature matching to obtain a target reference object stitched image; determining a stitching distance between two frames of images based on the target reference object stitched image, and using the stitching distance as the driving distance of the vehicle.

[0054] Specifically, image feature matching is performed based on the first group of valid feature points and the second group of valid feature points, that is, the same or similar features in the previous frame of road video image and the current frame of road video image are identified through the same or similar valid feature points in the target reference area of ​​the previous frame of road video image and the current frame of road video image, wherein the similar features can be target reference objects such as roadside lines and lane lines. For example, Ransac (Random Sample Consensus) is used to perform image feature matching on the first group of valid feature points and the second group of valid feature points, and the images after feature matching are spliced, that is, image perspective transformation is used to splice the same or similar features of the previous frame of road video image and the current frame of road video image, such as Figure 2-Figure 4 As shown, the lane lines in the previous frame of road video image and the current frame of road video image are spliced, that is, the same lane lines in the previous frame of road video image and the current frame of road video image are synthesized into one line to obtain a target reference spliced ​​image, and then the splicing distance between the two frames of images is determined according to the target reference spliced ​​image, wherein the splicing distance is used to reflect the displacement of the vehicle between two adjacent frames of images, and then the splicing distance is used as the driving distance of the vehicle. Thus, the driving speed is detected by effective feature points. In addition, before the effective feature points are feature matched, the feature points of the road video image are screened by moving target detection, so as to avoid the interference of the moving feature points on the driving speed detection, so as to improve the accuracy of the matching of the effective feature points, and the lane line is selected as the target reference, which is conducive to reducing the splicing error of the lane line and the estimation error of the driving distance.

[0055] In an embodiment, lane line detection is performed on a road video image to extract a lane line area in the road video image, and non-lane line areas in the road video image are set to zero so that feature points extracted from the road video image are located in the lane line area, thereby reducing lane line splicing errors.

[0056] In the embodiment, in the related art, the monocular camera detects and identifies the fixed ground landmarks as reference points to calculate the vehicle travel distance between two frames of images. However, the fixed ground landmarks are visible for a limited time to the moving vehicle and need to be constantly replaced. The changing fixed ground landmarks are prone to false detection problems, which increases the error in the estimated driving speed. In addition, the distance to the landmark cannot be detected when there is no landmark in the outdoor scene, and even if there is a landmark in the outdoor scene, it appears randomly at any position in the image, which is not conducive to estimating the distance between the monocular camera and the landmark. In order to solve this problem, the lane line is used as the target reference in this application, and the lane line is ubiquitous on the road and has obvious features, so that the lane line can be more easily captured by the monocular camera. In addition, the lane line can also accurately indicate the direction of the road, and the lane line is parallel to the ground and fits tightly, which is convenient for the monocular camera to estimate the vehicle's travel distance through the collected road video image, which is conducive to improving the accuracy of the estimated travel distance.

[0057] In some embodiments, the target reference object includes a left lane line and a right lane line, and the target reference object stitched image is a stitched image of the left lane line and the right lane line. The stitching distance between the two frames of images is determined based on the target reference object stitched image. The specific steps are as follows.

[0058] A first positioning point on the left lane line in the target reference object stitching image and a second positioning point on the right lane line in the target reference object stitching image are obtained, wherein the first positioning point and the second positioning point are points selected on the lane line to represent the lane line position information, and the first positioning point and the second positioning point can be the lane line endpoints or any points on the lane line. For example, Figure 4 As shown, the first positioning point on the left lane line in the target reference object stitching image is selected as point A, and the second positioning point on the right lane line in the target reference object stitching image is selected as point B.

[0059] The first stitching point and the second stitching point at the stitching position in the target reference object stitching image are obtained, wherein the first stitching point and the first positioning point are located on the same straight line, and the second stitching point and the second positioning point are located on the same straight line, that is, the stitching points of the previous frame road video image and the current frame road video image at the stitching position are obtained, such as Figure 4 As shown, the first splicing point is point D, and the second splicing point is point C.

[0060] Calculate the first length value between the first positioning point and the first splicing point. For example, the first length can be expressed as d AD , and calculate the second length value between the second positioning point and the second splicing point. The second length can be expressed as d BC .

[0061] The first reference point and the second reference point on the bottom edge of the image in the target reference object stitched image are obtained, wherein the first reference point and the first positioning point are located on the same straight line, and the second reference point and the second positioning point are located on the same straight line, that is, the intersection point of the bottom edge of the image in the target reference object stitched image and the straight line where the lane line is located is obtained.

[0062] Calculate the third length value between the first positioning point and the first reference point. For example, the third length value can be expressed as d AD’ , and calculating a fourth length value between the second positioning point and the second reference point. For example, the fourth length value can be expressed as d BC’ .

[0063] Perform a difference operation on the third length value and the first length value to obtain a first difference value, the first difference value=d AD’ -d AD , and performing a difference operation on the fourth length value and the second length value to obtain a second difference value, the second difference value = d BC’ -d BC .

[0064] The stitching distance between the two frames of images is determined according to the first difference and the second difference. The stitching distance is the distance between the stitching position in the target reference object stitching image and the bottom edge of the image. For example, the stitching distance may be the first difference or the second difference.

[0065] In some embodiments, the splicing distance between the two frames of images is determined according to the first difference and the second difference, that is, the first difference and the second difference are averaged to obtain the average result d, where d=[(d AD’ -d AD )+(d BC’ -d BC )] / 2, and take the mean result as the stitching distance to improve the accuracy of the stitching distance.

[0066] In the embodiment, the ranging principle of the monocular camera can only estimate the distance information on a specific reference surface. Since the lane line in the road video image in the present application is closely attached to the road surface, i.e., the specific reference surface, so that the height change of the lane line can be ignored, the actual distance between the lane line and the monocular camera can be estimated with higher accuracy after calibrating the internal and external parameters of the camera.

[0067] In an embodiment, the present application calculates the driving distance of the vehicle through the driving trajectory of the vehicle, for example, the driving distance is calculated by the straight-line distance between the trajectory points in the driving trajectory, the lane line position information is extracted from the continuous multi-frame road video image, and the driving trajectory of the vehicle is predicted by fitting and analyzing the changes in these position information; or the splicing distances between the continuous multi-frame road video images are spliced ​​together to form the driving trajectory, wherein the splicing distance is the relative driving distance of the vehicle between two frames of road video images, for example, Figure 5 As shown, the driving trajectory can be formed by splicing the relative driving distance L between the current frame road video image A and the previous frame road video image B. It should be noted that if the relative driving distance and interval time between two frames of road video images are short, it is considered that the vehicle moves in a straight line during this time interval. Therefore, even if the vehicle turns and changes its head to produce a complex driving trajectory, it can be obtained by splicing the distance between multiple frames of road video images. Therefore, this scheme is applicable to the prediction of curved driving trajectories. In addition, since the coordinate system of the driving distance obtained by the driving trajectory estimated by the road video image is in the image coordinate system, after obtaining the driving distance, the driving distance is converted from the image coordinate system to the world coordinate system.

[0068] Reference below Figure 6 The vehicle speed detection method according to an embodiment of the present invention is illustrated by way of example, and the specific steps are as follows.

[0069] Step S4, obtaining the current frame road video image and the previous frame road video image, and executing steps S5 and S9.

[0070] Step S5, performing lane line detection on the current frame road video image to extract the lane line area of ​​the current frame road video image, and performing lane line detection on the previous frame road video image to extract the lane line area of ​​the previous frame road video image.

[0071] Step S6, predicting the position of the lane line in the next frame of road video image by the lane line detection result of the previous frame of road video image. For example, the lane line detection result of the previous frame of road video image can be used through video tracking algorithms Sort, Deepsort and Bytetrack to achieve lane line tracking.

[0072] Step S7: performing lane line detection on the current frame road video image and the previous frame road video image to extract lane line areas in the current frame road video image and the previous frame road video image.

[0073] Step S8, detecting the feature points in the current frame of the road video image and the feature points in the previous frame of the road video image, and executing step S10.

[0074] Step S9, determining the moving targets, ie, the moving feature points, in the current frame road video image and the previous frame road video image, and executing step S10.

[0075] Step S10, removing motion feature points in the current frame of the road video image to obtain a first group of valid feature points, and removing motion feature points in the previous frame of the road video image to obtain a second group of valid feature points.

[0076] Step S11, performing feature matching of the image according to the first group of valid feature points and the second group of valid feature points.

[0077] Step S12, stitching the images after feature matching to obtain a target reference object stitching image, wherein the target reference object stitching image may be a lane line stitching image.

[0078] Step S13, obtaining the driving trajectory of the vehicle through the target reference object stitching images of two adjacent frames of road video images, that is, obtaining the stitching distance between the two frames of road video images through the target reference object stitching images of two adjacent frames of road video images, stitching the stitching distances between multiple consecutive frames of road video images together to form a driving trajectory, and then obtaining the driving distance of the vehicle according to the driving trajectory.

[0079] Step S14, calculating the driving speed of the vehicle according to the time interval and driving distance of the vehicle in the continuous multiple frames of road video images.

[0080] A second aspect of the present invention provides a vehicle, such as Figure 7 As shown, the vehicle 10 includes at least one processor 1 and a memory 2 communicatively connected to the at least one processor 1 .

[0081] The memory 2 stores a computer program that can be executed by at least one processor 1 , and when the at least one processor 1 executes the computer program, the vehicle speed detection method of the above embodiment is implemented.

[0082] In an embodiment, the vehicle includes a camera and an AI computing system.

[0083] According to the vehicle 10 of the embodiment of the present invention, by adopting the vehicle speed detection method of the above embodiment, the road video image can be analyzed and processed to remove the motion feature points, thereby avoiding interference from moving targets, ensuring the accuracy of vehicle speed detection, and can be used in complex outdoor environments.

[0084] A third aspect of the present invention provides a computer-readable storage medium, wherein a computer program, when executed by a processor, implements the vehicle speed detection method of the above embodiment.

[0085] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.

[0086] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A vehicle speed detection method, characterized in that: include: Acquire road video images; Performing feature point detection on the road video image, and removing motion feature points in the road video image to obtain valid feature points; The driving speed of the vehicle is determined according to the effective feature points.

2. The vehicle speed detection method according to claim 1, characterized in that: Performing feature point detection on the road video image and removing motion feature points in the road video image to obtain valid feature points includes: Performing target reference object detection on the road video image to extract the target reference object area in the road video image, and performing zero processing on the non-target reference object area in the road video image; Feature point detection is performed on the target reference object area, and motion feature points in the target reference object area are removed to obtain valid feature points.

3. The vehicle speed detection method according to claim 2, characterized in that: The target reference object is a lane line, and target reference object detection is performed on the road video image to extract a target reference object area in the road video image, including: Lane line detection is performed on the road video image to extract a lane line area in the road video image.

4. The vehicle speed detection method according to claim 2, characterized in that: The target reference object is a roadside line, and target reference object detection is performed on the road video image to extract the target reference object area in the road video image, including: Roadside line detection is performed on the road video image to extract a roadside line area in the road video image.

5. The vehicle speed detection method according to any one of claims 1 to 4, characterized in that: The road video image includes a continuous previous frame road video image and a current frame road video image, the effective feature points include a first group of effective feature points and a second group of effective feature points, the first group of effective feature points are effective feature points in the previous frame road video image, and the second group of effective feature points are effective feature points in the current frame road video image, and determining the driving speed of the vehicle according to the effective feature points includes: Determine the time interval between two frames of images according to the previous frame of road video image and the current frame of road video image; Determining a travel distance of the vehicle according to the first group of valid feature points and the second group of valid feature points; A travel speed of the vehicle is determined based on the time interval and the travel distance.

6. The vehicle speed detection method according to claim 5, characterized in that: Determining the travel distance of the vehicle according to the first group of valid feature points and the second group of valid feature points includes: Performing feature matching of images according to the first group of valid feature points and the second group of valid feature points, and splicing images after feature matching to obtain a target reference object spliced ​​image; A stitching distance between two frames of images is determined according to the target reference object stitching image, and the stitching distance is used as the driving distance of the vehicle.

7. The vehicle speed detection method according to claim 6, characterized in that: The target reference object includes a left lane line and a right lane line, and determining a stitching distance between two frames of images according to the stitching image of the target reference object includes: Acquire a first positioning point on a left lane line in the target reference object stitched image and a second positioning point on a right lane line in the target reference object stitched image; Acquire a first stitching point and a second stitching point at a stitching position in the target reference object stitching image, wherein the first stitching point and the first positioning point are located on the same straight line, and the second stitching point and the second positioning point are located on the same straight line; Calculating a first length value between the first positioning point and the first splicing point, and calculating a second length value between the second positioning point and the second splicing point; Acquire a first reference point and a second reference point on the bottom edge of the image in the target reference object stitched image, wherein the first reference point and the first positioning point are located on the same straight line, and the second reference point and the second positioning point are located on the same straight line; Calculating a third length value between the first positioning point and the first reference point, and calculating a fourth length value between the second positioning point and the second reference point; performing a difference operation on the third length value and the first length value to obtain a first difference value, and performing a difference operation on the fourth length value and the second length value to obtain a second difference value; A splicing distance between two frames of images is determined according to the first difference and the second difference.

8. The vehicle speed detection method according to claim 7, characterized in that: Determining a splicing distance between two frames of images according to the first difference and the second difference includes: Performing an average operation on the first difference and the second difference to obtain an average result, and using the average result as the splicing distance.

9. A vehicle, characterized in that: include: at least one processor; a memory communicatively coupled to at least one of the processors; Wherein, the memory stores a computer program that can be executed by at least one of the processors, and when at least one of the processors executes the computer program, the vehicle speed detection method according to any one of claims 1 to 8 is implemented.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the vehicle speed detection method according to any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Vehicle speed measurement method based on monitoring video, medium and equipment

    CN120636175A

  • A vehicle speed measurement method based on monitoring video, medium and equipment

    CN120636175B

  • Camera speed measurement method and related device

    CN121878252A

  • A camera speed measurement method and related apparatus

    CN121878252B