A method, device, computer storage medium and terminal for determining vehicle speed
By converting image coordinates into actual coordinates, determining the lane line expression, and calculating vehicle displacement, the problem of high equipment cost and difficulty in balancing accuracy in vehicle speed calculation in existing technologies is solved, achieving efficient and accurate vehicle speed determination.
Patent Information
- Application Number
- CN202211441334.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-11-17
AI Technical Summary
Existing vehicle speed measurement methods suffer from high equipment setup and maintenance costs, and difficulty in balancing calculation time and accuracy, making it impossible to achieve accurate vehicle speed calculation without the need for additional equipment.
By converting the image coordinate information of the target vehicle into actual coordinate information, the lane line expression is determined, and the vehicle's displacement and speed are calculated based on the lane line and actual coordinate information. The vehicle speed is then calculated using existing image acquisition devices.
It achieves accurate vehicle speed calculation without the need for additional equipment, reducing equipment deployment and maintenance costs, and can still accurately track vehicles even in heavy traffic and obstructed conditions.
Smart Images

Figure CN115862345B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present document relates to, but is not limited to, traffic monitoring technology, in particular to a method and device for determining vehicle speed, a computer storage medium and a terminal. BACKGROUND
[0002] With the continuous growth of the number of vehicles in China, the huge vehicles have brought traffic accidents, low traffic efficiency, traffic congestion and other problems. In addition to municipal infrastructure, controlling the road network through traffic flow on the road has become a choice for traffic management departments. Accurate traffic flow prediction including vehicle speed measurement and vehicle statistics can provide strong traffic decision basis for traffic managers, and also can allow drivers to choose a more open road for travel, thereby avoiding or alleviating traffic congestion.
[0003] The common vehicle speed measurement method in the related art, such as ground inductor speed measurement and radar speed measurement, cannot use the already large number of fixed monitoring cameras, needs to rebuild infrastructure and cannot detect stationary vehicles, and can only calculate the local speed by the interval time of the vehicle reaching two monitoring points. The former is greatly affected by the ground conditions, and like radar speed measurement, cannot record the driving track and also needs a camera to capture the license plate number for subsequent processing. In the vehicle speed measurement technology based on visible light vision, the method based on lane line information to estimate displacement cannot avoid the disadvantages of manual measurement of related distances on the road segment where each camera is located, and must save the real distance corresponding to each pixel point in the monitoring data for speed measurement, which has high calculation cost.
[0004] In summary, the scheme for obtaining vehicle speed in the related art has problems such as high cost of device construction and maintenance, difficulty in balancing calculation time and precision, and the like. How to effectively analyze the vehicle speed has become a problem to be solved. SUMMARY
[0005] The following is a summary of the subject matter described in detail in this document. This summary is not intended to limit the scope of protection of the claims.
[0006] The embodiment of the present application provides a method, device, computer storage medium and terminal for determining vehicle speed, which can realize vehicle speed calculation meeting the accuracy requirement through limited calculation without additional device construction.
[0007] The embodiment of the present application provides a method for determining vehicle speed, comprising:
[0008] transforming the first image coordinate information of the initial position and the second image coordinate information of the current position of the target vehicle into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position;
[0009] determining a lane line expression of each lane line in the driving lane of the target vehicle;
[0010] determining a lane line closest to the target vehicle according to the lane line expression of each lane line and the second actual coordinate information;
[0011] determining a displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information and the lane line expression of the lane line closest to the target vehicle;
[0012] determining a vehicle speed according to the determined displacement and a driving time length of the target vehicle;
[0013] wherein the initial position is a position where the target vehicle is tracked for the first time, and the current position is a latest position where the target vehicle is tracked.
[0014] In another aspect, the embodiment of the present application further provides a computer storage medium, wherein a computer program is stored in the computer storage medium, and the computer program is executed by a processor to implement the method for determining the vehicle speed.
[0015] In still another aspect, the embodiment of the present application further provides a terminal, comprising a memory and a processor, wherein the memory stores a computer program;
[0016] the processor is configured to execute the computer program in the memory;
[0017] the computer program is executed by the processor to implement the method for determining the vehicle speed.
[0018] In yet another aspect, the embodiment of the present application further provides a device for determining a vehicle speed, comprising:
[0019] a coordinate conversion unit, a lane line expression determination unit, a lane line determination unit, a displacement calculation unit and a vehicle speed calculation unit, wherein
[0020] the coordinate conversion unit is configured to convert first image coordinate information of an initial position of a target vehicle and second image coordinate information of a current position into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position;
[0021] the lane line expression determination unit is configured to determine a lane line expression of each lane line in a driving lane of the target vehicle;
[0022] the lane line determination unit is configured to determine a lane line closest to the target vehicle according to the lane line expression of each lane line and the second actual coordinate information;
[0023] the displacement calculation unit is configured to determine a displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information and the lane line expression of the lane line closest to the target vehicle.
[0024] The computing vehicle speed unit is configured to determine the vehicle speed according to the determined displacement and the driving time length of the target vehicle.
[0025] The initial position is the position at which the target vehicle is tracked for the first time, and the current position is the latest position at which the target vehicle is tracked. The technical scheme of the present application comprises: transforming first image coordinate information of an initial position of the target vehicle and second image coordinate information of a current position into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position; determining a lane line expression of each lane line in a driving lane of the target vehicle; determining a lane line closest to the target vehicle according to the determined lane line expression of each lane line and the second actual coordinate information; determining the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information, and the lane line expression of the lane line closest to the target vehicle; and determining the vehicle speed according to the determined displacement and the driving time length of the target vehicle. The initial position is the position at which the target vehicle is tracked for the first time, and the current position is the latest position at which the target vehicle is tracked. The embodiment of the present application realizes the vehicle speed calculation meeting the accuracy requirement through limited calculation without additional equipment.
[0026] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by means of the structures particularly pointed out in the description, the claims and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0027] The accompanying drawings are included to provide a further understanding of the technical scheme of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical scheme of the present application, and do not constitute a limitation on the technical scheme of the present application.
[0028] Figure 1 The flowchart of the method for determining the vehicle speed of the embodiment of the present application;
[0029] Figure 2 The schematic diagram of the perspective conversion processing of the embodiment of the present application;
[0030] Figure 3 The structural block diagram of the device for determining the vehicle speed of the embodiment of the present application;
[0031] Figure 4 The flowchart of the method for determining the lane line expression of the application example;
[0032] Figure 5 The schematic diagram of the image read by the application example of the present application;
[0033] Figure 6 A schematic diagram for applying an example bird's eye view of the present application;
[0034] Figure 7 A schematic diagram for applying a fitting effect of example lane lines of the present application;
[0035] Figure 8 A flowchart for applying an example vehicle speed determination of the present application. DETAILED DESCRIPTION
[0036] To make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be explained that the embodiments in the present application and the features in the embodiments can be combined with each other in any manner without conflict.
[0037] The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Moreover, although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0038] The embodiments of the present application calculate and process the vehicle speed of each image acquisition device of the monitored vehicle based on the subsequent vehicle speed determination method respectively, the data of the target vehicle acquired by each image acquisition device is independent of each other, and the conversion matrix of each image acquisition device is also independent of each other. To facilitate understanding of the embodiments of the present application, the determination of the conversion matrix will be described by way of example below.
[0039] The embodiments of the present application determine the conversion matrix through a perspective transformation model, and the region of interest (Region Of Interest) of the perspective transformation model is limited to the lane part; after the embodiments of the present application set the image coordinate system and the actual coordinate system (real world coordinate system) according to the related art, a point of the lane in the image is taken, which is assumed to be a random point (x, y) T , the homogeneous coordinates of the point are taken (x, y, 1) T (taking the homogeneous coordinates is to facilitate matrix operation), the actual coordinates in the real world are (U', V') T , the homogeneous coordinates are (U, V, W) T , W≠0, W is a constant, and the corresponding relationship is:
[0040] U’=U / W
[0041] V’=V / W
[0042] The perspective conversion operation on the random point is as follows:
[0043]
[0044] Wherein, H is a conversion matrix, which converts random points taken from the image into actual coordinates in the real world, and its format is as follows:
[0045]
[0046] Wherein, A 2×2 represents an affine transformation parameter, T 2×1 represents a translation transformation parameter, V T represents the relationship of the intersection points of the edges after transformation, and s is a scaling factor; in an exemplary example, s is set to 1 after normalization.
[0047] The above equation can be expanded as follows:
[0048] U=a 11 x+a 12 y+t x
[0049] V=a 21 x+a 22 y+t y
[0050] W=v1x+v2y+1
[0051] Then the actual coordinates can be written as:
[0052]
[0053]
[0054] Based on the above formula, the conversion matrix contains 8 unknown parameters, and two sets of coordinates of 4 points are needed for calculation, that is, the image coordinates of 4 points in the image coordinate system need to be determined in advance, and the actual coordinates of the four image coordinates can be calculated. In an exemplary example, the embodiment of the present application determines the conversion matrix by selecting 4 points on the lane line in the image collected by the image collection device, determining the actual coordinates of the 4 points according to the national highway lane line standard specification, and solving the conversion matrix.
[0055] Figure 1 The flow chart of the method for determining the speed of the embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 1
[0056] Step 101, transforming the first image coordinate information of the initial position of the target vehicle and the second image coordinate information of the current position into the first actual coordinate information of the initial position and the second actual coordinate information of the current position;
[0057] Step 102, determining the lane line expression of each lane line in the driving lane of the target vehicle;
[0058] In an example embodiment, the lane line expression is obtained by the following process: perspective conversion is performed on the image collected by the image collection device to obtain an effect drawing of the lane in which the target vehicle travels, i.e., a bird's eye view, and the perspective conversion is shown in Figure 2 The lane lines are labeled on the obtained effect drawing, and the lane line expression of each lane line contained in the image is determined.
[0059] Step 103, determining the lane line closest to the target vehicle according to the lane line expression of each lane line determined and the second actual coordinate information.
[0060] Step 104, determining the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information, and the lane line expression of the lane line closest to the target vehicle.
[0061] Step 105, determining the vehicle speed according to the determined displacement and the driving time length of the target vehicle.
[0062] The initial position is the position at which the target vehicle is tracked for the first time, and the current position is the latest position at which the target vehicle is tracked.
[0063] The example embodiment of the present application achieves the calculation of the vehicle speed meeting the accuracy requirement through limited calculation without additional equipment.
[0064] In an example embodiment, the first image coordinate information of the initial position and the second image coordinate information of the current position of the target vehicle are converted into the corresponding first actual coordinate information of the initial position and the second actual coordinate information of the current position, including:
[0065] The first image coordinate information and the second image coordinate information are converted into the corresponding first actual coordinate information and the second actual coordinate information through a pre-determined conversion matrix.
[0066] The conversion matrix is a matrix for converting the image coordinate into the actual coordinate.
[0067] In an example embodiment, the example embodiment of the present application determines the lane line expression of each lane line in the driving lane of the target vehicle, including:
[0068] The first image coordinate information and the second image coordinate information are converted into the corresponding first actual coordinate information and the second actual coordinate information through a pre-determined conversion matrix.
[0069] The conversion matrix is a matrix for converting the image coordinate into the actual coordinate.
[0070] In an example embodiment, the first image coordinate information and the second image coordinate information in the example embodiment of the present application include:
[0071] After the image containing the target vehicle is collected by the preset image collection device, the coordinate information recorded when the running track of the target vehicle is tracked by the preset tracker.
[0072] The embodiment of the present application refers to the algorithm including multi-target tracking (tracking by detection), and the tracking of the target vehicle in the image collected by the image collection device is realized by the tracker. For the vehicle in the image, whether the vehicle tracked in the previous is the same target vehicle is determined based on the Hungarian algorithm. Assuming that the image collection device can obtain 60 frames of images per second, the embodiment of the present application refers to the related art that one frame of image is selected every 10 frames of images. Each frame of image selected is obtained by the multi-target tracking algorithm, and the Hungarian algorithm is used for matching. The minimum distance between the target vehicle in the frame of image and all the vehicles contained in the frame of image located in front of the frame of image in 60 frames of images is obtained. If the minimum distance is less than the vehicle speed recorded by the tracker, the target vehicle and the vehicle with the minimum distance are the matching vehicles. If the minimum distance is greater than or equal to the speed recorded by the tracker, the vehicle is a new target vehicle tracked, and the vehicle is tracked by the new tracker by referring to the multi-target tracking algorithm.
[0073] In an exemplary example, the first image coordinate and the second image coordinate can be the coordinates of a point on a detection box below a point of the detection box (for example, the point at the lower left corner of the detection box) when the target vehicle is tracked, and the tracker does not select the center point of the detection box. The corresponding actual coordinate can be determined by performing a perspective conversion operation on the point based on the conversion matrix.
[0074] In an exemplary example, the embodiment of the present application determines the lane line closest to the target vehicle by the following formula:
[0075]
[0076] wherein, X k | y represents the longitudinal coordinate in the second actual coordinate information, X k | x represents the transverse coordinate in the second actual coordinate information, j represents the serial number for distinguishing the lane line, j * represents the serial number of the lane line closest to the target vehicle, for determining the serial number of the lane line closest to the target vehicle.
[0077] In an exemplary example, the embodiment of the present application determines the displacement of the target vehicle, comprising:
[0078] According to the lane line expression of the lane line closest to the target vehicle, the length of the lane line closest to the target vehicle from the longitudinal coordinate in the first actual coordinate information to the longitudinal coordinate in the second actual coordinate information is calculated, and the length is determined as the displacement of the target vehicle.
[0079] In an exemplary instance, the embodiment calculates the length of the lane line closest to the target vehicle from the longitudinal coordinate in the first actual coordinate information to the longitudinal coordinate in the second actual coordinate information, including calculating the length by the following formula:
[0080]
[0081] wherein p represents the longitudinal coordinate in the first actual coordinate information q represents the longitudinal coordinate X in the second actual coordinate information k | y , represents the length of the lane line j * from p to q, O k represents the length.
[0082] In an exemplary instance, when the image coordinates for tracking the target vehicle contain more than three groups, the above-mentioned calculation of the vehicle speed is performed, that is, the tracker records the positions of the target vehicle in the process of movement in addition to the initial position and the current position.
[0083] In an exemplary instance, the embodiment determines the vehicle speed according to the determined displacement and the driving time length of the target vehicle, including calculating the vehicle speed by the following formula: The expression of the vehicle speed is:
[0084]
[0085] wherein represents the vehicle speed, age represents the driving time length of the target vehicle recorded by the tracker, scale represents the multiple of the scaling operation on the distance between the actual coordinates when the conversion matrix is calculated, and FPS represents the frame rate of the image; the embodiment takes the ratio of the driving time length age of the target vehicle to the frame rate FPS as the real driving time, and calculates the real driving speed of the target vehicle based on the real driving time. In an exemplary instance, scale = 10 in the embodiment.
[0086] In an exemplary instance, it is assumed that n t represents the real-time traffic flow, N t represents the total traffic flow since the recording is started (at t = 1 moment), and p trepresenting the average traffic density from the time when the recording is started (t=1 moment) t = N t Embodiments of the present application can determine the above parameters according to the related art; in an exemplary instance, embodiments of the present application can determine the traffic flow parameters according to the real-time traffic flow, the total traffic flow, the average traffic density, and the vehicle speed, etc.
[0087] Embodiments of the present application also provide a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method for determining the vehicle speed.
[0088] Embodiments of the present application also provide a terminal, which comprises a memory and a processor, and the memory stores a computer program; wherein,
[0089] The processor is configured to execute the computer program in the memory;
[0090] The computer program is executed by the processor to implement the above method for determining the vehicle speed.
[0091] Figure 3 The structure block diagram of the device for determining the vehicle speed of embodiments of the present application is shown in FIG. 1, which comprises a conversion coordinate unit, a determination lane line expression unit, a determination lane line unit, a calculation displacement unit, and a calculation vehicle speed unit; wherein, Figure 3
[0092] The conversion coordinate unit is configured to transform the first image coordinate information of the initial position of the target vehicle and the second image coordinate information of the current position into the corresponding first actual coordinate information of the initial position and the second actual coordinate information of the current position;
[0093] The determination lane line expression unit is configured to determine the lane line expression of each lane line in the driving lane of the target vehicle;
[0094] The determination lane line unit is configured to determine the lane line closest to the target vehicle according to the determined lane line expression of each lane line and the second actual coordinate information;
[0095] The calculation displacement unit is configured to determine the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information, and the lane line expression of the lane line closest to the target vehicle;
[0096] The calculation vehicle speed unit is configured to determine the vehicle speed according to the determined displacement and the driving time length of the target vehicle;
[0097] The initial position is the position of the target vehicle first tracked, and the current position is the latest position of the target vehicle tracked.
[0098] In an exemplary embodiment, the coordinate conversion unit of the present application is configured to:
[0099] convert the first image coordinate information and the second image coordinate information into corresponding first actual coordinate information and second actual coordinate information through a predetermined conversion matrix.
[0100] The conversion matrix is a matrix for converting image coordinates into actual coordinates.
[0101] In an exemplary embodiment, the lane line expression determination unit of the present application is configured to:
[0102] determine the lane line expression of each lane line in the driving lane of the target vehicle through a predetermined conversion matrix.
[0103] The conversion matrix is a matrix for converting image coordinates into actual coordinates.
[0104] In an exemplary embodiment, the first image coordinate information and the second image coordinate information of the present application include:
[0105] After the image containing the target vehicle is collected by the pre-set image collection device, the coordinate information recorded when the running track of the target vehicle is tracked by the pre-set tracker.
[0106] In an exemplary embodiment, the lane line determination unit of the present application is configured to determine the lane line closest to the target vehicle through the following formula:
[0107]
[0108] wherein X k | y represents the longitudinal coordinate in the second actual coordinate information, X k | x represents the transverse coordinate in the second actual coordinate information, j represents the serial number for distinguishing the lane lines, j * represents the serial number of the lane line closest to the target vehicle, for determining the serial number of the lane line closest to the target vehicle.
[0109] In an exemplary embodiment, the displacement calculation unit of the present application is configured to:
[0110] According to the lane line expression of the lane line closest to the target vehicle, the length between the longitudinal coordinate in the first actual coordinate information and the longitudinal coordinate in the second actual coordinate information of the lane line closest to the target vehicle is calculated, and the length is determined as the displacement of the target vehicle.
[0111] In an exemplary embodiment, the displacement unit calculates the length between the longitudinal coordinate in the first actual coordinate information and the longitudinal coordinate in the second actual coordinate information of the lane line closest to the target vehicle, including calculating the length by the following formula:
[0112]
[0113] wherein p represents the longitudinal coordinate in the first actual coordinate information q represents the longitudinal coordinate X in the second actual coordinate information k | y , represents the length of the lane line j * from p to q, O k represents the length.
[0114] The following is a brief description of the embodiments of the present application by application examples, which are only used to illustrate the embodiments of the present application and do not limit the protection scope of the present application.
[0115] Application Example
[0116] Figure 4 The flow chart for determining the lane line expression in the application example of the present application is shown in Figure 4 , including:
[0117] Step 401, reading the t-th frame image f t (t=1..T) from the image of the target vehicle monitored for a time T;
[0118] Step 402, selecting four reference points P i (i=1..4) on the t-th frame image and determining the corresponding actual coordinates Q i (i=1..4) of the selected four reference points; in an exemplary embodiment, the application example estimates the corresponding actual coordinates Q i (i=1..4) of the selected four points according to the national highway lane line standard;
[0119] Step 403, obtaining the conversion matrix by the determined four reference points and the corresponding actual coordinates; that is, obtaining the conversion matrix H by P i (i=1..4) and Q i (i=1..4);
[0120] Step 404, performing perspective conversion operation on the image to obtain the bird's eye view f' t (t=1..T) by the conversion matrix H;
[0121] Step 405: Based on the bird's-eye view and transformation matrix, obtain the lane line expressions for each lane line; in an exemplary instance, this embodiment of the invention uses lane line detection or manual annotation to extract the bird's-eye view f'. t The distribution of J lane lines in (t=1..T) is determined, and the lane line expression L for each lane line is obtained by fitting the data. j ,(j=1..J);
[0122] Figure 5 A schematic diagram of an image read as an application example of the present invention, such as... Figure 5 As shown, in the t-th frame image f t (t=1..T) Four reference points are selected. The image coordinate system refers to the upper left corner mark, and the actual coordinate system refers to the lane plane at the middle position. It can be deduced that the image acquisition device has the same shooting depth along the x-axis, meaning that points A, B, and C are at the same distance from the image acquisition device along the lane line in the real world, and the same applies to points D, E, and F. According to national standards, the lane spacing, the length and spacing of dashed lane lines are 3.75 meters, 6 meters, and 9 meters respectively. Therefore, in the real-world coordinate system:
[0123]
[0124]
[0125] Considering the visualization effect of the image, the actual coordinates of the four reference points are set to 250 pixels along the lane line and 5000 pixels perpendicular to the lane line. Each meter is represented by 10 pixels. The bird's-eye view is scaled with scale=10, meaning each converted pixel theoretically represents 0.1 meters. Therefore, the adjusted actual coordinates of the reference points are as follows:
[0126] Q A =(250,5000)
[0127] Q B = (250 + 3.75 × 10, 5000)
[0128] Q C = (250 + 3.75 × 10, 5000 + 6 × 10)
[0129] Q D = (250, 5000 + 6 × 10)
[0130] The corresponding image coordinates are:
[0131] P A =(672,357)
[0132] P B =(828,357)
[0133] P E =(861,419)
[0134] P D =(676,419)
[0135] Based on the image coordinates and actual coordinates of four reference points, the transformation matrix can be obtained as follows:
[0136]
[0137] right Figure 5 By performing a perspective transformation, you can obtain a bird's-eye view from a top-down perspective. Figure 6 Perspective transformation can convert an image from a pixel-based coordinate system to a real-world coordinate system with actual physical meaning. For example, in a bird's-eye view after scaling by 10, each coordinate interval represents 0.1 meters.
[0138] After annotating lane lines or obtaining the lane line pixel distribution using any lane line segmentation method, apply the results in a cubic polynomial format. By fitting the lane line expressions, six lane line expression parameters are obtained, which are sorted from highest to lowest level as follows:
[0139] L1=[2.13628461e-09 -8.58252156e-06 -7.76730734e-02 5.49176860e+02]
[0140] L2=[3.10357039e-09 -1.70590928e-05 -5.91857492e-02 5.85481437e+02]
[0141] L3=[3.75262951e-10 1.17377869e-05 -1.58505319e-01 7.36120971e+02]
[0142] L4=[2.96428079e-09 -1.28551618e-05 -8.42512296e-02 7.00590418e+02]
[0143] L5=[1.63417240e-09 6.42429978e-07 -1.32176339e-01 7.98087983e+02]
[0144] L6=[2.46303507e-09 -7.59787714e-06 -1.08535371e-01 8.19152502e+02]
[0145] Fitted lane lines such as Figure 7 As shown, through Figure 7 It can be seen that the lane line fitting effect is accurate and conforms to the actual distribution of lane lines.
[0146] Figure 8 A flowchart for determining vehicle speed as an application example of the present invention, such as... Figure 8 As shown, it includes:
[0147] Step 801: Read the image f containing the target vehicle. t (t=1..T), Lane line expression L j (j=1..J) and the transformation matrix H;
[0148] Step 802: Obtain the K detection boxes B of the target vehicle at the tracker distance. k ,(k=1..K);
[0149] Step 803: Use the transformation matrix H to transform the detection box B. k Perform a perspective transformation on the lower left corner of the image (k = 1..K) to obtain the actual coordinates X. k ,(k=1..K);
[0150] Step 804: Transform to obtain the actual coordinates X. k ,(k=1..K), and the actual lower left corner coordinate Tr of each tracker at the previous moment. t-1 m (X k The distance between (m=1..M,t=1..T) is used to obtain the matching result G. k ,(k=1..K);
[0151] Step 805: Using the matching result G k (k = 1..K), determine whether the currently detected target vehicle is a newly detected target vehicle;
[0152] Step 806: When the currently detected target vehicle is a newly detected target vehicle, record the actual coordinates of the lower left corner of the target vehicle at various times using a new tracker; when the currently detected target vehicle is an existing target vehicle, record the actual coordinates X... k , (k=1..K) are the actual coordinates of the current position of the existing target vehicle;
[0153] Step 807, calculate the displacement O of the target vehicle with the lane line expression of the lane line closest to the current position of the target vehicle k , (k = 1..K).
[0154] In an exemplary instance, the embodiment of the application calculates the vehicle speed V by O k , (k = 1..K).
[0155] In an exemplary instance, the embodiment of the application calculates the vehicle flow N by O k , (k = 1..K). t , (t = 1..T) and the traffic density p t , (t = 1..T) and the like.
[0156] In an exemplary instance, the embodiment of the application can determine the activity trajectory of the target vehicle based on the coordinates of the actual coordinates of the target vehicle recorded by the tracker at each time .
[0157] The embodiment of the application assumes that in the 669th frame f t , t = 669 image collected by the image collection device, 7 detection boxes B k , k = 1..7 are detected; the application example performs perspective conversion operation on the lower left corner B kcorner of each detection box, and the actual coordinates corresponding to the image coordinates of the lower left corner of the converted detection box are X k = H·B k|corn ; by calculating the distance between the converted coordinates X k of the detection box and the actual coordinates Tr t-1 m (X k ) of the lower left corner of the previous time of the M known trackers, the matching result G k is obtained by matching the K detection boxes with the M known trackers, and after updating the moving trajectory of the target vehicle, the trajectory recorded by the converted coordinates and the trajectory recorded by the coordinates of the lower left corner of the detection box can be visualized for the vehicle running trajectory.
[0158] X k = H·B k|corner matches the predicted lower left actual coordinates Tr t-1 m (X k ) of the mth tracker, and the matching process is roughly as follows:
[0159]
[0160]
[0161] The application example determines X k = H·B k|corner After the second actual coordinate of the current position of the target vehicle is determined, the length of the lane line closest to the target vehicle from the longitudinal coordinate of the first actual coordinate of the initial position of the target vehicle to the longitudinal coordinate of the second actual coordinate of the current position is determined as the displacement of the target vehicle, and the vehicle speed is calculated based on the determined displacement and the driving time length age recorded by the tracker.
[0162] The embodiment of the application can determine the real-time traffic flow by counting the number K (K = n t ) of currently successfully matched trackers, can determine the total traffic flow according to the number M (M = N t ) of all successfully matched trackers at the start of recording, and can calculate the traffic density according to the total traffic flow and the time from the start of recording to the current time.
[0163] The application example only needs to intercept the real-time images collected by the existing image collection device to complete the determination of the speed of the target vehicle and the analysis of the trajectory of the target vehicle, is not disturbed by the road conditions, is simple to deploy, and has low maintenance cost; at the same time, the vehicle tracking can still be accurately and efficiently realized under the conditions of dense traffic, existence of shielding vehicles and stationary vehicles, etc.
[0164] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, it is common and well understood by those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and can include any information delivery media.
Claims
1. A method for determining a vehicle speed, comprising: transforming first image coordinate information of an initial position of a target vehicle and second image coordinate information of a current position of the target vehicle into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position; determining a lane line expression of each lane line in a lane in which the target vehicle travels; determining a lane line closest to the target vehicle according to the determined lane line expression of each lane line and the second actual coordinate information; determining a displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information, and the lane line expression of the lane line closest to the target vehicle; determining a vehicle speed according to the determined displacement and a travel duration of the target vehicle; wherein the initial position is a position at which the target vehicle is tracked for the first time, and the current position is a latest position at which the target vehicle is tracked. The transforming first image coordinate information of an initial position of a target vehicle and second image coordinate information of a current position of the target vehicle into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position comprises: transforming the first image coordinate information and the second image coordinate information into the corresponding first actual coordinate information and the second actual coordinate information through a pre-determined conversion matrix; wherein the conversion matrix is a matrix for converting image coordinates into actual coordinates. The determining a lane line expression of each lane line in a lane in which the target vehicle travels comprises: determining a lane line expression of each lane line in a lane in which the target vehicle travels through a pre-determined conversion matrix; wherein the conversion matrix is a matrix for converting image coordinates into actual coordinates. The first image coordinate information and the second image coordinate information comprise: coordinate information recorded when a tracker pre-set for tracking a running track of the target vehicle tracks the running track of the target vehicle after an image acquisition device pre-set for acquiring an image containing the target vehicle acquires the image. The determining a lane line closest to the target vehicle comprises: determining the lane line closest to the target vehicle through the following formula: The determining a displacement of the target vehicle comprises: calculating a length between a longitudinal coordinate of the lane line closest to the target vehicle in the first actual coordinate information and a longitudinal coordinate of the lane line closest to the target vehicle in the second actual coordinate information according to the lane line expression of the lane line closest to the target vehicle, and determining the length as the displacement of the target vehicle. The calculating a length between a longitudinal coordinate of the lane line closest to the target vehicle in the first actual coordinate information and a longitudinal coordinate of the lane line closest to the target vehicle in the second actual coordinate information comprises calculating the length through the following formula:
2. The method of claim 1, wherein, 8.A computer storage medium, in which a computer program is stored, the computer program being executed by a processor to implement the method for determining a vehicle speed according to any one of claims 1-7. A memory and a processor, the memory storing a computer program; wherein the processor is configured to execute the computer program in the memory; and the computer program is executed by the processor to implement the method for determining a vehicle speed according to any one of claims 1-7. A conversion coordinate unit, a lane line expression determining unit, a lane line determining unit, a displacement calculating unit, and a vehicle speed calculating unit; wherein 3. The method of claim 1, wherein, 4. The method according to any one of claims 1 to 3, characterized in that, 5. The method according to any one of claims 1 to 3, characterized in that, wherein X k y represents a longitudinal coordinate in the second actual coordinate information, X k x represents a lateral coordinate in the second actual coordinate information, j represents a serial number for distinguishing lane lines, which is set in advance, j * represents a serial number of a lane line closest to the target vehicle, for determining a serial number of a lane line closest to the target vehicle. 6. The method of claim 5, wherein, 7. The method of claim 6, wherein, wherein p represents a longitudinal coordinate in the first actual coordinate information q represents a longitudinal coordinate X in the second actual coordinate information k | y , represents a length of the lane line j * from p to q, O k represents the length. 9. A terminal comprising: 10. An apparatus for determining vehicle speed, comprising: The conversion coordinate unit is configured to convert first image coordinate information of an initial position of a target vehicle and second image coordinate information of a current position into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position; The lane line expression determination unit is configured to determine a lane line expression of each lane line in a lane in which the target vehicle travels; The lane line determination unit is configured to determine a lane line closest to the target vehicle according to the determined lane line expression of each lane line and the second actual coordinate information; The displacement calculation unit is configured to determine a displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information, and the lane line expression of the lane line closest to the target vehicle; The vehicle speed calculation unit is configured to determine a vehicle speed according to the determined displacement and a travel duration of the target vehicle; The initial position is a position at which the target vehicle is tracked for the first time, and the current position is a latest position at which the target vehicle is tracked.
Citation Information
Patent Citations
Method and device for determining automobile driving speed
CN101187671A
System and method for reversely educing position of automobile by means of coordinates of traffic signboards
CN105021201A