Method and device for identifying vehicle position based on video data, equipment and medium

By analyzing the vehicle driving video, a pixel model is generated to identify the vehicle position, solving the problem of vehicle position identification in the area without satellite signal coverage, realizing vehicle position identification in the environment without satellite signal, and reducing calibration costs.

CN120388312APending Publication Date: 2025-07-29QIANFANG JIETONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510272794.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In traffic areas without satellite signals, it is difficult for the prior art to effectively identify the vehicle location, and on-site calibration is high and the risk is high, especially in special scenarios such as tunnels.

Method used

By marking the rear wheel trajectory of the vehicle in the vehicle driving video, the marked video frames and road surface borders within the camera's field of view are generated, the length proportion of pixel points is calculated, and the vehicle position is identified using the pixel model to reduce calibration costs.

Benefits of technology

In the absence of satellite signals and radar wave data, the relative position of the vehicle is accurately identified, reducing calibration costs and avoiding the complexity and risks of on-site calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388312A_ABST
    Figure CN120388312A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for identifying a vehicle position based on video data, equipment and a medium. Comprising the following steps: marking a vehicle rear wheel track in a vehicle driving video to obtain a marked video frame and a road surface frame in the view field of a camera; calculating a length ratio of a current pixel point based on the marked video frame; traversing each row of pixels in the pavement frame range to generate a pixel model; querying the pixel model based on a to-be-identified vehicle position pixel point to obtain a row pixel where a vehicle is located; and calculating the distance from the position of the vehicle to the top point of the lower right corner of the road surface frame based on the pixel of the line where the vehicle is located and the length ratio of the pixel point between the current pixel point and the top point of the lower right corner of the road surface frame. According to the vehicle identification method provided by the embodiment of the invention, the vehicle is combined with the video map for remote calibration, the calibration input cost is greatly reduced, and the relative position of the vehicle in a state without satellite signals and radar wave data is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent transportation technologies, and more specifically, to a method, apparatus, device, and medium for identifying vehicle positions based on video data. Background Art

[0002] In modern traffic monitoring systems, with the continuous increase in the number of vehicles, automated and efficient vehicle identification technologies have become crucial.

[0003] However, due to the complex terrain in China, there are some traffic areas without satellite signal coverage. It is difficult to obtain the positions of vehicles in such areas, and a method based on image recognition for vehicle position is required. The current solutions of this method need to calibrate the on-site roads by professional personnel using professional tools. However, in special scenarios such as tunnels, there are disadvantages such as calibration risks and high investment. Summary of the Invention

[0004] Embodiments of this application provide a method, apparatus, device, and storage medium for identifying vehicle positions based on video data, so as to at least solve the technical problem in the related art that it is difficult to identify vehicle positions in areas without satellite signal coverage.

[0005] According to one aspect of the embodiments of this application, a method for identifying vehicle positions based on video data is provided, including:

[0006] Marking the vehicle rear-wheel trajectory in the vehicle driving video to obtain the marked video frames and the road surface border within the camera's field of view;

[0007] Calculating the length ratio of the current pixel point based on the marked video frames;

[0008] Traversing each row of pixels within the range of the road surface border to generate a pixel model;

[0009] Querying the pixel model based on the pixel points of the vehicle position to be identified to obtain the pixels of the row where the vehicle is located; calculating the distance between the vehicle position and the lower-right vertex of the road surface border based on the pixels of the row where the vehicle is located and the length ratio of the pixel points between the current pixel point and the lower-right vertex of the road surface border.

[0010] According to another aspect of the embodiments of this application, an apparatus for identifying vehicle positions based on video data is further provided, including:

[0011] A calibration module for marking the vehicle rear-wheel trajectory in the vehicle driving video to obtain the marked video frames and the road surface border within the camera's field of view;

[0012] A calculation module for calculating the length ratio of the current pixel point based on the marked video frames;

[0013] A statistical module for traversing each row of pixels within the range of the road border to generate a pixel model.

[0014] An identification module for querying the pixel model based on the pixel points of the vehicle position to be identified to obtain the pixels of the row where the vehicle is located, and calculating the distance of the vehicle position from the lower right corner vertex of the road border based on the ratio of the length of the pixels between the pixels of the row where the vehicle is located and the pixel points to the lower right corner vertex of the road border.

[0015] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the method for identifying the vehicle position based on video data through the computer program.

[0016] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the method for identifying the vehicle position based on video data when running.

[0017] The technical solution provided by the embodiments of the present application may include the following beneficial effects:

[0018] The vehicle identification method provided by the embodiments of the present application obtains vehicle driving video data, marks the trajectory of the rear wheels of the vehicle in the vehicle driving video to obtain the marked video frames and the road border within the camera's field of view; performs analysis and calculation based on the marked video frames, and through the trajectory of the driving vehicle, performs fitting analysis to obtain the distance of the vehicle from the lower right corner of the calibration frame. The vehicle identification method provided by the embodiments of the present application does not require using professional tools to calibrate the on-site road. It remotely calibrates using vehicle driving video data and road basic data, constructs a pixel model of the target road, queries the model based on the pixel points of the vehicle position to be identified to obtain the pixels of the row where the vehicle is located, and based on the ratio of the length of the pixels in this row, the relative position of the vehicle can be obtained in the state without satellite signal and radar wave data. On the premise of ensuring data accuracy, the calibration cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0020] Figure 1 is a flowchart of an optional method for identifying the vehicle position based on video data according to the embodiments of the present application;

[0021] Figure 2 is a schematic diagram of a marked video frame shown according to the embodiments of the present application;

[0022] Figure 3 It is a schematic diagram of a marked road surface border shown according to an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a marked video frame shown according to an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of vertices of a marked road surface border shown according to an embodiment of the present application;

[0025] Figure 6 It is a schematic diagram of a pixel model shown according to an embodiment of the present application;

[0026] Figure 7 It is a schematic diagram of a trigonometric function calculation method shown according to an embodiment of the present application;

[0027] Figure 8 It is a schematic diagram of a calculation method shown according to an embodiment of the present application;

[0028] Figure 9 It is a schematic diagram of a calculation method shown according to an embodiment of the present application;

[0029] Figure 10 It is a schematic diagram of a calculation method shown according to an embodiment of the present application;

[0030] Figure 11 It is a schematic diagram of a calculation method shown according to an embodiment of the present application;

[0031] Figure 12 It is a schematic diagram of a calculation method shown according to an embodiment of the present application;

[0032] Figure 13 It is a schematic diagram of a device for identifying the position of a vehicle based on video data shown according to an embodiment of the present application;

[0033] Figure 14 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0035] It should be noted that the terms "first", "second", etc. in the description, claims and the above drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0036] The following will Figure 1-12 introduce in detail the method for identifying the vehicle position based on video data in the embodiments of this application. It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principle of this application, and the embodiments of this application are not limited in this regard. On the contrary, the embodiments of this application can be applied to any applicable scenario.

[0037] As Figure 1 shown, the method mainly includes the following steps:

[0038] S101 Mark the trajectory of the rear wheels of the vehicle in the vehicle driving video to obtain the annotated video frames and the road border within the camera's field of view.

[0039] In one implementation scenario, the vehicle is driving in a tunnel where satellite signals are poor and it is difficult to calibrate the road manually. Therefore, the vehicle position is identified based on the video calibration method.

[0040] First, capture the vehicle driving video data. The vehicle is driving on the road at a constant speed without changing lanes, and the vehicle driving video is captured by a camera installed beside the road.

[0041] Furthermore, obtain a preset number of vehicle driving video frames within the current camera's field of view. According to the obtained video stream data of the vehicle participating in the calculation, parse the video stream through opencv, take 1 frame as the minimum unit, cut the video, and output the set of frames from when the vehicle completely enters the camera's field of view to when it approaches a preset distance. In one implementation manner of this application, the recognition range of the camera is 150 meters. Therefore, 150 meters is selected as the reference value. Output the set of frames from when the vehicle completely enters the camera's field of view to when it approaches 150 meters.

[0042] Further, connect the intersection points of the rear tires of the vehicle with the ground in each video frame to obtain the annotated video frames. Use annotation software to import the set of cut video frames. Connect the intersection points of the rear tires of the vehicle with the ground for each frame within 1 second. Save the output label feature text file.

[0043] Further, based on the annotated video frames, obtain the road surface border within the camera's field of view.

[0044] Specifically, extend the connection line annotated in the first video frame when the vehicle enters the camera's field of view to obtain the first intersection point and the second intersection point of the extension line with the road curb. Extend the connection line annotated in the last video frame when the vehicle enters the camera's field of view to obtain the third intersection point and the fourth intersection point of the extension line with the road curb; annotate the road surface border based on the first intersection point, the second intersection point, the third intersection point, and the fourth intersection point.

[0045] As Figure 4 shown, connecting the intersection points of the two rear tires with the ground can obtain a line segment, and extending this line segment can intersect with both sides of the road.

[0046] In one implementation, after obtaining the annotated video frames and the road surface border within the camera's field of view, it further includes: determining the lower left vertex and the lower right vertex of the road surface border based on the algorithm that the slopes of the same line segment are the same.

[0047] In one implementation, A1(x1,y1) is the lower left vertex of the road surface border, and B1(x2,y2) is the lower right vertex of the road surface border.

[0048] The modulus of the line segment vector B1A1 = the square root of ((x1 - x2)^2 + (y1 - y2)^2);

[0049] The unit vector of the line segment B1A1 = ((x1 - x2) / the modulus of the line segment vector B1A1, (y1 - y2) / the modulus of the line segment vector B1A1). The step value is set to 1, indicating the pixel distance moved each time on the extension line.

[0050] The x coordinate of the next point = x1 + the first column of the unit vector of the line segment B1A1 * the step value;

[0051] The y coordinate of the next point = y1 + the second column of the unit vector of the line segment B1A1 * the step value;

[0052] Repeating the above steps, the coordinates of the lower left vertex and the lower right vertex within 150 meters of the road surface can be obtained. Since 150 meters is an actual distance, this distance needs to be converted into pixel values according to the resolution and angle of the camera to determine how many points need to be calculated.

[0053] Through the above steps, the coordinates of the lower left vertex and the lower right vertex within 150 meters of the road surface can be accurately calculated. This method utilizes the properties of line segment vectors and unit vectors, and determines the points on the extension line through the step value, thereby obtaining the required vertex coordinates.

[0054] Furthermore, calculate the length proportion of pixel points per second. According to the length proportion of pixel points, calculate the position of the last pixel point at the preset length as the upper right vertex; according to the parallel line theorem of the top border and the bottom border, the intersection point of the extension line of the upper right vertex and the left border is the upper left vertex.

[0055] According to the method for determining the length proportion of pixel points, by calculating the length proportion of pixel points per second, after obtaining the proportion, since the traveling distance of the vehicle per second is equal, calculating the position of the last pixel point at 150 meters is the upper right point. According to the parallel line theorem of the top border and the bottom border, calculate the intersection point of the upper right point and the left border as the position of the upper left point.

[0056] As Figure 3 shown, it is a schematic diagram of a marked road surface border shown according to an embodiment of the present application. A rectangular border can be obtained.

[0057] As Figure 5 shown, A1 is the lower left vertex of the road surface border, B1 is the lower right vertex of the road surface border, A is the upper left vertex of the road surface border, and B is the upper right vertex of the road surface border.

[0058] According to this step, the calibrated road surface border and the vehicle trajectory marked within the road surface border can be obtained.

[0059] S102 Calculate the length proportion of the current pixel point based on the marked video frame.

[0060] In one implementation, calculate the traveling distance of each frame based on the marked video frame; divide the traveling distance of each frame by the number of pixels of the vehicle's rear wheel trajectory in that frame to obtain the depth threshold of each frame; perform linear fitting based on the depth thresholds of multiple frames of images, and determine the length weight of the current pixel point based on the requirements of linear fitting; obtain the length proportion of the current pixel point by multiplying the length weight of the current pixel point by the traveling distance of the current pixel point within 1 second.

[0061] It can be understood that the current pixel point refers to the pixel point where the line connecting the rear wheels extends to the right and intersects the right border of the road, that is, the projection point of the vehicle's rear wheel position on the right border of the road.

[0062] Specifically, calculate the physical distance between adjacent frames, which can be achieved by analyzing the movement direction and speed of pixel points in the image sequence.

[0063] Further, calculate the depth threshold for each frame by dividing the driving distance of each frame by the number of pixels of the vehicle's rear-wheel trajectory in that frame, obtaining the depth threshold for each frame. The depth threshold can reflect the actual depth (distance) represented by a single pixel in the image of that frame.

[0064] As Figure 2 shown, by marking the rear-wheel trajectory of the vehicle, it can be seen that the depth thresholds of the images are different. The farther the vehicle moves forward, the greater the actual distance represented by a single pixel.

[0065] Further, collect the depth thresholds of multiple frames of images, and construct a set of data points with the frame number as the independent variable and the depth threshold as the dependent variable.

[0066] Further, use a linear fitting method (such as the least squares method) to fit these data points to obtain a linear model. This linear model can represent the linear relationship between the depth threshold and the frame number.

