CN115862345A - Method and device for determining vehicle speed, computer storage medium and terminal - Google Patents

Method and device for determining vehicle speed, computer storage medium and terminal Download PDF

Info

Publication number
CN115862345A
CN115862345A CN202211441334.3A CN202211441334A CN115862345A CN 115862345 A CN115862345 A CN 115862345A CN 202211441334 A CN202211441334 A CN 202211441334A CN 115862345 A CN115862345 A CN 115862345A
Authority
CN
China
Prior art keywords
coordinate information
target vehicle
lane line
determining
actual coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211441334.3A
Other languages
Chinese (zh)
Inventor
胡峻毅
张毅
陈双
姚丹亚
彭黎辉
胥松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202211441334.3A priority Critical patent/CN115862345A/en
Publication of CN115862345A publication Critical patent/CN115862345A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a method, a device, a computer storage medium and a terminal for determining vehicle speed, wherein first image coordinate information of an initial position and second image coordinate information of a current position of a tracked target vehicle are converted into corresponding first actual coordinate information and second actual coordinate information, after a lane line closest to the target vehicle is determined, the displacement of the target vehicle is calculated and determined according to the first actual coordinate information, the second actual coordinate information and a lane line expression of the lane line closest to the target vehicle, the vehicle speed is calculated according to the determined displacement and the running time of the target vehicle, and vehicle speed calculation meeting precision requirements is realized through limited calculation under the condition of not additionally building equipment.

Description

