CN112229360A - Vehicle length determination method, device, equipment and storage medium - Google Patents

Vehicle length determination method, device, equipment and storage medium Download PDF

Info

Publication number
CN112229360A
CN112229360A CN202011038338.8A CN202011038338A CN112229360A CN 112229360 A CN112229360 A CN 112229360A CN 202011038338 A CN202011038338 A CN 202011038338A CN 112229360 A CN112229360 A CN 112229360A
Authority
CN
China
Prior art keywords
target vehicle
determining
moment
length
time
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.)
Granted
Application number
CN202011038338.8A
Other languages
Chinese (zh)
Other versions
CN112229360B (en
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202011038338.8A priority Critical patent/CN112229360B/en
Publication of CN112229360A publication Critical patent/CN112229360A/en
Application granted granted Critical
Publication of CN112229360B publication Critical patent/CN112229360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/02Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness
    • G01B21/06Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness specially adapted for measuring length or width of objects while moving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • G06T7/248Analysis of motion using feature-based methods, e.g. the tracking of corners or segments involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Geometry (AREA)
  • Traffic Control Systems (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the technical field of traffic, and discloses a method, a device, equipment and a storage medium for determining the length of a vehicle, which are used for improving the accuracy of determining the length of the vehicle, wherein the method comprises the following steps: determining the speed of a target vehicle in a target area acquired for multiple times between a first time and a second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times; determining a displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle; determining a length of the target vehicle from the displacement.

Description

Vehicle length determination method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of traffic, in particular to a method, a device, equipment and a storage medium for determining the length of a vehicle.
Background
With the rapid development of the transportation industry, people pay more and more attention to the traffic safety. The length of the vehicle affects early warning information such as time occupancy, space occupancy, inter-vehicle distance, preceding vehicle distance, time interval and the like, so that the timely acquisition of the length of the vehicle is very important to traffic safety.
In the related art, when a vehicle enters an image capturing area of a camera disposed above a road, an image including the vehicle is captured by the camera, and the length of the vehicle is estimated from the imaging length of the vehicle in the image.
However, the imaging length of the vehicle in the image has a deviation from the theoretical length of the vehicle to be imaged, and a plurality of factors such as the performance of the camera, the type of the vehicle, the length of the vehicle, and the position of the vehicle during imaging all affect the magnitude of the deviation, so that the deviation cannot be obtained accurately, the theoretical length of the vehicle to be imaged cannot be obtained, and the accurate length of the vehicle can be obtained only according to the theoretical length of the vehicle to be imaged, so that the deviation between the estimated length of the vehicle and the actual length of the vehicle is large.
Disclosure of Invention
The invention provides a vehicle length determination method, a vehicle length determination device, vehicle length determination equipment and a storage medium, which are used for improving the accuracy of vehicle length determination.
In a first aspect, an embodiment of the present invention provides a vehicle length determination method, including:
determining the speed of a target vehicle in a target area acquired for multiple times between a first time and a second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
determining a displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle;
determining a length of the target vehicle from the displacement.
According to the scheme, the image containing the target vehicle is acquired, the time when the head of the target vehicle reaches the preset mark and the time when the tail of the target vehicle leaves the preset mark are obtained, the time period between the two times is the time period capable of representing the length of the target vehicle, and the displacement of the target vehicle in the time period can be accurately determined according to the speed of the target vehicle acquired in the time period, wherein the displacement is composed of two parts, one part is the length of the target train, the other part is the length capable of being determined according to known parameters, and therefore the length of the target train can be accurately determined according to the displacement.
In some optional embodiments, determining the speed of the target vehicle to acquire the target area a plurality of times between the first time and the second time comprises:
according to the position information of all moving objects which are acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, and according to the pixel position of the target vehicle in the image which is acquired by the image acquisition device for multiple times between the first moment and the second moment based on a preset image acquisition interval, selecting the position information of the target vehicle from the position information of all moving objects through space fusion;
and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
According to the scheme, the data such as the azimuth information, the speed and the like of the moving object are obtained through the motion state acquisition device, and the identity information of the moving object cannot be obtained; the position information of the moving object can be accurately projected to an image plane acquired by the image acquisition device through spatial fusion, so that the position information of the target vehicle can be selected from the position information of the moving object; the speed corresponding to the azimuth information of the target vehicle is the speed of the target vehicle.
In some optional embodiments, determining the displacement of the target vehicle from the first time to the second time as a function of the speed of the target vehicle comprises:
and determining the displacement of the target vehicle from the first moment to the second moment according to the speed of the target vehicle and the motion state acquisition interval.
According to the scheme, the accuracy of determining the displacement of the target vehicle from the first moment to the second moment is improved according to the speed and the motion state acquisition interval of the target vehicle.
In some alternative embodiments, the image acquisition interval is n times the motion state acquisition interval, n being a positive integer.
According to the scheme, the image acquisition interval is the same as the motion state acquisition interval, or is multiple times of the motion state acquisition interval, so that the acquired speed of the target vehicle exists at the first moment and the second moment, more accurate displacement of the target vehicle is obtained, and the accuracy of the determined length of the target vehicle is further improved; meanwhile, each image is ensured to have corresponding azimuth information, all images and all azimuth information, or all images and part of azimuth information, which can participate in information fusion, and the problem that the time of the images and the azimuth information subjected to space fusion cannot correspond is avoided.
In some optional embodiments, before determining the length of the target vehicle according to the displacement, further comprising:
determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle;
determining a length of the target vehicle from the displacement, comprising:
and determining the length of the target vehicle according to the displacement and the first offset.
As described above, the displacement of the target vehicle includes the length of the target train to be determined, and also includes the length that can be accurately determined, and the length that can be accurately determined is mainly the first offset caused by the acquisition deviation of the image acquisition device caused by the height of the target vehicle, and the acquisition deviation of the image acquisition device caused by the height of the target vehicle is affected by two factors: the image acquisition device is relative to the angle of the preset mark and the height of the target vehicle, so that the first deviation amount caused by the acquisition deviation of the image acquisition device due to the height of the target vehicle can be accurately obtained according to the angle of the image acquisition device relative to the preset mark and the height of the target vehicle, and the length of the target vehicle can be accurately determined according to the displacement and the first deviation amount.
In some optional embodiments, before determining the length of the target vehicle according to the displacement and the first offset amount, the method further includes:
determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle;
determining a length of the target vehicle according to the displacement and the first offset amount, including:
determining a target offset according to the difference between the first offset and the second offset;
and taking the difference between the displacement and the target offset as the length of the target vehicle.
As described above, the length that can be accurately determined is mainly the first offset caused by the deviation acquired by the image acquisition device due to the height of the target vehicle, but the wheel of the chassis of the vehicle is empty, so the second offset caused by the deviation acquired by the image acquisition device due to the height of the chassis offsets a part of the first offset, and the accuracy of determining the length of the target vehicle is further improved by taking the difference between the first offset and the second offset as the length that can be accurately determined.
In some alternative embodiments, the height of the target vehicle is obtained by:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height;
the chassis height of the target vehicle is obtained by the following method:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; and determining the chassis height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the height.
According to the scheme, the type of the target vehicle can be accurately obtained through the trained neural network model, and the height of each type of vehicle is basically consistent with the height of the base, so that the height of the target vehicle can be accurately and conveniently determined according to the first corresponding relation between the preset type and the height, and the height of the base of the target vehicle can be accurately and conveniently determined according to the second corresponding relation between the preset type and the height.
In some optional embodiments, if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
According to the scheme, the target vehicle can run towards the direction far away from the image acquisition device or towards the image acquisition device, different heights are selected as the heights of the target vehicle according to different scenes, and the accuracy of determining the first deviation amount can be improved.
In a second aspect, an embodiment of the present invention provides a vehicle length determination apparatus, including:
the speed determining module is used for determining the speed of a target vehicle for acquiring the target area for multiple times between the first time and the second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
a length determination module for determining a displacement of the target vehicle from the first time to the second time according to a speed of the target vehicle;
and the length determining module is also used for determining the length of the target vehicle according to the displacement.
In some optional embodiments, the speed determination module determines a speed of the target vehicle to acquire the target area a plurality of times between the first time and the second time, including:
according to the position information of all moving objects which are acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, and according to the pixel position of the target vehicle in the image which is acquired by the image acquisition device for multiple times between the first moment and the second moment based on a preset image acquisition interval, selecting the position information of the target vehicle from the position information of all moving objects through space fusion;
and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
In some optional embodiments, the length determination module determines the displacement of the target vehicle from the first time to the second time based on the speed of the target vehicle, including:
and determining the displacement of the target vehicle from the first moment to the second moment according to the speed of the target vehicle and the motion state acquisition interval.
In some alternative embodiments, the image acquisition interval is n times the motion state acquisition interval, n being a positive integer.
In some optional embodiments, the length determination module, prior to determining the length of the target vehicle from the displacement, is further to:
determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle;
a length determination module determines a length of the target vehicle from the displacement, comprising:
and determining the length of the target vehicle according to the displacement and the first offset.
In some optional embodiments, the length determination module, prior to determining the length of the target vehicle from the displacement and the first offset amount, is further to:
determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle;
the length determination module determines a length of the target vehicle according to the displacement and the first offset, including:
determining a target offset according to the difference between the first offset and the second offset;
and taking the difference between the displacement and the target offset as the length of the target vehicle.
In some optional embodiments, the length determination module is further configured to:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height;
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; and determining the chassis height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the height.
In some optional embodiments, if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
In a third aspect, an embodiment of the present invention provides a vehicle length determination apparatus, including: a processor and a memory;
wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method according to the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the fourth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1A is a schematic view of a first application scenario provided in an embodiment of the present invention;
fig. 1B is a schematic diagram of a second application scenario provided in the embodiment of the present invention;
fig. 1C is a schematic diagram of a third application scenario provided in the embodiment of the present invention;
fig. 1D is a schematic diagram of a fourth application scenario provided in the embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of a first vehicle length determination method provided by an embodiment of the present invention;
FIG. 3A is a schematic diagram of a first identifier provided in accordance with an embodiment of the present invention;
FIG. 3B is a schematic diagram of a second exemplary identifier provided in accordance with an embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of a second vehicle length determination method provided by an embodiment of the present invention;
FIG. 5 is a schematic flow chart diagram of a third method for determining vehicle length provided by the embodiments of the present invention;
fig. 6A is a schematic diagram of a position relationship between a first time and a second time of a target vehicle according to an embodiment of the present invention;
fig. 6B is a schematic diagram of a position relationship between a second first time and a target vehicle at a second time according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart diagram of a fourth method for vehicle length determination according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating a positional relationship between a target vehicle at a third time and a second time according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a vehicle length determination apparatus according to an embodiment of the present invention;
fig. 10 is a schematic block diagram of a vehicle length determination apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
In the description of the present application, it is to be noted that, unless otherwise explicitly stated or limited, the term "connected" is to be understood broadly, and may for example be directly connected, indirectly connected through an intermediate medium, or be a communication between two devices. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
In the traffic field, timely obtaining the length of a vehicle is very important for traffic safety. In some embodiments, when a vehicle enters an image capturing area of a camera disposed above a road, an image containing the vehicle is captured by the camera, and the length of the vehicle is estimated based on the imaging length of the vehicle in the image.
Referring to fig. 1A, the imaged length L1 'of the vehicle in the image is offset from the theoretical vehicle expected imaged length L1 by L1' -L1. Referring to fig. 1B, the length of the vehicle is different from that of the vehicle in fig. 1A, and the deviation between the imaging length L2 'of the vehicle in fig. 1B and the theoretical imaging length L2 of the vehicle is L2' -L2, it can be seen that the deviation is different as long as the lengths of the vehicles are different, and the length of the vehicle is an unknown parameter, so the deviation cannot be obtained; in addition, the size of the deviation is affected by various factors such as the performance of the camera, the type of the vehicle, and the position of the vehicle during imaging. In summary, the deviation cannot be accurately determined due to a large number of factors affecting the deviation, and the theoretically required imaging length of the vehicle cannot be obtained, and the more accurate length of the vehicle can be obtained only according to the theoretically required imaging length of the vehicle, so that the deviation between the estimated length of the vehicle and the actual length of the vehicle is large.
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for determining a vehicle length to improve accuracy of determining a vehicle length, and the present invention is further described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1C is a schematic diagram of a third application scenario provided in the embodiment of the present invention, and fig. 1D is a schematic diagram of a fourth application scenario provided in the embodiment of the present invention:
in the application scenarios of fig. 1C and 1D, the time when the head of the target vehicle reaches the preset identifier on the target area is used as a first time; taking the moment when the tail of the target vehicle leaves the preset identification as a second moment;
the displacement of the target vehicle in fig. 1C from the first time to the second time is L3', and the length of the target vehicle in fig. 1C is L3;
the deviation of the displacement from the length of the target vehicle in FIG. 1C is L3' -L3;
the displacement of the target vehicle in fig. 1D from the first time to the second time is L4', and the length of the target vehicle in fig. 1D is L4;
the deviation of the displacement from the length of the target vehicle in FIG. 1D is L4' -L4;
although the length of the target vehicle in fig. 1C is not the same as the length of the target vehicle in fig. 1D, L3 '-L3 is the same as L4' -L4, i.e., the length of the target vehicle does not affect the deviation of the length and displacement of the target vehicle. In addition, the size of L3 '-L3 or L4' -L4 can be obtained from known parameters, and thus, in these embodiments, the length of the target vehicle can be determined more accurately based on the displacement.
The application scenarios described above are merely examples of application scenarios for implementing the embodiments of the present application, and the embodiments of the present application are not limited to the application scenarios described above.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a first vehicle length determining method provided by an embodiment of the present invention, and is applied to a vehicle length determining apparatus, as shown in fig. 2, the method may include:
step 201: the speed of a target vehicle that captures a target area a plurality of times between a first time and a second time is determined.
The first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the mark and the time when the tail of the target vehicle leaves the preset mark are determined according to the images containing the target vehicle, which are collected for multiple times.
In this embodiment, the length of the target vehicle cannot be determined according to the displacement of the target vehicle within any period of time, and the length of the target vehicle can only be determined according to the displacement within the period of time which can represent the length of the target vehicle. Based on this, it is necessary to determine first the time during which the token has travelled its length and the speed of the target vehicle during this time.
For example, the time period from the moment when the head of the target vehicle reaches one position to the moment when the tail of the target vehicle reaches the same position, which is determined according to the images, can represent the time of walking by the length of the target vehicle.
This embodiment sets up in the target area and predetermines the sign as above-mentioned same position, through gathering the image that contains this sign of predetermineeing, can discern this sign of predetermineeing fast, for example:
1) referring to fig. 3A, in the target area, a continuous triangle is set at the lateral position of the road as a preset mark.
By using the special symbol as the preset mark, the preset mark can be recognized more quickly and accurately.
2) Referring to fig. 3B, a line is set as a preset mark at a lateral position of the road in the target area.
By taking the strip-shaped graph as a preset identifier, the situation that the vehicle head arrives at the same position as the vehicle tail leaves can be accurately determined. The bar pattern may be set to a specific color in order to more accurately recognize the bar pattern.
The above identifiers are only examples of preset identifiers for implementing the embodiments of the present application, and the embodiments of the present application are not limited to the above two preset identifiers.
In addition, the embodiment does not limit the specific implementation manner for determining the first time and the second time, for example:
learning the characteristics of the vehicle by adopting a deep learning method so as to identify the vehicle in the image and determine the pixel coordinates of the vehicle; learning the characteristics of the preset identification by adopting a deep learning method so as to identify the preset identification in the image and determine the pixel coordinate of the preset identification, when the pixel coordinate of the head of the vehicle is detected to be on the pixel coordinate of the preset identification, taking the vehicle as a target vehicle, wherein the moment of shooting the image is a first moment;
when the pixel coordinate of the tail of the vehicle is detected to be on the pixel coordinate of the preset identification, the moment of shooting the image is the second moment.
Step 202: determining a displacement of the target vehicle from the first time to the second time based on the speed of the target vehicle.
In the embodiment, the speed of the target vehicle in the target area is acquired for multiple times within the time representing the length of the target vehicle, so that the displacement actually traveled by the vehicle in the time can be determined.
The present embodiment does not limit the specific implementation manner of determining the displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle. For example:
1) determining the average speed of the target vehicle in the target area acquired for multiple times, and taking the product of the average speed and the time period from the first moment to the second moment as the displacement of the target vehicle from the first moment to the second moment;
2) and determining the displacement corresponding to each interval according to the interval between the speed of the target vehicle in each acquisition target area and the speed of the target vehicle in the next acquisition target area, and taking the sum of the displacements corresponding to all the intervals in the time period from the first moment to the second moment as the displacement of the target vehicle from the first moment to the second moment.
The above is merely two possible implementation manners for determining the displacement of the target vehicle from the first time to the second time, and the present embodiment may also determine the displacement of the target vehicle from the first time to the second time in other manners.
Step 203: determining a length of the target vehicle from the displacement.
As shown in fig. 1C and 1D described above, the difference between the displacement of the target vehicle from the first time to the second time and the length of the target vehicle can be determined in the present embodiment, and the present embodiment can determine the length of the target vehicle based on the displacement of the target vehicle from the first time to the second time.
According to the scheme, the time when the head of the target vehicle reaches the preset identification and the time when the tail of the target vehicle leaves the preset identification are determined according to the collected images containing the target vehicle, the displacement of the target vehicle can be accurately determined according to the speed of the target vehicle collected between the two times, the displacement is composed of two parts, one part is the length of the target train, the other part is the length which can be accurately determined, and therefore the length of the target vehicle can be accurately determined according to the displacement of the target vehicle.
Fig. 4 is a schematic flowchart of a second vehicle length determining method provided by an embodiment of the present invention, and is applied to the vehicle length determining apparatus, as shown in fig. 4, the method may include:
step 401: and selecting the azimuth information of the target vehicle from the azimuth information of all the moving objects through space fusion according to the azimuth information of all the moving objects which are acquired by the movement state acquisition device for multiple times between the first moment and the second moment based on a preset movement state acquisition interval and the pixel positions of the target vehicle in the images which are acquired by the image acquisition device for multiple times between the first moment and the second moment based on the preset image acquisition interval.
The first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the mark and the time when the tail of the target vehicle leaves the preset mark are determined according to the images containing the target vehicle, which are collected for multiple times.
In this embodiment, the motion state acquisition device acquires the azimuth information, the speed, and the like of the moving object, and the pixel position of the vehicle in the image is obtained according to the image acquired by the image acquisition device, and in some specific embodiments, the information acquired by the motion state acquisition device is a timestamp, the number of the moving object, corresponding azimuth information (including distance, pitch angle, horizontal azimuth angle), and corresponding speed; the information collected by the motion state collecting device is an image and a time stamp, and the abscissa x and the ordinate y of the vehicle in the image and the corresponding time stamp can be obtained according to the image.
The motion state acquisition device can not identify the target vehicle (namely, the moving object identity information is not available), but the speed of the target vehicle can be obtained, the image acquisition device can identify the target vehicle but can not obtain the speed of the target vehicle, the information acquired by the two devices is fused, and based on the speed, the motion state acquisition device and the image acquisition device need to be unified in the same space dimension to perform data fusion calculation, the motion state acquisition device is taken as a radar, and the image acquisition device is taken as a camera for example:
converting to coordinates (Xw, Yw, Zw) under a world coordinate system through a preset equation according to the distance R and the horizontal azimuth angle alpha in the azimuth information of each moving object acquired by a radar; converting the coordinates of each moving object in the world coordinate system to coordinates (Xc, Yc, Zc) in the camera coordinate system based on the rotation matrix R and the translation matrix T; the coordinates (Xc, Yc, Zc) of each moving object in the camera coordinate system are converted into pixel coordinates (X, Y) based on the projection matrix M, the camera internal parameters M2, and the camera external parameters M1. By comparing the pixel coordinates of each moving object acquired by the radar and the pixel coordinates of each vehicle in the image acquired by the image acquisition device at the same time, which moving object is the target vehicle at the time can be acquired.
As can be seen from the foregoing embodiments, not only the motion state acquisition device and the image acquisition device need to be unified in the same spatial dimension, but also the data acquisition time for performing the data fusion calculation needs to be guaranteed to be the same, that is, the motion state acquisition device and the image acquisition device need to be unified in the same spatial dimension and time dimension to perform the data fusion calculation.
By setting the image acquisition interval to be positive integral multiple of the motion state acquisition interval, each image is ensured to have corresponding azimuth information, all images and all azimuth information, or all images and part of azimuth information, which can participate in information fusion.
In addition, the image acquisition interval is the same as the motion state acquisition interval, or is multiple times of the motion state acquisition interval, so that the acquired speed of the target vehicle exists at the first moment and the second moment, more accurate displacement of the target vehicle is obtained, and the accuracy of the determined length of the target vehicle is further improved.
In some specific embodiments, the image acquisition interval is the same as the motion state acquisition interval, that is, the image acquisition interval is 1 time of the motion state acquisition interval, so that the images and the orientation information are in one-to-one correspondence, and the images and the orientation information with the same timestamp are directly bound into a group, so that the information fusion process is faster and is not easy to make mistakes.
In this embodiment, the motion state acquisition device and the image acquisition device may be disposed in the vehicle length determination device, that is, the motion state acquisition device and the image acquisition device may be components of the vehicle length determination device, or the motion state acquisition device and the image acquisition device may also be independent devices, which may be specifically set according to an actual application scenario.
Step 402: and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
In this embodiment, the motion state acquisition device acquires the corresponding direction information, the corresponding speed, and the like of each moving object, and can determine which moving object is the target object according to the direction information of the moving object, and the corresponding speed is the speed of the target vehicle.
In some embodiments, if the radar uniquely numbers each moving object, the speed corresponding to the number of the moving object is the speed of the target vehicle.
Step 403: determining a displacement of the target vehicle from the first time to the second time based on the speed of the target vehicle.
In this embodiment, the displacement of the target vehicle from the first time to the second time may be determined according to the speed of the target vehicle and the motion state acquisition interval. For example:
and determining the displacement corresponding to each interval according to the interval between the speed of the target vehicle in each acquisition target area and the speed of the target vehicle in the next acquisition target area, and taking the sum of the displacements corresponding to all the intervals in the time period from the first moment to the second moment as the displacement of the target vehicle from the first moment to the second moment.
According to the speed and the motion state acquisition interval of the target vehicle, the accuracy of determining the displacement of the target vehicle from the first moment to the second moment is improved.
Step 404: determining a length of the target vehicle from the displacement.
Step 404 is implemented in the same manner as step 203 described above, and is not described here again.
According to the scheme, the direction information of the moving object acquired by the moving state acquisition device can be accurately projected to the point in the image plane acquired by the image acquisition device through spatial fusion, so that the direction information of the target vehicle can be selected from the direction information of the moving object; the speed corresponding to the azimuth information of the target vehicle is the speed of the target vehicle.
Fig. 5 is a schematic flowchart of a third vehicle length determining method according to an embodiment of the present invention, which is applied to the vehicle length determining apparatus, and as shown in fig. 5, the method may include:
step 501: the speed of a target vehicle that captures a target area a plurality of times between a first time and a second time is determined.
The first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the mark and the time when the tail of the target vehicle leaves the preset mark are determined according to the images containing the target vehicle, which are collected for multiple times.
Step 502: determining a displacement of the target vehicle from the first time to the second time based on the speed of the target vehicle.
The steps 501-502 are the same as the step 201-202, and are not described herein again.
Step 503: and determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle.
The displacement of target vehicle comprises two parts of the length of target train and the length that can accurately be confirmed, and the length that can accurately be confirmed is mainly the first offset that image acquisition device collection deviation caused that this target vehicle's height arouses caused, and based on this, need confirm first offset.
Referring to fig. 1C and 1D, at the time when the head of the target vehicle reaches the preset identifier in the image acquired by the image acquisition device, the head of the target vehicle has not actually reached the preset identifier, and the acquisition deviation of the image acquisition device caused by the height of the target vehicle is affected by the two factors: the angle of the image acquisition device relative to the preset identification and the height of the target vehicle. Specifically, the method comprises the following steps:
first offset LHH is the height of the target vehicle, and θ is an included angle between the image acquisition device and a preset identification connecting line and a horizontal line, namely an installation angle of the image acquisition device in the vertical direction.
Although the length of each type of vehicle is greatly different, the height of the same type of vehicle is basically consistent, so that the height of the target vehicle can be obtained by the following methods:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle;
and determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height.
Illustratively, the initial neural network model is trained by taking the sample image and the actual type of the vehicle contained in the sample image as input, the prediction result as output and the similarity between the actual type and the prediction result as an optimization condition, the collected image is input into the trained neural network model, the types of all vehicles contained in the obtained image are obtained, and the type of the target vehicle is determined. In the embodiment, the corresponding relations between various vehicle types and heights are preset, and the height of the target vehicle corresponding to the type of the target vehicle can be determined according to the corresponding relations.
The above types include, but are not limited to: cars, Sport Utility Vehicles (SUVs), minibuses, buses, engineering vehicles, trucks, and the like.
According to the scheme, the type of the target vehicle can be accurately obtained through the trained neural network model, and the height of each type of vehicle is basically consistent, so that the height of the target vehicle can be accurately and conveniently determined according to the first corresponding relation between the preset type and the height.
The embodiment does not limit the manner of obtaining the angle of the image capturing device relative to the preset identifier, for example:
1) the angle sensor determines the angle of the image acquisition device relative to a preset identifier;
2) after the image acquisition device is fixed in position, the installation angle is preset in the vehicle length determination device in advance.
The above two manners are only exemplary, and the present embodiment may also use other manners to obtain the angle of the image capturing device relative to the preset identifier.
In this embodiment, the target vehicle may travel in a direction away from the image capturing device or in a direction toward the image capturing device, the traveling direction is different, and the first offset amount caused by the capturing deviation of the image capturing device due to the height of the target vehicle is also different, see fig. 6A and 6B:
in fig. 6A, the target vehicle travels in a direction away from the image capturing device, and the first offset is caused by the capturing deviation of the image capturing device caused by the head height of the target vehicle;
in fig. 6B, the target vehicle travels toward the image capturing device, and the capturing deviation of the image capturing device due to the vehicle rear height of the target vehicle causes the first offset.
In this embodiment, the driving direction of a target vehicle needs to be recognized first, and if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
The embodiment does not limit the implementation manner of identifying the driving direction of the target vehicle, for example:
1) determining the driving direction of the target vehicle according to the pixel position change of the target vehicle in the images acquired for multiple times;
2) and according to the orientation information acquired for multiple times, determining the driving direction of the target vehicle after information fusion.
The embodiment may also identify the driving direction of the target vehicle in other manners, which is not described herein again.
In addition, the first corresponding relationship is a preset type, a driving direction and a height.
According to the scheme, the target vehicle can run towards the direction far away from the image acquisition device or towards the image acquisition device, different heights are selected as the heights of the target vehicle according to different scenes, and the accuracy of determining the first deviation amount can be improved.
In this embodiment, the sequence of the steps 501-502 and 503 is not limited, and the displacement may be determined first, or the first offset may be determined first, and in some specific embodiments, when the vehicle included in the image is identified, the first offset corresponding to each vehicle may be determined according to the angle of the image capturing device relative to the preset identifier and the height of each vehicle.
Step 504: and determining the length of the target vehicle according to the displacement and the first offset.
According to the scheme, the first deviation amount caused by the acquisition deviation of the image acquisition device due to the height of the target vehicle can be obtained according to the angle of the image acquisition device relative to the preset mark and the height of the target vehicle, and the length of the target vehicle can be accurately determined according to the displacement and the first deviation amount.
Fig. 7 is a schematic flowchart of a fourth vehicle length determining method according to an embodiment of the present invention, which is applied to the vehicle length determining apparatus, and as shown in fig. 7, the method may include:
step 701: the speed of a target vehicle that captures a target area a plurality of times between a first time and a second time is determined.
The first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the mark and the time when the tail of the target vehicle leaves the preset mark are determined according to the images containing the target vehicle, which are collected for multiple times.
Step 702: determining a displacement of the target vehicle from the first time to the second time based on the speed of the target vehicle.
Step 703: and determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle.
The implementation of steps 701-703 is the same as that of steps 501-503, and will not be described herein again.
Step 704: and determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle.
In this embodiment, the vehicle chassis is generally empty, so at the time when the tail of the target vehicle leaves the preset identifier in the image acquired by the image acquisition device, the tail of the target vehicle does not actually leave the preset identifier, and based on this, a second offset caused by the acquisition deviation of the image acquisition device due to the chassis height is further determined, as shown in fig. 8:
the acquisition deviation of the image acquisition device caused by the height of the target vehicle is influenced by two factors: the angle of the image acquisition device relative to the preset mark and the chassis height of the target vehicle. Specifically, the method comprises the following steps:
second offset LD=HD*cot(θ),HDAnd theta is the included angle between the image acquisition device and a preset identification connecting line and the horizontal line, namely the installation angle of the image acquisition device in the vertical direction.
Although the length of each type of vehicle is greatly different, the height of the base of the vehicle of the same type is basically consistent, so that the height of the base of the target vehicle can be obtained by the following methods:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle;
and determining the base height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the base height.
For example, the initial neural network model may be trained with reference to the above embodiment, and the collected image is input into the trained neural network model, so as to obtain the types of all vehicles included in the obtained image, and determine the type of the target vehicle therein. In the embodiment, the corresponding relation between various vehicle types and the base height is preset, and the base height of the target vehicle corresponding to the type of the target vehicle can be determined according to the corresponding relation.
The above types include, but are not limited to: cars, Sport Utility Vehicles (SUVs), minibuses, buses, engineering vehicles, trucks, and the like.
According to the scheme, the type of the target vehicle can be accurately obtained through the trained neural network model, and the base height of each type of vehicle is basically consistent, so that the base height of the target vehicle can be accurately and conveniently determined according to the first corresponding relation between the preset type and the height.
In addition, the manner of obtaining the angle of the image capturing device relative to the preset mark may refer to the above embodiments, and details are not repeated here.
In this embodiment, the sequence of the steps 701-702, 703 and 704 is not limited, and the displacement may be determined first, the first offset may be determined first, or the second offset may be determined first, which is not described herein again.
Step 705: determining a target offset according to the difference between the first offset and the second offset; and taking the difference between the displacement and the target offset as the length of the target vehicle.
In this embodiment, the determined length is mainly a first offset caused by the acquisition deviation of the image acquisition device due to the height of the target vehicle, and a second offset caused by the acquisition deviation of the image acquisition device due to the chassis height that offsets part of the first offset, so that the deviation between the final displacement and the length of the target vehicle can be accurately determined, that is, the length that can be accurately determined, and the difference between the displacement and the length is the length of the target vehicle. Also for example in fig. 8:
target offset LM=LH-LDLength L of target vehicleT=LS-LM=LS-LH+LD
According to the scheme, the second deviation amount for offsetting the first deviation amount is determined by considering the chassis height of the target vehicle, and the difference between the first deviation amount and the second deviation amount is used as the length which can be accurately determined, so that the accuracy of determining the length of the target vehicle is further improved.
As shown in fig. 9, based on the same inventive concept, an embodiment of the present invention provides a vehicle length determining apparatus 900, including:
a speed determining module 901, configured to determine a speed of a target vehicle in a target area acquired multiple times between a first time and a second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
a length determination module 902, configured to determine a displacement of the target vehicle from the first time to the second time according to a speed of the target vehicle;
a length determining module 902, further configured to determine a length of the target vehicle according to the displacement.
In some optional embodiments, the speed determination module 901 determines the speed of the target vehicle acquiring the target area multiple times between the first time and the second time, including:
according to the position information of all moving objects which are acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, and according to the pixel position of the target vehicle in the image which is acquired by the image acquisition device for multiple times between the first moment and the second moment based on a preset image acquisition interval, selecting the position information of the target vehicle from the position information of all moving objects through space fusion;
and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
In some optional embodiments, the length determination module 902 determines the displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle, including:
and determining the displacement of the target vehicle from the first moment to the second moment according to the speed of the target vehicle and the motion state acquisition interval.
In some alternative embodiments, the image acquisition interval is n times the motion state acquisition interval, n being a positive integer.
In some optional embodiments, the length determination module 902, prior to determining the length of the target vehicle from the displacement, is further configured to:
determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle;
the length determination module 902 determines the length of the target vehicle from the displacement, including:
and determining the length of the target vehicle according to the displacement and the first offset.
In some optional embodiments, the length determination module 902, prior to determining the length of the target vehicle from the displacement and the first offset, is further configured to:
determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle;
the length determination module 902 determines the length of the target vehicle according to the displacement and the first offset, including:
determining a target offset according to the difference between the first offset and the second offset;
and taking the difference between the displacement and the target offset as the length of the target vehicle.
In some optional embodiments, the length determination module 902 is further configured to:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height;
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; and determining the chassis height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the height.
In some optional embodiments, if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
Since the apparatus is the apparatus in the method in the embodiment of the present invention, and the principle of the apparatus for solving the problem is similar to that of the method, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 10, based on the same inventive concept, an embodiment of the present invention provides a vehicle length determining apparatus 1000 including: a processor 1001 and a memory 1002;
a memory 1002 for storing computer programs executed by the processor 1001. The memory 1002 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1002 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 1002 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1002 may be a combination of the above.
The processor 1001 may include one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), or digital Processing units (dsps), among others.
The embodiment of the present invention does not limit the specific connection medium between the memory 1002 and the processor 1001. In fig. 10, the memory 1002 and the processor 1001 are connected by a bus 1003, the bus 1003 is shown by a thick line in fig. 10, and the connection manner between other components is only schematically illustrated and is not limited. The bus 1003 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
Wherein the memory stores program code that, when executed by the processor, causes the processor to perform the following:
determining the speed of a target vehicle in a target area acquired for multiple times between a first time and a second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
determining a displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle;
determining a length of the target vehicle from the displacement.
In some optional embodiments, the processor is specifically configured to:
according to the position information of all moving objects which are acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, and according to the pixel position of the target vehicle in the image which is acquired by the image acquisition device for multiple times between the first moment and the second moment based on a preset image acquisition interval, selecting the position information of the target vehicle from the position information of all moving objects through space fusion;
and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
In some optional embodiments, the processor is specifically configured to:
and determining the displacement of the target vehicle from the first moment to the second moment according to the speed of the target vehicle and the motion state acquisition interval.
In some alternative embodiments, the image acquisition interval is n times the motion state acquisition interval, n being a positive integer.
In some optional embodiments, the processor is further configured to:
before the length of the target vehicle is determined according to the displacement, determining a first offset according to the angle of the image acquisition device relative to the preset identifier and the height of the target vehicle;
the processor is specifically configured to:
and determining the length of the target vehicle according to the displacement and the first offset.
In some optional embodiments, the processor is further configured to:
before the length of the target vehicle is determined according to the displacement and the first offset, determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle;
the processor is specifically configured to:
determining a target offset according to the difference between the first offset and the second offset;
and taking the difference between the displacement and the target offset as the length of the target vehicle.
In some optional embodiments, the processor is further configured to:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height;
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; and determining the chassis height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the height.
In some optional embodiments, if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
Since the device is a device for executing the method in the embodiment of the present invention, and the principle of the device for solving the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the vehicle length determination method as described above. The readable storage medium may be a nonvolatile readable storage medium, among others.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the invention. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (11)