[0067] Further, determine the length weight of the current pixel point. The length weight calculation: According to the result of the linear fitting, determine the length weight of the current pixel point. The length weight can be understood as the proportion or importance of the actual length represented by the pixel point in the overall length in different frames.

[0068] The current pixel length weight = initial value + (1 - initial value) * (the current pixel coordinate / the total number of pixels of the right border) ^ 2. In some embodiments, the initial value is taken as 0.0001.

[0069] Further, based on the product of the length weight of the current pixel point and the travel distance of the current pixel point within 1 second, obtain the length proportion of the current pixel point.

[0070] Through the above steps, the length proportion of the distance traveled by the current pixel point in 1s can be accurately calculated. This method utilizes linear fitting and the length weight of pixel points, and can adjust the corresponding parameters according to the depth threshold ratio to meet the requirements of linear fitting. This provides important information for more accurately understanding and processing the object motion and spatial relationship in video images.

[0071] S103 Traverse each row of pixels within the road surface border range to generate a pixel model.

[0072] In one implementation, traverse each row of pixels within the road surface border range, count the number of row pixels, the coordinates of each pixel point, and the corresponding row number to generate a pixel model.

[0073] In one implementation, each row of pixels of the road border is traversed to calculate the pixel points of each row; the number of row pixels is counted, and the coordinates of each pixel point are recorded; a pixel model is generated based on the number of row pixels, the coordinates of each pixel point, and the corresponding row number.

[0074] Specifically, an empty list or array is created to store the pixel point information of each row. The pixel points of each row are calculated from the upper left to the lower right, the number of pixel points in each row is counted, and the coordinates (x, y) of each pixel point in that row and the corresponding row number are recorded one by one. Index represents the row number where the pixel point is located. The pixel point data of each row is stored in the pixel model.

[0075] Figure 6 It is a schematic diagram of a pixel model shown according to an embodiment of the present application; as Figure 6 shown, a list can be used to record the pixel point coordinates (x, y) and the row number Index where the pixel point is located.

[0076] S104 Based on the pixel points of the vehicle position to be recognized, query the pixel model to obtain the row pixels where the vehicle is located; based on the row pixels where the vehicle is located and the length ratio of the pixel points between the current pixel point and the lower right vertex of the road border, calculate the distance between the vehicle position and the lower right vertex of the road border.

[0077] In one embodiment, first, the pixel points of the vehicle center position are obtained. The previously generated pixel model is loaded, and this model contains the pixel point information of each row, including the row number, the coordinates of each pixel point, etc. According to the pixel points of the vehicle center position, the corresponding row number is found. The list of row pixel points corresponding to the calculated row number is extracted from the pixel model. This list contains the coordinates of all pixel points in that row. The coordinates of all pixel points in that row are recorded, and these coordinates will be used for subsequent analysis and calculation.

[0078] Furthermore, based on the actual width of the road border, the number of pixel points between the vehicle center pixel point and the right road border pixel point, and the total number of pixel points in the pixel row where the vehicle center pixel point is located, calculate the length of the first right-angled side.

[0079] The length of the first right-angled side w = road_weight * (w_count_center / w_count_all). road_weight: the actual physical width of the tunnel road surface, w_count_center: the number of pixel points between the vehicle center pixel point and the right road border pixel point, w_count_all: the total number of pixel points in the pixel row of the vehicle center pixel point in the picture.

[0080] As Figure 8 shown, road_weight represents the road width. As Figure 10As described above, the number of pixel points w_count_center from the vehicle center pixel point to the right border pixel point of the road is shown. As Figure 11 shown, the total number of pixel points w_count_all in the pixel row of the picture where the vehicle center pixel point is located is shown.

[0081] By summing the products of each pixel point within the length range from the vehicle center pixel point to the bottom border and its pixel length ratio, the second right-angled side length is obtained.

[0082] The second right-angled side length h = a1 * length ratio + a2 * length ratio … + an * length ratio; where a1 to an represent each pixel point within the length range from the vehicle center pixel point to the bottom border.

[0083] As Figure 12 shown, h is the length from the vehicle center pixel point to the bottom border, a1 is the first pixel point within this length range, a2 is the second pixel point, and an is the last pixel point. Multiply each pixel point by the corresponding length ratio and then sum to obtain the length of h.