Method and device for determining vehicle speed, computer storage medium and terminal
Technical Field
The present disclosure relates to, but not limited to, traffic monitoring technologies, and more particularly, to a method, an apparatus, a computer storage medium, and a terminal for determining a vehicle speed.
Background
With the continuous increase of the automobile holding amount in China, the problems of traffic accidents, low traffic efficiency, traffic jam and the like are brought by huge vehicles. In addition to municipal infrastructure, the control of road networks by the traffic flow of roads is an option for traffic control departments. The accurate traffic flow prediction including vehicle speed measurement, vehicle statistics and the like can provide a powerful traffic decision basis for a traffic manager, and meanwhile, a driver can select a more smooth road to go out, so that the condition of traffic jam is avoided or relieved.
Common vehicle speed measurement methods in the related art such as ground induction coil speed measurement, radar speed measurement and the like cannot use a large number of erected fixed monitoring cameras, need to rebuild infrastructure and cannot detect a static vehicle, and only can calculate local speed through the interval time when the vehicle reaches two monitoring points, wherein the accuracy of the fixed monitoring cameras is greatly influenced by the ground condition, and the fixed monitoring cameras cannot record a running track as well as the radar speed measurement and also need to be matched with a camera to capture a license plate number for subsequent processing. In the vehicle speed measurement technology based on visible light vision, the method for estimating displacement based on lane line information cannot avoid the defect of manually measuring the relevant distance on the road section where each camera is located, and the real distance corresponding to each pixel point in the monitoring data needs to be stored for speed measurement, so that the calculation cost is high.
In conclusion, the scheme for acquiring the vehicle speed in the related art has the problems of high equipment construction and maintenance cost, difficulty in balancing calculation time and precision and the like; how to realize the effective analysis of the vehicle speed becomes a problem to be solved.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the invention provides a method and a device for determining a vehicle speed, a computer storage medium and a terminal, which can realize vehicle speed calculation meeting precision requirements through limited calculation under the condition of not additionally constructing equipment.
The embodiment of the invention provides a method for determining a vehicle speed, which comprises the following steps:
converting 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 a lane line expression of a lane line closest to the target vehicle;
determining the vehicle speed according to the determined displacement and the running time 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.
In another aspect, an embodiment of the present invention further provides a computer storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for determining a vehicle speed.
In another aspect, an embodiment of the present invention further provides a terminal, including: a memory and a processor, the memory having a computer program stored therein; wherein the content of the first and second substances,
the processor is configured to execute the computer program in the memory;
the computer program, when executed by the processor, implements a method of determining vehicle speed as described above.
In still another aspect, an embodiment of the present invention further provides an apparatus for determining a vehicle speed, including:
the system comprises a coordinate conversion unit, a lane line expression determining unit, a lane line determining unit, a displacement calculating unit and a vehicle speed calculating unit; wherein, the first and the second end of the pipe are connected with each other,
the conversion coordinate unit is set as: converting 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;
the lane line expression determination unit is set to: determining a lane line expression of each lane line in a driving lane of the target vehicle;
the lane line determining unit is set to: 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;
the calculation displacement unit is set as: determining the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information and a lane line expression of a lane line closest to the target vehicle;
the vehicle speed calculating unit is configured to: determining the vehicle speed according to the determined displacement and the running 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 technical scheme of the application includes: converting 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 a lane line expression of a lane line closest to the target vehicle; determining the vehicle speed according to the determined displacement and the running time 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. According to the embodiment of the invention, the vehicle speed calculation meeting the precision requirement is realized through limited calculation under the condition of not additionally constructing equipment.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of a method of determining vehicle speed in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of a perspective transformation process according to an embodiment of the present invention;
FIG. 3 is a block diagram of an apparatus for determining vehicle speed according to an embodiment of the present invention;
FIG. 4 is a flow chart of an exemplary application of the present invention for determining lane-line expressions;
FIG. 5 is a schematic view of an image read by an exemplary application of the present invention;
FIG. 6 is a schematic view of an aerial view of an exemplary application of the present invention;
FIG. 7 is a schematic diagram of the effect of the fit of an exemplary lane line in accordance with the present invention;
FIG. 8 is a flow chart of an exemplary embodiment of the present invention for determining vehicle speed.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
According to the embodiment of the invention, the image acquisition devices of each monitored vehicle are respectively subjected to vehicle speed calculation processing based on a subsequent vehicle speed determining method, the data of the target vehicle acquired by each image acquisition device are mutually independent, and the conversion matrixes of the image acquisition devices are also mutually unrelated. To facilitate understanding of embodiments of the present invention, the determination of the transformation matrix is exemplified below.
In the embodiment Of the invention, the transformation matrix is determined through the perspective transformation model, and the Region Of Interest (Region Of Interest) Of the perspective transformation model is limited to the lane part; in the embodiment of the invention, after the image coordinate system and the actual coordinate system (real world coordinate system) are set by referring to the related technology, one point of a lane in the image is taken, and the assumption is that the point is a random point (x, y) T Taking the homogeneous coordinate (x, y, 1) of the point T (the homogeneous coordinate is taken for the convenience of matrix operation), the actual coordinate in the real world is (U ', V') T Homogeneous coordinate is (U, V, W) T W is not equal to 0, W is a constant, and the corresponding relation is as follows:
U’=U/W
V’=V/W
the perspective transformation operation is performed on the random points as follows:
Figure BDA0003948478990000051
wherein, H is a transformation matrix, which transforms the random points taken out from the image into actual coordinates of the real world, and the format thereof is as follows:
Figure BDA0003948478990000052
wherein, A 2×2 Representing affine transformation parameters, T 2×1 Representing translation transformation parameters, V T Representing the intersection relation of the transformed edges, wherein s is a scaling factor; in an exemplary example, s =1 is set through the normalization process.
The above equation is developed to obtain:
U=a 11 x+a 12 y+t x
V=a 21 x+a 22 y+t y
W=v 1 x+v 2 y+1
its actual coordinates can be written as:
Figure BDA0003948478990000053
Figure BDA0003948478990000054
based on the above formula, the transformation matrix contains 8 unknown parameters, two sets of coordinates of 4 points are needed to be calculated, 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 embodiment, the embodiment of the invention selects 4 points on a lane line in an image acquired by an image acquisition device, determines actual coordinates of the 4 points by referring to national highway lane line standard specifications, and solves the actual coordinates to obtain a transformation matrix.
FIG. 1 is a flowchart of a method for determining vehicle speed according to an embodiment of the present invention, as shown in FIG. 1, including:
step 101, converting 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;
step 102, determining a lane line expression of each lane line in a driving lane of a target vehicle;
in one illustrative example, embodiments of the invention obtain a lane line expression by: and carrying out perspective conversion processing on the image acquired by the image acquisition device to obtain an effect image containing the lane of the road section on which the target vehicle runs, namely an aerial view, wherein the perspective conversion is as shown in fig. 2, and marking lane lines and fitting to determine a lane line expression of each lane line contained in the image.
103, 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;
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;
step 105, determining the vehicle speed according to the determined displacement and the running duration of the target vehicle;
the initial position is the position where the target vehicle is tracked for the first time, and the current position is the latest position where the target vehicle is tracked.
According to the embodiment of the invention, the vehicle speed calculation meeting the precision requirement is realized through limited calculation under the condition of not additionally constructing equipment.
In an exemplary example, an embodiment of the present invention transforms first image coordinate information of an initial position and second image coordinate information of a current position of a target vehicle into corresponding first actual coordinate information of the initial position and second actual coordinate information of the current position, including:
transforming 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 transformation matrix;
wherein the conversion matrix is a matrix for converting the image coordinate into the actual coordinate.
In one illustrative example, an embodiment of the present invention determines a lane line expression for each lane line in a lane in which a target vehicle is traveling, including:
transforming 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 transformation matrix;
wherein the conversion matrix is a matrix for converting the image coordinate into the actual coordinate.
In an illustrative example, the first image coordinate information and the second image coordinate information in the embodiment of the present invention include:
and after the image containing the target vehicle is acquired by a preset image acquisition device, the coordinate information recorded when the running track of the target vehicle is tracked by a preset tracker is acquired.
According to the embodiment of the invention, an algorithm including multi-target tracking (tracking by detection) is referred, tracking of a target vehicle in an image acquired by an image acquisition device is realized through a tracker (tracker), and whether the vehicle in the image is the same as a previously tracked vehicle is determined based on Hungary algorithm; supposing that an image acquisition device can acquire 60 frames of images in one second, selecting one image per 10 frames of images by referring to the related technology, respectively acquiring the previous frame image of the 60 frames of images by using a multi-target tracking algorithm, and performing matching by using a Hungarian algorithm, wherein the target vehicle in the frame of image and the minimum distance between the target vehicle and the vehicle with the minimum distance among all vehicles contained in the previous frame image of the 60 frames of images are acquired, and if the minimum distance is smaller than the vehicle speed recorded by a tracker, the target vehicle and the vehicle with the minimum distance are matched vehicles; and if the minimum distance is greater than or equal to the speed recorded by the tracker, the vehicle is a newly tracked target vehicle, and the vehicle is tracked by the new tracker by referring to a multi-target tracking algorithm.
In an exemplary example, in the embodiment of the present invention, when the first image coordinate and the second image coordinate track the target vehicle, the tracker does not select a central point of the detection frame, but selects a coordinate of a point (for example, a point at a lower left corner of the detection frame) on the detection frame of a point below the detection frame, and performs perspective transformation operation on the point based on the transformation matrix, so as to determine a corresponding actual coordinate;
in one illustrative example, embodiments of the invention determine the lane line closest to the target vehicle by the following formula:
Figure BDA0003948478990000071
wherein X k | y Representing a second realityOrdinate, X, in coordinate information k | x Represents the abscissa in the second actual coordinate information, j represents a preset serial number for distinguishing lane lines, j represents the horizontal coordinate in the second actual coordinate information * A serial number indicating a lane line closest to the target vehicle,
Figure BDA0003948478990000072
used for determining the lane line serial number closest to the target vehicle.
In one illustrative example, an embodiment of the present invention determines the displacement of a target vehicle, comprising:
the length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information is calculated from the lane line expression of the lane line closest to the target vehicle, and the length is determined as the displacement of the target vehicle.
In an exemplary example, the embodiment of the present invention calculates the length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information, including calculating the length by the following equation:
Figure BDA0003948478990000081
wherein p represents a vertical coordinate in the first actual coordinate information
Figure BDA0003948478990000082
q represents a vertical coordinate X in the second actual coordinate information k | y ,/>
Figure BDA0003948478990000083
Representing calculation of lane line j by integration * Length from p to q, O k Indicating the length.
In an exemplary example, when the image coordinates for tracking the target vehicle include three or more sets, the above calculation of the vehicle speed may be performed, that is, the tracker records more than one position of the target vehicle during the movement in addition to the initial position and the current position of the target vehicle.
In one illustrative example, determining a vehicle speed based on the determined displacement and the travel duration of the target vehicle includes calculating the vehicle speed by calculating the vehicle speed from the following equation
Figure BDA0003948478990000087
The expression of (a) is:
Figure BDA0003948478990000084
wherein the content of the first and second substances,
Figure BDA0003948478990000085
representing the vehicle speed, wherein age represents the driving time length of the target vehicle recorded by the tracker, scale represents the multiple of the scaling operation carried out on the distance between the actual coordinates when the transformation matrix is calculated, and FPS represents the frame rate of the image; according to the embodiment of the invention, the ratio of the running time age of the target vehicle to the frame rate FPS is used as the real running time, so that the real running speed ^ based on the real running speed of the target vehicle is calculated>
Figure BDA0003948478990000086
In an illustrative example, scale =10 in an embodiment of the invention.
In an illustrative example, assume n t Representing real-time traffic flow, N t Represents the total traffic volume, p, since the start of recording (time t = 1) t Represents the average traffic density, ρ, from the time of starting recording (time t = 1) t =N t T; the embodiment of the invention can determine the parameters by referring to the related technology; in an illustrative example, embodiments of the invention may determine traffic flow parameters based on real-time traffic flow, total traffic flow, average traffic density, and vehicle speed, among others.
Embodiments of the present invention further provide a computer storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the method for determining a vehicle speed.
An embodiment of the present invention further provides a terminal, including: a memory and a processor, the memory having stored therein a computer program; wherein the content of the first and second substances,
the processor is configured to execute the computer program in the memory;
the computer program, when executed by the processor, implements a method of determining vehicle speed as described above.
Fig. 3 is a block diagram of an apparatus for determining vehicle speed according to an embodiment of the present invention, as shown in fig. 3, including: the system comprises a coordinate conversion unit, a lane line expression determining unit, a lane line determining unit, a displacement calculating unit and a vehicle speed calculating unit; wherein the content of the first and second substances,
the conversion coordinate unit is set as: converting 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;
the lane line expression determination unit is set to: determining a lane line expression of each lane line in a driving lane of the target vehicle;
the lane line determining unit is set to: 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;
the calculation displacement unit is set as: determining the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information and a lane line expression of a lane line closest to the target vehicle;
the vehicle speed calculating unit is configured to: determining the vehicle speed according to the determined displacement and the running time of the target vehicle;
the initial position is the position where the target vehicle is tracked for the first time, and the current position is the latest position where the target vehicle is tracked.
In an illustrative example, the coordinate unit is converted in the embodiment of the present invention by setting:
transforming 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 transformation matrix;
wherein the transformation matrix is a matrix for transforming the image coordinates into actual coordinates.
In an illustrative example, embodiments of the present invention determine that the lane line expression unit is set to:
determining a lane line expression of each lane line in a driving lane of the target vehicle through a predetermined conversion matrix;
wherein the transformation matrix is a matrix for transforming the image coordinates into actual coordinates.
In an illustrative example, the first image coordinate information and the second image coordinate information in the embodiment of the present invention include:
after an image containing a target vehicle is acquired through a preset image acquisition device, coordinate information recorded when a running track of the target vehicle is tracked through a preset tracker is acquired.
In one illustrative example, the lane line determining unit of the embodiment of the present invention is configured to determine a lane line closest to the target vehicle by the following formula:
Figure BDA0003948478990000101
wherein, X k | y Indicating the ordinate, X, in the second actual coordinate information k | x Represents the abscissa in the second actual coordinate information, j represents a preset serial number for distinguishing lane lines, j represents the horizontal coordinate in the second actual coordinate information * A serial number indicating a lane line closest to the target vehicle,
Figure BDA0003948478990000102
used for determining the lane line serial number closest to the target vehicle.
In an illustrative example, the calculating displacement unit of the embodiment of the present invention is configured to:
the length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information is calculated from the lane line expression of the lane line closest to the target vehicle, and the length is determined as the displacement of the target vehicle.
In an exemplary example, the displacement unit is configured to calculate the length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information, including calculating the length by the following equation:
Figure BDA0003948478990000103
wherein p represents a vertical coordinate in the first actual coordinate information
Figure BDA0003948478990000104
q represents the ordinate X in the second actual coordinate information k | y ,/>
Figure BDA0003948478990000111
Representing calculation of lane line j by integration * Length from p to q, O k Indicating the length.
The following is a brief description of the embodiments of the present invention by way of application examples, which are only used to illustrate the embodiments of the present invention and are not used to limit the scope of the present invention.
Application example
Fig. 4 is a flowchart of determining a lane line expression according to an application example of the present invention, as shown in fig. 4, including:
step 401, reading the T frame image f from the image of the monitoring target vehicle with the time length T t ,(t=1..T);
Step 402, selecting 4 reference points P on the t frame image i (i =1.. 4), and determining the corresponding actual coordinates Q of the selected 4 reference points i (i =1.. 4); in an exemplary embodiment, the present application estimates the actual coordinates Q of the four selected points according to the national highway lane line standard i ,(i=1..4);
Step 403, passing4 determined reference points and corresponding actual coordinates are used for solving a conversion matrix; i.e. by P i (i =1.. 4) and Q i (i =1.. 4) obtaining a conversion matrix H;
step 404, through converting the matrix H, performing perspective conversion operation on the image to obtain a bird's-eye view f' t ,(t=1..T);
Step 405, obtaining a lane line expression of each lane line based on the aerial view and the conversion matrix; in an illustrative example, embodiments of the invention intercept the aerial view f 'using lane line detection or manual annotation' t Distributing J lane lines in (T =1.. T), and fitting to obtain a lane line expression L of each lane line j ,(j=1..J);
FIG. 5 is a schematic diagram of an image read by an exemplary application of the present invention, as shown in FIG. 5, at the t-th frame image f t And (T =1.. T) selecting 4 reference points, wherein 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 derived that the shooting depth of the image acquisition device in the x-axis direction is the same, that is, the distance between the point a, the point B and the point C and the image acquisition device in the direction along the lane line in the real world is the same, and the distance between the point D, the point E and the point F is the same. According to the national standards, the lane spacing, the length of the dashed lane and the spacing are 3.75 meters, 6 meters and 9 meters, respectively, so in the real world coordinate system:
Figure BDA0003948478990000112
Figure BDA0003948478990000113
considering the visualization effect of the image, it is set that the actual coordinates of the 4 reference points have 250 pixel units in the direction along the lane line and 5000 pixel units in the direction perpendicular to the lane line, each meter is represented by 10 pixel points, scaling =10 is performed on the bird's-eye view image, that is, each converted pixel point theoretically represents 0.1 meter, and then the actual coordinates of the adjusted reference points are respectively:
Q A =(250,5000)
Q B =(250+3.75×10,5000)
Q C =(250+3.75×10,5000+6×10)
Q D =(250,5000+6×10)
the image coordinates in the corresponding image are:
P A =(672,357)
P B =(828,357)
P E =(861,419)
P D =(676,419)
based on the image coordinates and the actual coordinates of the four reference points, a transformation matrix can be obtained as follows:
Figure BDA0003948478990000121
the bird's eye view 6 of the top view can be obtained by performing the perspective transformation operation on fig. 5. The perspective transformation operation can transform an image coordinate system in units of pixel points in an image into an actual coordinate system having actual physical meaning in the real world. For example, in the bird's eye view after a scale =10 zoom operation, each coordinate interval represents 0.1 meters.
Marking lane lines or obtaining the pixel distribution of the lane lines by using any lane line segmentation method according to a cubic polynomial format
Figure BDA0003948478990000122
The lane line expression is fitted to obtain 6 lane line expression parameters, and the parameters are sorted from high to low according to the series as follows:
L 1 =[2.13628461e-09 -8.58252156e-06 -7.76730734e-02 5.49176860e+02]
L 2 =[3.10357039e-09 -1.70590928e-05 -5.91857492e-02 5.85481437e+02]
L 3 =[3.75262951e-10 1.17377869e-05 -1.58505319e-01 7.36120971e+02]
L 4 =[2.96428079e-09 -1.28551618e-05 -8.42512296e-02 7.00590418e+02]
L 5 =[1.63417240e-09 6.42429978e-07 -1.32176339e-01 7.98087983e+02]
L 6 =[2.46303507e-09 -7.59787714e-06 -1.08535371e-01 8.19152502e+02]
the fitted lane line is shown in fig. 7, and it can be seen from fig. 7 that the lane line fitting effect is accurate and conforms to the real distribution of the lane line.
Fig. 8 is a flowchart of determining a vehicle speed according to an example of the application of the present invention, as shown in fig. 8, including:
step 801, reading an image f containing a target vehicle t (T =1.. T), lane line expression L j J =1.. J) and a transformation matrix H;
step 802, obtaining K detection frames B of the detection target vehicle of the tracker distance k ,(k=1..K);
Step 803, using the transformation matrix H to detect the frame B k And (K =1.. K) performing perspective conversion operation on the image coordinate of the lower left corner to obtain an actual coordinate X k ,(k=1..K);
Step 804, converting to obtain the actual coordinate X k (K =1.. K), and actual coordinates Tr of the lower left corner at the previous time recorded by each tracker t-1 m (X k ) A distance of (M =1.. M, T =1.. T) is obtained as a matching result G k ,(k=1..K);
Step 805, passing the matching result G k (K =1.. K), determining whether the currently detected target vehicle is a newly detected target vehicle;
step 806, when the currently detected target vehicle is a newly detected target vehicle, recording the actual coordinates of the lower left corner of the target vehicle at each moment through a new tracker; when the current detected target vehicle is the stored target vehicle, the actual coordinate X is used k (K =1.. K) actual coordinates as the current position of the stored target vehicle;
step 807, calculating the displacement O of the target vehicle according to the lane line expression of the lane line closest to the current position of the target vehicle k ,(k=1..K);
In an illustrative example, the inventionExamples by O k (K =1.. K) calculating the vehicle speed
Figure BDA0003948478990000131
In one illustrative example, embodiments of the invention are described by way of O k (K =1.. K) calculating the traffic flow N t (T =1.. T) and traffic density ρ t T =1.. T), and the like.
In one illustrative example, embodiments of the invention may be based on the coordinates of the actual coordinates of the target vehicle at various times recorded by the tracker
Figure BDA0003948478990000132
And determining the motion track of the target vehicle.
The embodiment of the invention assumes that the 669 th frame f collected by the image collecting device t In the t =669 image, 7 detection frames B are detected k K =1..7; the present application example detects the lower left corner B of each box kcorner And (3) carrying out perspective conversion operation, wherein the actual coordinate corresponding to the image coordinate of the lower left corner of the detection frame obtained by conversion is as follows: x k =H·B k|corn (ii) a . Converting coordinates X by calculating detection boxes k And actual coordinates Tr of the lower left corner of the M known trackers at the previous time t-1 m (X k ) Matching K detection frames with M known trackers to obtain a matching result G k After updating the moving track of the target vehicle, the track recorded by converting the coordinates
Figure BDA0003948478990000141
And the track recorded in the lower left corner coordinate of the detection frame->
Figure BDA0003948478990000142
The vehicle running track can be visualized.
X k =H·B k|corner With the actual coordinates Tr of the lower left corner predicted by the m-th tracker t-1 m (X k ) The matching process is roughly as follows:
Figure BDA0003948478990000143
Figure BDA0003948478990000144
this application example determines X k =H·B k|corner After the second actual coordinate of the current position of the target vehicle, determining a length of a lane line closest to the target vehicle from the ordinate of the first actual coordinate of the initial position of the target vehicle to the ordinate of the second actual coordinate of the current position as the displacement of the target vehicle, and calculating the vehicle speed based on the determined displacement and the running time period age recorded by the tracker.
The embodiment of the invention counts the number K (K = n) of the current successfully matched trackers t ) The real-time traffic flow can be determined according to the number M (M = N) of all the trackers successfully matched when the recording is started t ) The total traffic flow can be determined and the traffic density can be calculated based on the total traffic flow and the time since the start of recording to the current time.
The application example can complete the speed determination of the target vehicle and the track analysis of the target vehicle only by intercepting the real-time image acquired by the existing image acquisition device, is not interfered by road conditions, and has simple deployment and low maintenance cost; meanwhile, vehicle tracking can be accurately and efficiently realized under the conditions that the traffic flow is dense, and sheltered vehicles, static vehicles and the like exist.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, 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, as is well known to those of ordinary skill in the art. 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 tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, 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 includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method of determining vehicle speed, comprising:
converting first image coordinate information of the initial position of the target vehicle and second image coordinate information of the 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 a lane line expression of a lane line closest to the target vehicle;
determining the vehicle speed according to the determined displacement and the running time 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.
2. The method according to claim 1, wherein 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 the first actual coordinate information of the corresponding initial position and the second actual coordinate information of the current position comprises:
transforming 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 transformation matrix;
and converting the image coordinate into an actual coordinate by the conversion matrix.
3. The method of claim 1, wherein the determining a lane line expression for each lane line in the target vehicle travel lane comprises:
determining a lane line expression of each lane line in a driving lane of the target vehicle through a predetermined conversion matrix;
and converting the image coordinate into an actual coordinate by the conversion matrix.
4. The method according to any one of claims 1-3, wherein the first image coordinate information and the second image coordinate information comprise:
and after the image containing the target vehicle is acquired through a preset image acquisition device, coordinate information recorded when the running track of the target vehicle is tracked through a preset tracker is acquired.
5. A method according to any one of claims 1-3, characterized in that the lane line closest to the target vehicle is determined by the following formula:
Figure FDA0003948478980000021
wherein, X k | y Representing the ordinate, X, in the second actual coordinate information k | x Represents the abscissa in the second actual coordinate information, j represents a preset serial number for distinguishing lane lines, j represents the horizontal coordinate in the second actual coordinate information, j represents the serial number for distinguishing lane lines * A serial number indicating a lane line closest to the target vehicle,
Figure FDA0003948478980000022
and the method is used for determining the lane line serial number closest to the target vehicle.
6. The method of claim 5, wherein the determining a displacement of a target vehicle comprises:
the length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information is calculated from the lane line expression of the lane line closest to the target vehicle, and the length is determined as the displacement of the target vehicle.
7. The method according to claim 6, wherein the calculating a length of the lane line closest to the target vehicle from the ordinate in the first actual coordinate information to the ordinate in the second actual coordinate information includes calculating the length by the following equation:
Figure FDA0003948478980000023
wherein p represents a vertical coordinate in the first actual coordinate information
Figure FDA0003948478980000024
q represents a vertical coordinate X in the second actual coordinate information k | y ,/>
Figure FDA0003948478980000025
Representing calculation of lane line j by integration * Length from p to q, O k Representing the length.
8. A computer storage medium having a computer program stored thereon, which, when being executed by a processor, carries out the method of determining a vehicle speed according to any one of claims 1-7.
9. A terminal, comprising: a memory and a processor, the memory having a computer program stored therein; wherein the content of the first and second substances,
the processor is configured to execute the computer program in the memory;
the computer program, when executed by the processor, implements a method of determining vehicle speed as claimed in any one of claims 1-7.
10. An apparatus for determining vehicle speed, comprising: the system comprises a coordinate conversion unit, a lane line expression determining unit, a lane line determining unit, a displacement calculating unit and a vehicle speed calculating unit; wherein the content of the first and second substances,
the conversion coordinate unit is set as: converting first image coordinate information of the initial position of the target vehicle and second image coordinate information of the 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 set to: determining a lane line expression of each lane line in a driving lane of a target vehicle;
the lane line determining unit is set to: 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;
the calculation displacement unit is set as: determining the displacement of the target vehicle according to the first actual coordinate information, the second actual coordinate information and a lane line expression of a lane line closest to the target vehicle;
the vehicle speed calculating unit is configured to: determining the vehicle speed according to the determined displacement and the running 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.
CN202211441334.3A 2022-11-17 2022-11-17 Method and device for determining vehicle speed, computer storage medium and terminal Pending CN115862345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211441334.3A CN115862345A (en) 2022-11-17 2022-11-17 Method and device for determining vehicle speed, computer storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211441334.3A CN115862345A (en) 2022-11-17 2022-11-17 Method and device for determining vehicle speed, computer storage medium and terminal