1. A vehicle length determination method, characterized by comprising:
determining the speed of a target vehicle in a target area acquired for multiple times between a first time and a second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
determining a displacement of the target vehicle from the first time to the second time according to the speed of the target vehicle;
determining a length of the target vehicle from the displacement.
2. The method of claim 1, wherein determining the speed of the target vehicle to acquire the target area a plurality of times between the first time and the second time comprises:
according to the position information of all moving objects which are acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, and according to the pixel position of the target vehicle in the image which is acquired by the image acquisition device for multiple times between the first moment and the second moment based on a preset image acquisition interval, selecting the position information of the target vehicle from the position information of all moving objects through space fusion;
and determining the speed of the target vehicle, which is acquired by the motion state acquisition device for multiple times between the first moment and the second moment based on a preset motion state acquisition interval, according to the azimuth information of the target vehicle and the speeds corresponding to the azimuth information of all the moving objects.
3. The method of claim 2, wherein determining the displacement of the target vehicle from the first time to the second time as a function of the speed of the target vehicle comprises:
and determining the displacement of the target vehicle from the first moment to the second moment according to the speed of the target vehicle and the motion state acquisition interval.
4. A method according to claim 2 or 3, wherein the image acquisition interval is n times the motion state acquisition interval, n being a positive integer.
5. The method of claim 2, further comprising, prior to determining the length of the target vehicle from the displacement:
determining a first offset according to the angle of the image acquisition device relative to the preset identification and the height of the target vehicle;
determining a length of the target vehicle from the displacement, comprising:
and determining the length of the target vehicle according to the displacement and the first offset.
6. The method of claim 5, wherein prior to determining the length of the target vehicle from the displacement and the first offset amount, further comprising:
determining a second offset according to the angle of the image acquisition device relative to the preset identifier and the chassis height of the target vehicle;
determining a length of the target vehicle according to the displacement and the first offset amount, including:
determining a target offset according to the difference between the first offset and the second offset;
and taking the difference between the displacement and the target offset as the length of the target vehicle.
7. The method of claim 6, wherein the height of the target vehicle is obtained by:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; determining the height of the target vehicle corresponding to the type of the target vehicle according to a first corresponding relation between a preset type and the height;
the chassis height of the target vehicle is obtained by the following method:
identifying the images acquired for multiple times based on the trained neural network model to obtain the type of the target vehicle; and determining the chassis height of the target vehicle corresponding to the type of the target vehicle according to a second corresponding relation between the preset type and the height.
8. The method according to any one of claims 5 to 7, wherein if the driving direction of the target vehicle is a direction away from the image acquisition device, the height of the target vehicle is the head height of the target vehicle;
and if the target vehicle runs in the direction close to the image acquisition device, the height of the target vehicle is the tail height of the target vehicle.
9. A vehicle length determination apparatus, characterized by comprising:
the speed determining module is used for determining the speed of a target vehicle for acquiring the target area for multiple times between the first time and the second time; the first moment is the moment when the head of the target vehicle reaches a preset mark on the target area; the second moment is the moment when the tail of the target vehicle leaves the preset identifier; the time when the head of the target vehicle reaches the identifier and the time when the tail of the target vehicle leaves the preset identifier are determined according to the images containing the target vehicle, which are collected for multiple times;
a length determination module for determining a displacement of the target vehicle from the first time to the second time according to a speed of the target vehicle;
and the length determining module is also used for determining the length of the target vehicle according to the displacement.
10. A vehicle length determination apparatus, characterized by comprising: a processor and a memory;
wherein the memory stores program code which, when executed by the processor, causes the processor to perform the method of any of claims 1 to 8.
11. A computer-readable storage medium comprising computer program instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 8.
CN202011038338.8A 2020-09-28 2020-09-28 Vehicle length determination method, device, equipment and storage medium Active CN112229360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011038338.8A CN112229360B (en) 2020-09-28 2020-09-28 Vehicle length determination method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011038338.8A CN112229360B (en) 2020-09-28 2020-09-28 Vehicle length determination method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112229360A true CN112229360A (en) 2021-01-15
CN112229360B CN112229360B (en) 2022-02-18

Family

ID=74120273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011038338.8A Active CN112229360B (en) 2020-09-28 2020-09-28 Vehicle length determination method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112229360B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114038191A (en) * 2021-11-05 2022-02-11 青岛海信网络科技股份有限公司 Method and device for collecting traffic data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108550143A (en) * 2018-04-03 2018-09-18 长安大学 A kind of measurement method of the vehicle length, width and height size based on RGB-D cameras
CN109727456A (en) * 2017-10-30 2019-05-07 杭州海康威视数字技术股份有限公司 A kind of method and device identifying vehicles identifications
JP2019124985A (en) * 2018-01-12 2019-07-25 オムロン株式会社 Vehicle detector, vehicle detection method, and vehicle detection program
CN110824188A (en) * 2019-10-17 2020-02-21 浙江大华技术股份有限公司 Speed measuring method and device for highway vehicles, coder-decoder and storage device
CN111339877A (en) * 2020-02-19 2020-06-26 北京百度网讯科技有限公司 Method and device for detecting length of blind area, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727456A (en) * 2017-10-30 2019-05-07 杭州海康威视数字技术股份有限公司 A kind of method and device identifying vehicles identifications
JP2019124985A (en) * 2018-01-12 2019-07-25 オムロン株式会社 Vehicle detector, vehicle detection method, and vehicle detection program
CN108550143A (en) * 2018-04-03 2018-09-18 长安大学 A kind of measurement method of the vehicle length, width and height size based on RGB-D cameras
CN110824188A (en) * 2019-10-17 2020-02-21 浙江大华技术股份有限公司 Speed measuring method and device for highway vehicles, coder-decoder and storage device
CN111339877A (en) * 2020-02-19 2020-06-26 北京百度网讯科技有限公司 Method and device for detecting length of blind area, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114038191A (en) * 2021-11-05 2022-02-11 青岛海信网络科技股份有限公司 Method and device for collecting traffic data
CN114038191B (en) * 2021-11-05 2023-10-27 青岛海信网络科技股份有限公司 Method and device for collecting traffic data

Also Published As

Publication number Publication date
CN112229360B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
DE102017123515B4 (en) Method, device, storage medium and program product for lateral vehicle position determination
CN112069643B (en) Automatic driving simulation scene generation method and device
CN104517283B (en) The system of the on-line calibration of video camera, vehicle and method on vehicle
CN109949594A (en) Real-time traffic light recognition method
JP4793324B2 (en) Vehicle monitoring apparatus and vehicle monitoring method
WO2018197122A1 (en) Method for automatically producing and updating a dataset for an autonomous vehicle
CN103770704A (en) System and method for recognizing parking space line markings for vehicle
CN111145555B (en) Method and device for detecting vehicle violation
CN112154445A (en) Method and device for determining lane line in high-precision map
WO2023201904A1 (en) Abnormal vehicle traveling detection method, and electronic device and storage medium
CN107628032A (en) Automatic Pilot control method, device, vehicle and computer-readable recording medium
CN112753038B (en) Method and device for identifying lane change trend of vehicle
US20190147257A1 (en) Method for detecting traffic signs
CN105868688A (en) Traveling road surface detection device and traveling road surface detection method
CN104427255A (en) Image processing method of vehicle camera and image processing apparatus using the same
JP2020067698A (en) Partition line detector and partition line detection method
US20210237737A1 (en) Method for Determining a Lane Change Indication of a Vehicle
CN110135377A (en) Object moving state detection method, device, server and computer-readable medium
CN112229360B (en) Vehicle length determination method, device, equipment and storage medium
CN111160132B (en) Method and device for determining lane where obstacle is located, electronic equipment and storage medium
CN114639085A (en) Traffic signal lamp identification method and device, computer equipment and storage medium
CN117079238A (en) Road edge detection method, device, equipment and storage medium
CN111126154A (en) Method and device for identifying road surface element, unmanned equipment and storage medium
DE102020200133A1 (en) Method and device for operating an automated vehicle
CN116524758A (en) Simulation test method and device for roads and scenes in automatic driving

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
GR01 Patent grant
GR01 Patent grant