[0084] Based on the first right-angled side length and the second right-angled side length, using the trigonometric function algorithm and applying the Pythagorean theorem, the distance from the vehicle center point to the lower right vertex of the road surface border is obtained.

[0085] As Figure 9 shown, the distance from the vehicle center point to the right border is a straight line, the right border is a straight line, and the distance from the vehicle center point to the lower right vertex is a hypotenuse. A right triangle can be formed. As Figure 7 is a schematic diagram of the formed right triangle, w is one right-angled side, h is one right-angled side, and h is the hypotenuse. Applying the Pythagorean theorem can calculate the distance from the vehicle center point to the lower right vertex of the road surface border.

[0086] The vehicle recognition method provided by the embodiments of the present application does not require using professional tools to calibrate the on-site road. By using the vehicle combined with the video map for remote calibration, the relative position of the vehicle in the state without satellite signal and radar wave data can be obtained. On the premise of ensuring data accuracy, the calibration cost is reduced.

[0087] According to another aspect of the embodiments of the present application, there is also provided a device for recognizing the vehicle position based on video data for implementing the above method for recognizing the vehicle position based on video data. As Figure 13 shown, the device includes:

[0088] A calibration module 201, configured to mark the vehicle rear-wheel trajectory in the vehicle driving video to obtain the marked video frame and the road surface border within the camera field of view;

[0089] A calculation module 202, configured to calculate the length proportion of the current pixel point based on the annotated video frames;

[0090] A statistics module 203, configured to traverse each row of pixels within the road surface border range to generate a pixel model;

[0091] An identification module 204, configured to query the pixel model based on the pixel points of the vehicle position to be identified to obtain the pixels of the row where the vehicle is located; and calculate the distance between the vehicle position and the lower right corner vertex of the road surface border based on the pixels of the row where the vehicle is located and the length proportion of the pixel points between the current pixel point and the lower right corner vertex of the road surface border.

[0092] It should be noted that when the device for identifying the vehicle position based on video data provided in the above embodiments executes the method for identifying the vehicle position based on video data, only the division of the above functional modules is used for illustration. In practical applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for identifying the vehicle position based on video data provided in the above embodiments and the method embodiments for identifying the vehicle position based on video data belong to the same concept. The implementation process is shown in detail in the method embodiments and will not be repeated here.

[0093] According to another aspect of the embodiments of the present application, an electronic device corresponding to the method for identifying the vehicle position based on video data provided in the foregoing embodiments is further provided to execute the method for identifying the vehicle position based on video data.

[0094] Please refer to Figure 14 , which shows a schematic diagram of an electronic device provided in some embodiments of the present application. As Figure 14 shown, the electronic device includes: a processor 300, a memory 301, a bus 302, and a communication interface 303. The processor 300, the communication interface 303, and the memory 301 are connected through the bus 302; a computer program that can run on the processor 300 is stored in the memory 301, and when the processor 300 runs the computer program, it executes the method for identifying the vehicle position based on video data provided in any one of the foregoing embodiments of the present application.

[0095] Among them, the memory 301 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 303 (which can be wired or wireless), the communication connection between the system network element and at least one other network element is realized, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0096] The bus 302 can be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 301 is used to store programs. After receiving an execution instruction, the processor 300 executes the program. Any implementation manner of the method for identifying the vehicle position based on video data disclosed in any implementation manner of the embodiments of the present application can be applied to the processor 300 or implemented by the processor 300.

[0097] The processor 300 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 300 or the instructions in the form of software. The above-mentioned processor 300 can be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 301, and the processor 300 reads the information in the memory 301 and combines its hardware to complete the steps of the above method.

[0098] The electronic device provided by the embodiments of the present application and the method for identifying the vehicle position based on video data provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run, or implemented by it.

[0099] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium corresponding to the method for identifying the vehicle position based on video data provided in the foregoing embodiments. A computer program (i.e., a program product) is stored thereon. When the computer program is run by a processor, it will execute the method for identifying the vehicle position based on video data provided in any of the foregoing embodiments.

[0100] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical and magnetic storage media, which will not be elaborated here one by one.

[0101] The computer-readable storage medium provided by the above embodiments of the present application and the method for identifying the vehicle position based on video data provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by the application programs stored therein.

[0102] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0103] The above embodiments only represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed. However, it should not be construed as a limitation to the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the inventive concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims

1. A method for identifying the position of a vehicle based on video data, characterized in that Including: Mark the rear-wheel trajectory of the vehicle in the vehicle driving video to obtain the marked video frames and the road surface border within the camera's field of view; Calculate the length ratio of the current pixel point based on the marked video frames; Traverse each row of pixels within the range of the road surface border to generate a pixel model; Query the pixel model based on the pixel points of the vehicle position to be recognized to obtain the pixels of the row where the vehicle is located; Calculate the distance between the vehicle position and the lower right vertex of the road surface border based on the pixels of the row where the vehicle is located and the length ratio of the pixel points between the current pixel point and the lower right vertex of the road surface border.

2. The method according to claim 1, wherein Mark the rear-wheel trajectory of the vehicle in the vehicle driving video to obtain the marked video frames, including: Obtain a preset number of vehicle driving video frames within the current camera's field of view; Connect the intersection points of the rear tires of the vehicle and the ground in each video frame to obtain the marked video frames.

3. The method according to claim 2, characterized in that, Obtain the road surface border within the camera's field of view, including: Extend the marked connection line in the first video frame when the vehicle enters the camera's field of view to obtain the first intersection point and the second intersection point of the extension line and the road edge; Extend the marked connection line in the last video frame when the vehicle enters the camera's field of view to obtain the third intersection point and the fourth intersection point of the extension line and the road edge; Mark the road surface border based on the first intersection point, the second intersection point, the third intersection point, and the fourth intersection point.

4. The method according to claim 1, wherein Calculate the length ratio of the current pixel point based on the marked video frames, including: Calculate the driving distance of each frame based on the marked video frames; Divide the driving distance of each frame by the number of pixels of the rear-wheel trajectory in that frame to obtain the depth threshold of each frame; Perform linear fitting based on the depth thresholds of multiple frames of images and determine the length weight of the current pixel point based on the requirements of linear fitting; Obtain the length ratio of the current pixel point based on the product of the length weight of the current pixel point and the distance traveled by the current pixel in 1 second.

5. The method according to claim 1, characterized in that Traverse each row of pixels within the range of the road surface border to generate a pixel model, including: Traverse each row of pixels of the road surface border and calculate the pixel points of each row; Count the number of row pixels and record the coordinates of each pixel point; Generate the pixel model based on the number of row pixels, the coordinates of each pixel point, and the corresponding row number.

6. The method according to claim 1, wherein Calculate the distance between the vehicle position and the lower right vertex of the road surface border based on the pixels of the row where the vehicle is located and the length ratio of the pixel points between the current pixel point and the lower right vertex of the road surface border, including: Calculate the length of the first right-angled side based on the actual width of the road surface border, the number of pixel points from the vehicle center pixel point to the right border of the road, and the total number of pixel points in the pixel row where the vehicle center pixel point is located; Sum the products of each pixel point within the length range from the vehicle center pixel point to the bottom border and its pixel length ratio to obtain the length of the second right-angled side; Use the trigonometric algorithm based on the length of the first right-angled side and the length of the second right-angled side to obtain the distance between the vehicle center point and the lower right vertex of the road surface border.

7. The method according to claim 1, characterized in that, After obtaining the marked video frames and the road surface border within the camera's field of view, it further includes: Determine the lower left vertex and the lower right vertex of the road surface border based on the algorithm that the slopes of the same line segment are the same; Calculate the position of the last pixel at the preset length as the upper right vertex according to the pixel length ratio. According to the parallel line theorem of the top border and the bottom border, the intersection point of the extension line of the upper right vertex and the left border is the upper left vertex.

8. A device for identifying the position of a vehicle based on video data, characterized in that, It includes: A calibration module for marking the vehicle rear wheel trajectory in the vehicle driving video to obtain the marked video frame and the road surface border within the camera's field of view. A calculation module for calculating the length ratio of the current pixel based on the marked video frame. A statistics module for traversing each row of pixels within the road surface border range to generate a pixel model. An identification module for querying the pixel model based on the pixel points of the vehicle position to be identified to obtain the pixels of the row where the vehicle is located. Calculate the distance between the vehicle position and the lower right vertex of the road surface border based on the pixels of the row where the vehicle is located and the length ratio of the pixel points between the current pixel point and the lower right vertex of the road surface border.

9. An electronic device, characterized in that, It includes a processor and a memory storing program instructions, and the processor is configured to execute the method for identifying the vehicle position based on video data according to any one of claims 1 to 7 when executing the program instructions.

10. A computer-readable medium, characterized in that, Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by the processor to implement a method for identifying the vehicle position based on video data according to any one of claims 1 to 7.