Publications (1)

Publication Number Publication Date
CN115862345A true CN115862345A (en) 2023-03-28

Family

ID=85663940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211441334.3A Pending CN115862345A (en) 2022-11-17 2022-11-17 Method and device for determining vehicle speed, computer storage medium and terminal

Country Status (1)

Country Link
CN (1) CN115862345A (en)

Similar Documents

Publication Publication Date Title
US10964054B2 (en) Method and device for positioning
CN109817014B (en) Roadside inspection parking charging method based on mobile video and high-precision positioning
Chen et al. Next generation map making: Geo-referenced ground-level LIDAR point clouds for automatic retro-reflective road feature extraction
JP2023523243A (en) Obstacle detection method and apparatus, computer device, and computer program
US7580547B2 (en) Electronic traffic monitor
Kumar et al. A semi-automatic 2D solution for vehicle speed estimation from monocular videos
CN113421289B (en) High-precision vehicle track data extraction method for overcoming unmanned aerial vehicle shooting disturbance
CN104766058A (en) Method and device for obtaining lane line
CN111915883A (en) Road traffic condition detection method based on vehicle-mounted camera shooting
CN112053572A (en) Vehicle speed measuring method, device and system based on video and distance grid calibration
CN113034586B (en) Road inclination angle detection method and detection system
CN108416798A (en) A kind of vehicle distances method of estimation based on light stream
CN113012215A (en) Method, system and equipment for space positioning
JP2012215442A (en) Own position determination system, own position determination program, own position determination method
JP2020160840A (en) Road surface defect detecting apparatus, road surface defect detecting method, road surface defect detecting program
JP6916975B2 (en) Sign positioning system and program
EP4250245A1 (en) System and method for determining a viewpoint of a traffic camera
CN115004273A (en) Digital reconstruction method, device and system for traffic road
CN115862345A (en) Method and device for determining vehicle speed, computer storage medium and terminal
CN115731224A (en) License plate detection method and device, terminal equipment and storage medium
Kozempel et al. Fast vehicle detection and tracking in aerial image bursts
Yu et al. MPP: A novel algorithm for estimating vehicle space headways from a single image
CN110969875B (en) Method and system for road intersection traffic management
CN113792613A (en) Mile post precision positioning algorithm based on video and GPS
Kloeker et al. Comparison of Camera-Equipped Drones and Infrastructure Sensors for Creating Trajectory Datasets of Road Users.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination