CN113327264A - Trajectory fitting method, device, equipment and storage medium - Google Patents

Trajectory fitting method, device, equipment and storage medium Download PDF

Info

Publication number
CN113327264A
CN113327264A CN202110608649.1A CN202110608649A CN113327264A CN 113327264 A CN113327264 A CN 113327264A CN 202110608649 A CN202110608649 A CN 202110608649A CN 113327264 A CN113327264 A CN 113327264A
Authority
CN
China
Prior art keywords
track
point
segmented
fitting
bezier curve
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
CN202110608649.1A
Other languages
Chinese (zh)
Other versions
CN113327264B (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.)
Xingmi Shanghai Technology Co ltd
Original Assignee
Xingmi Shanghai 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 Xingmi Shanghai Technology Co ltd filed Critical Xingmi Shanghai Technology Co ltd
Priority to CN202110608649.1A priority Critical patent/CN113327264B/en
Publication of CN113327264A publication Critical patent/CN113327264A/en
Application granted granted Critical
Publication of CN113327264B publication Critical patent/CN113327264B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • 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/30241Trajectory

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The embodiment of the invention discloses a track fitting method, a track fitting device, track fitting equipment and a storage medium. The method comprises the following steps: acquiring a track point set corresponding to a path to be fitted; performing segmentation fitting on the track point set to obtain a plurality of segmented tracks; carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track; and splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track. The track fitting method disclosed by the embodiment of the invention performs segmented fitting on the track point set to obtain a plurality of segmented tracks, and performs Bezier curve fitting on paths between adjacent segmented tracks in the plurality of segmented tracks, so that the precision and the smoothness of the fitted tracks can be improved.

Description

Trajectory fitting method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of intelligent traffic and intelligent driving, in particular to a track fitting method, device, equipment and storage medium.
Background
Currently, the following two methods are generally adopted in performing trajectory fitting: one is to perform one-time fitting on all the collected track points; and the second method is to perform segmentation fitting on all the acquired track points and then splice all the segmentation tracks. The deviation between the track fitted by the first mode and the actual path is large, and the splicing position of the segmented track by the second mode is not smooth.
Disclosure of Invention
The embodiment of the invention provides a track fitting method, a track fitting device, track fitting equipment and a storage medium, which are used for realizing the fitting of a track and improving the precision and the smoothness of the fitted track.
In a first aspect, an embodiment of the present invention provides a trajectory fitting method, including:
acquiring a track point set corresponding to a path to be fitted;
performing segmentation fitting on the track point set to obtain a plurality of segmented tracks;
carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track;
and splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track.
Further, acquiring a track point set corresponding to the path to be fitted, including:
controlling a vehicle provided with a positioning device to run along the path to be fitted, and acquiring a positioning information set of the vehicle in the running process; or acquiring a running track corresponding to the path to be fitted on editable map software, extracting scattered points from the running track according to a set interval, and determining the positioning information of each scattered point to obtain a positioning information set; the positioning information is represented by longitude and latitude coordinates;
and converting the positioning information set into a track point set represented by the plane coordinates according to the conversion relation between the longitude and latitude coordinates and the plane coordinates.
Further, performing segment fitting on the trajectory point set to obtain a plurality of segment trajectories, including:
sequencing the track point sets according to the driving direction;
selecting a sub-point set of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present according to a sorting sequence; wherein the one-way change comprises an increment or a decrement;
performing curve fitting with the order not exceeding a set value on the sub-point set to obtain a plurality of fitting curves;
determining a fitting curve with an error smaller than a set threshold and containing the most track points as a current segmented track;
and returning to execute the operation of sequentially selecting the sub-point sets of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present until all the track points are fitted to obtain a plurality of segmented tracks.
Further, performing bezier curve fitting on paths between adjacent segmented trajectories among the plurality of segmented trajectories to obtain at least one intermediate trajectory, including:
for each group of adjacent segmented tracks, the segmented tracks comprise a previous segmented track and a next segmented track; taking the end point of the last subsection track as the starting point of the Bezier curve, and taking the starting point of the next subsection track as the end point of the Bezier curve;
determining a first tangent line where the end point of the last segmented track is located and a second tangent line where the start point of the next segmented track is located;
determining at least two intermediate points from the first tangent and the second tangent;
and carrying out Bezier curve fitting on the starting point of the Bezier curve, the at least two intermediate points and the end point of the Bezier curve to obtain an intermediate track.
Further, determining at least two intermediate points from the first tangent and the second tangent includes:
determining a first intermediate point on the first tangent; wherein a direction from the end point of the last segmented track to the first intermediate point is a driving direction;
determining a second intermediate point on the second tangent line; wherein a direction from the starting point of the next segment trajectory to the second intermediate point is a direction opposite to the traveling direction.
Further, after performing bezier curve fitting on the starting point of the bezier curve, the at least two intermediate points, and the end point of the bezier curve to obtain an intermediate trajectory, the method further includes:
acquiring the arc length and the chord length of the middle track;
judging whether the middle track meets the condition or not according to the arc length and the chord length;
and if not, adjusting the first intermediate point and the second intermediate point, and returning to execute Bezier curve fitting operation according to the starting point of the Bezier curve, the adjusted first intermediate point, the adjusted second intermediate point and the end point of the Bezier curve until the intermediate track meets the condition.
Further, adjusting the first intermediate point and the second intermediate point comprises:
moving a first intermediate point on the first tangent line along the direction opposite to the driving direction so as to reduce the distance between the first intermediate point and the end point of the last segmented track;
and moving a second intermediate point on the second tangent line along the driving direction to reduce the distance between the second intermediate point and the starting point of the next segmented track.
Further, judging whether the middle track meets a set condition according to the arc length and the chord length includes:
calculating the difference between the arc length and the chord length;
obtaining a deviation value by taking the quotient of the difference value and the chord length;
if the deviation value is smaller than a set threshold value, the middle track meets the condition; otherwise, the intermediate trajectory does not satisfy a condition.
In a second aspect, an embodiment of the present invention further provides a trajectory fitting apparatus, including:
the track point set acquisition module is used for acquiring a track point set corresponding to the path to be fitted;
the segmented track acquisition module is used for performing segmented fitting on the track point set to obtain a plurality of segmented tracks;
the middle track acquisition module is used for respectively carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one middle track;
and the target track acquisition module is used for splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the trajectory fitting method according to an embodiment of the invention when executing the program.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processing apparatus, implements the trajectory fitting method according to the embodiment of the present invention.
The embodiment of the invention discloses a track fitting method, a track fitting device, track fitting equipment and a storage medium. Acquiring a track point set corresponding to a path to be fitted; performing segmentation fitting on the track point set to obtain a plurality of segmented tracks; carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track; and splicing the plurality of segmented tracks and at least one intermediate track according to a set driving direction to obtain a target track. The track fitting method disclosed by the embodiment of the invention performs segmented fitting on the track point set to obtain a plurality of segmented tracks, and performs Bezier curve fitting on paths between adjacent segmented tracks in the plurality of segmented tracks, so that the precision and the smoothness of the fitted tracks can be improved.
Drawings
FIG. 1 is a flow chart of a trajectory fitting method according to a first embodiment of the present invention;
FIG. 2 is an exemplary graph of Bezier curve fitting in a first embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a trajectory fitting device according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a trajectory fitting method according to an embodiment of the present invention, where the embodiment is applicable to a situation of fitting a trajectory of a driving route, and the method may be executed by a trajectory fitting device, where the device may be composed of hardware and/or software, and may be generally integrated in a device with a trajectory fitting function, where the device may be an electronic device such as a server or a server cluster. As shown in fig. 1, the method specifically includes the following steps:
and step 110, acquiring a track point set corresponding to the path to be fitted.
The path to be fitted may be a path traveled by the vehicle on an actual road. The set of trajectory points may be from a set of points acquired on the path to be fitted.
Specifically, the manner of obtaining the track point set corresponding to the path to be fitted may be: controlling a vehicle provided with a positioning device to run along a path to be fitted, and acquiring a positioning information set of the vehicle in the running process; or acquiring a running track corresponding to the path to be fitted on editable map software, extracting scattered points from the running track according to a set interval, and determining the positioning information of each scattered point to obtain a positioning information set; and converting the positioning information set into a track point set represented by the plane coordinates according to the conversion relation between the longitude and latitude coordinates and the plane coordinates.
Wherein the positioning information is characterized by latitude and longitude coordinates. In this embodiment, the vehicle is provided with a positioning device, the vehicle is controlled to travel on an actual path to be fitted, and positioning information of each position of the vehicle in the traveling process is recorded and stored, so that a positioning information set is obtained. Or using map software with an editable function, extracting a driving track needing to be fitted on the map software, sampling from the driving track, obtaining a plurality of scattered points on the driving track, determining the positioning information of each scattered point, and obtaining a positioning information set.
In this embodiment, for subsequent track fitting, the positioning information set represented by the longitude and latitude coordinates needs to be converted into the track point set represented by the plane coordinates according to the conversion relationship between the longitude and latitude coordinates and the plane coordinates. Wherein the plane coordinates include an abscissa (x-coordinate) and an ordinate (y-coordinate). The method for acquiring the track point set corresponding to the path to be fitted is not limited to the above two methods, and any method capable of acquiring the track point set in the field is within the scope of the present application.
And step 120, performing segmentation fitting on the track point set to obtain a plurality of segmented tracks.
In this embodiment, the step of performing piecewise fitting on the trajectory point set may be to split the trajectory point set into a plurality of sub-point sets, and then perform curve fitting on each sub-point set to obtain a plurality of piecewise trajectories. Wherein the curve fitting may be a curve fitting having an order not exceeding a set value.
Specifically, the process of performing piecewise fitting on the track point set to obtain a plurality of piecewise tracks may be: sequencing the track point sets according to the driving direction; selecting a sub-point set of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present according to a sorting sequence; performing curve fitting on the sub-point set, wherein the order of the sub-point set does not exceed a set value, and obtaining a plurality of fitting curves; determining a fitting curve with an error smaller than a set threshold and containing the most track points as a current segmented track; and returning to execute the operation of sequentially selecting the sub-point sets of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present until all the track points are fitted to obtain a plurality of segmented tracks.
Wherein the one-way change comprises an increment or a decrement. The plane coordinates include an abscissa and an ordinate. The plane coordinate satisfying the one-way change can be understood as the abscissa satisfying the one-way change or the ordinate satisfying the one-way change. And the sub-point set is the most corresponding track points with the abscissa meeting the unidirectional change and the ordinate meeting the unidirectional change. For example: suppose the trace points include: a1(x1, y1), a2(x2, y2), A3(x3, y3), A4(x4, y4) and A5(x5, y5), wherein the plane coordinates of each point satisfy x1< x2< x3> x4> x5, y1> y2> y3> y4< y5, it can be seen that the abscissa of three points a1, a2 and A3 satisfies a unidirectional change, and the ordinate of four points a1, a2, A3 and A4 satisfies a unidirectional change, then the selected set of sub-points is (a1, a2, A3, A4).
Wherein the set value may be 4. The way of curve fitting that the order does not exceed the set value can be to the trace point in the set of sub-points, carry out 1 rank's curve fitting to two preceding trace points, carry out 1 rank and 2 ranks's curve fitting to three preceding points, carry out 1 rank, 2 ranks and 3 ranks's fitting to four preceding points, carry out 1 rank, 2 ranks, 3 ranks and 4 ranks's curve fitting to 5 preceding points, analogize in proper order, until all trace points in the set of sub-points carry out the curve fitting that the order does not exceed 4, obtain a plurality of fitting curves.
And when a plurality of fitted curves are obtained, determining the error of each fitted curve, and determining the fitted curve with the error smaller than a set threshold and containing the most track points as the current segmented track.
Specifically, after a current segmentation track is obtained, sequentially selecting a sub-point set of which the plane coordinates meet the unidirectional change from track points which are not fitted currently, and performing curve fitting on the sub-point set, wherein the order of the sub-point set does not exceed a set value, so as to obtain a plurality of fitting curves; and determining the segmented track by using the fitting curve with the error smaller than a set threshold and containing the most track points until all the track points are fitted. Illustratively, assuming that the first 10 track points in the track point set complete fitting, a sub-point set with plane coordinates meeting unidirectional change is selected from the 11 th track point for segment fitting until all points in the track point set complete fitting.
Step 130, performing bezier curve fitting on paths between adjacent segmented trajectories among the plurality of segmented trajectories to obtain at least one intermediate trajectory.
Wherein the bezier curve fit may comprise a fit of order 2 or more.
Specifically, the method of performing bezier curve fitting on the path between adjacent segmented trajectories among the multiple segmented trajectories to obtain at least one intermediate trajectory may be: for each group of adjacent segmented tracks, the segmented tracks comprise a previous segmented track and a next segmented track; taking the end point of the last subsection track as the starting point of the Bezier curve, and taking the starting point of the next subsection track as the end point of the Bezier curve; determining a first tangent line where the end point of the last segmented track is located and a second tangent line where the start point of the next segmented track is located; determining at least two intermediate points according to the first tangent and the second tangent; and carrying out Bezier curve fitting on the starting point, the at least two intermediate points and the end point of the Bezier curve to obtain an intermediate track.
The first tangent line is a line which passes through the terminal point of the last subsection track and is tangent to the last subsection track; the second tangent line is a line passing through the start point of the next segmented trajectory and tangent to the next segmented trajectory.
In this embodiment, the manner of determining the at least two intermediate points according to the first tangent and the second tangent may be: determining a first intermediate point on the first tangent line, wherein the direction from the end point of the last segmented track to the first intermediate point is the driving direction; a second intermediate point is determined on the second tangent line, and the direction from the starting point of the next segmented trajectory to the second intermediate point is the opposite direction of the driving direction.
The distance between the end point of the last subsection track and the first middle point is a set multiple of the distance between the end point of the last subsection track and the starting point of the next subsection track; the distance between the starting point of the next segmented track and the second middle point is a set multiple of the distance between the end point of the last segmented track and the starting point of the next segmented track. The set multiple may be set to 0.2.
Illustratively, fig. 2 is an exemplary graph of bezier curve fitting in an embodiment of the invention. As shown in fig. 2, L1 is the last segment track, L2 is the next segment track, point B is the end point of the last segment track, and point C is the start point of the next segment track. And (3) making auxiliary rays BE and FJ, wherein BE is a ray passing through the point B and tangent to the curve L1 at the point B, the direction is the driving direction, FJ is a ray passing through the point C and tangent to the curve L2 at the point C, and the direction is the driving direction. That is, BE is the first tangent and CJ is the second tangent. Selecting a point E from the point B in the direction of the BE ray as a first intermediate point; and selecting a point F from the point C to the opposite direction of the FJ ray direction as a second intermediate point. Wherein BE ═ 0.2 × BC, and CF ═ 0.2 × BC.
Finally, according to the B point coordinate (X)B,YB) Coordinate of point E (X)E,YE) Coordinate of point F (X)F,YF) And C point coordinate (X)C,YC) The equation for solving the Bezier curve is:
equation 1: x ═ XB(1-t)3+3XEt(1-t)2+3XFt2(1-t)+Xct3
Equation 2: y ═ YB(1-t)3+3YEt(1-t)2+3YFt2(1-t)+YC t3
Wherein t is ∈ [0,1 ].
Optionally, after performing bezier curve fitting on the starting point of the bezier curve, the at least two intermediate points, and the end point of the bezier curve to obtain the intermediate trajectory, the method further includes the following steps: acquiring the arc length and the chord length of the middle track; judging whether the middle track meets the condition according to the arc length and the chord length; and if not, adjusting the first intermediate point and the second intermediate point, and returning to execute the Bezier curve fitting operation according to the starting point of the Bezier curve, the adjusted first intermediate point, the adjusted second intermediate point and the end point of the Bezier curve until the intermediate track meets the condition.
Wherein, the arc length of the middle track can be calculated according to the following formula:
Figure BDA0003094634600000101
where dY and dX are equations in equations 1 and 2. The chord length of the intermediate trajectory can be calculated according to the linear distance formula:
Figure BDA0003094634600000102
specifically, the process of judging whether the middle trajectory meets the set condition according to the arc length and the chord length may be: calculating the difference value of the arc length and the chord length; the difference value and the chord length are subjected to quotient to obtain an offset value; if the deviation value is smaller than the set threshold value, the middle track meets the condition; otherwise, the intermediate trajectory does not satisfy the condition.
Wherein, the setting threshold value can be set according to the actual requirement.
In this embodiment, if the middle trajectory satisfies the condition, the middle trajectory is retained. If the intermediate track does not satisfy the condition, adjusting the first intermediate point and the second intermediate point as follows: moving the first intermediate point along the opposite direction of the driving direction on the first tangent line so as to reduce the distance between the first intermediate point and the end point of the last subsection track; and moving the second intermediate point on the second tangent line along the driving direction to reduce the distance between the second intermediate point and the starting point of the next segmented track.
Wherein, assuming that the adjusted first intermediate point is E 'and the adjusted second intermediate point is F', the adjusted intermediate point satisfies the following formula: BE '═ 0.9 × BE, CF' ═ 0.9 × CF. And after the intermediate points are adjusted, carrying out Bezier curve fitting again according to the coordinates of the points B, E ', F' and C to obtain an adjusted intermediate track, continuously judging whether the intermediate track meets the condition, and if the intermediate track does not meet the condition, continuously adjusting the first intermediate point and the second intermediate point until the intermediate track meets the condition.
In this embodiment, other intermediate points may also be determined according to the first intermediate point and the second intermediate point, and finally, a bezier curve fitting is performed on the starting point of the bezier curve, the at least two intermediate points, and the end point of the bezier curve, where the fitting process is similar to that in the above embodiment, and is not described here again.
And step 140, splicing the plurality of segmented tracks and at least one intermediate track according to a set driving direction to obtain a target track.
Specifically, the plurality of segmented tracks and at least one intermediate track are directly connected end to end according to a set driving direction to obtain a target track.
According to the technical scheme of the embodiment, a track point set corresponding to a path to be fitted is obtained; performing segmentation fitting on the track point set to obtain a plurality of segmented tracks; carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track; and splicing the plurality of segmented tracks and at least one intermediate track according to a set driving direction to obtain a target track. The track fitting method disclosed by the embodiment of the invention performs segmented fitting on the track point set to obtain a plurality of segmented tracks, and performs Bezier curve fitting on paths between adjacent segmented tracks in the plurality of segmented tracks, so that the precision and the smoothness of the fitted tracks can be improved.
Example two
Fig. 3 is a schematic structural diagram of a trajectory fitting apparatus according to a second embodiment of the present invention. As shown in fig. 3, the apparatus includes:
a track point set obtaining module 210, configured to obtain a track point set corresponding to a path to be fitted;
a segmented trajectory acquisition module 220, configured to perform segmented fitting on the trajectory point set to obtain a plurality of segmented trajectories;
an intermediate trajectory obtaining module 230, configured to perform bezier curve fitting on paths between adjacent segmented trajectories in the multiple segmented trajectories, respectively, to obtain at least one intermediate trajectory;
and a target track obtaining module 240, configured to splice the multiple segmented tracks and the at least one intermediate track according to a set driving direction, so as to obtain a target track.
Optionally, the track point set obtaining module 210 is further configured to:
controlling a vehicle provided with a positioning device to run along a path to be fitted, and acquiring a positioning information set of the vehicle in the running process; or acquiring a running track corresponding to the path to be fitted on editable map software, extracting scattered points from the running track according to a set interval, and determining the positioning information of each scattered point to obtain a positioning information set; the positioning information is represented by longitude and latitude coordinates;
and converting the positioning information set into a track point set represented by the plane coordinates according to the conversion relation between the longitude and latitude coordinates and the plane coordinates.
Optionally, the segmented trajectory obtaining module 220 is further configured to:
sequencing the track point sets according to the driving direction;
selecting a sub-point set of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present according to a sorting sequence; wherein the one-way change comprises an increment or a decrement;
performing curve fitting on the sub-point set, wherein the order of the sub-point set does not exceed a set value, and obtaining a plurality of fitting curves;
determining a fitting curve with an error smaller than a set threshold and containing the most track points as a current segmented track;
and returning to execute the operation of sequentially selecting the sub-point sets of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present until all the track points are fitted to obtain a plurality of segmented tracks.
Optionally, the intermediate trajectory obtaining module 230 is further configured to:
for each group of adjacent segmented tracks, the segmented tracks comprise a previous segmented track and a next segmented track; taking the end point of the last subsection track as the starting point of the Bezier curve, and taking the starting point of the next subsection track as the end point of the Bezier curve;
determining a first tangent line where the end point of the last segmented track is located and a second tangent line where the start point of the next segmented track is located;
determining at least two intermediate points according to the first tangent and the second tangent;
and carrying out Bezier curve fitting on the starting point, the at least two intermediate points and the end point of the Bezier curve to obtain an intermediate track.
Optionally, the intermediate trajectory obtaining module 230 is further configured to:
determining a first intermediate point on the first tangent; wherein, the direction from the terminal point of the last subsection track to the first middle point is the driving direction;
determining a second intermediate point on the second tangent line; wherein, the direction from the starting point of the next sectional track to the second middle point is the opposite direction of the driving direction.
Optionally, the method further includes: a middle trajectory adjustment module to:
acquiring the arc length and the chord length of the middle track;
judging whether the middle track meets the condition according to the arc length and the chord length;
and if not, adjusting the first intermediate point and the second intermediate point, and returning to execute the Bezier curve fitting operation according to the starting point of the Bezier curve, the adjusted first intermediate point, the adjusted second intermediate point and the end point of the Bezier curve until the intermediate track meets the condition.
Optionally, the intermediate trajectory adjusting module is further configured to:
moving the first intermediate point along the opposite direction of the driving direction on the first tangent line so as to reduce the distance between the first intermediate point and the end point of the last subsection track;
and moving the second intermediate point on the second tangent line along the driving direction to reduce the distance between the second intermediate point and the starting point of the next segmented track.
Optionally, the intermediate trajectory adjusting module is further configured to:
calculating the difference value of the arc length and the chord length;
the difference value and the chord length are subjected to quotient to obtain an offset value;
if the deviation value is smaller than the set threshold value, the middle track meets the condition; otherwise, the intermediate trajectory does not satisfy the condition.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 4 illustrates a block diagram of a computer device 312 suitable for use in implementing embodiments of the present invention. The computer device 312 shown in FIG. 4 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention. Device 312 is a computing device for typical trajectory fitting functions.
As shown in FIG. 4, computer device 312 is in the form of a general purpose computing device. The components of computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that couples the various system components including the storage device 328 and the processors 316.
Bus 318 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Computer device 312 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 328 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 330 and/or cache Memory 332. The computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 by one or more data media interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which may comprise an implementation of a network environment, or some combination thereof. Program modules 326 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), with one or more devices that enable a user to interact with the computer device 312, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 312 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 322. Also, computer device 312 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), etc.) and/or a public Network, such as the internet, via Network adapter 320. As shown, network adapter 320 communicates with the other modules of computer device 312 via bus 318. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
Processor 316 executes programs stored in memory device 328 to perform various functional applications and data processing, such as implementing the trajectory fitting methods provided by the above-described embodiments of the present invention.
Example four
Embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processing device, implements a trajectory fitting method as in embodiments of the present invention. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a track point set corresponding to a path to be fitted; performing segmentation fitting on the track point set to obtain a plurality of segmented tracks; carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track; and splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (11)

1. A trajectory fitting method, comprising:
acquiring a track point set corresponding to a path to be fitted;
performing segmentation fitting on the track point set to obtain a plurality of segmented tracks;
carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one intermediate track;
and splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track.
2. The method of claim 1, wherein obtaining a set of trajectory points corresponding to a path to be fitted comprises:
controlling a vehicle provided with a positioning device to run along the path to be fitted, and acquiring a positioning information set of the vehicle in the running process; or acquiring a running track corresponding to the path to be fitted on editable map software, extracting scattered points from the running track according to a set interval, and determining the positioning information of each scattered point to obtain a positioning information set; the positioning information is represented by longitude and latitude coordinates;
and converting the positioning information set into a track point set represented by the plane coordinates according to the conversion relation between the longitude and latitude coordinates and the plane coordinates.
3. The method of claim 1, wherein piecewise fitting the set of trajectory points to obtain a plurality of piecewise trajectories comprises:
sequencing the track point sets according to the driving direction;
selecting a sub-point set of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present according to a sorting sequence; wherein the one-way change comprises an increment or a decrement;
performing curve fitting with the order not exceeding a set value on the sub-point set to obtain a plurality of fitting curves;
determining a fitting curve with an error smaller than a set threshold and containing the most track points as a current segmented track;
and returning to execute the operation of sequentially selecting the sub-point sets of which the plane coordinates meet the unidirectional change from the track points which are not fitted at present until all the track points are fitted to obtain a plurality of segmented tracks.
4. The method of claim 1, wherein performing a bezier curve fit on paths between adjacent segmented trajectories of the plurality of segmented trajectories to obtain at least one intermediate trajectory comprises:
for each group of adjacent segmented tracks, the segmented tracks comprise a previous segmented track and a next segmented track; taking the end point of the last subsection track as the starting point of the Bezier curve, and taking the starting point of the next subsection track as the end point of the Bezier curve;
determining a first tangent line where the end point of the last segmented track is located and a second tangent line where the start point of the next segmented track is located;
determining at least two intermediate points from the first tangent and the second tangent;
and carrying out Bezier curve fitting on the starting point of the Bezier curve, the at least two intermediate points and the end point of the Bezier curve to obtain an intermediate track.
5. The method of claim 4, wherein determining at least two intermediate points from the first tangent and the second tangent comprises:
determining a first intermediate point on the first tangent; wherein a direction from the end point of the last segmented track to the first intermediate point is a driving direction;
determining a second intermediate point on the second tangent line; wherein a direction from the starting point of the next segment trajectory to the second intermediate point is a direction opposite to the traveling direction.
6. The method of claim 5, further comprising, after performing a Bezier curve fit on the starting point of the Bezier curve, the at least two intermediate points, and the ending point of the Bezier curve to obtain an intermediate trajectory:
acquiring the arc length and the chord length of the middle track;
judging whether the middle track meets the condition or not according to the arc length and the chord length;
and if not, adjusting the first intermediate point and the second intermediate point, and returning to execute Bezier curve fitting operation according to the starting point of the Bezier curve, the adjusted first intermediate point, the adjusted second intermediate point and the end point of the Bezier curve until the intermediate track meets the condition.
7. The method of claim 6, wherein adjusting the first intermediate point and the second intermediate point comprises:
moving a first intermediate point on the first tangent line along the direction opposite to the driving direction so as to reduce the distance between the first intermediate point and the end point of the last segmented track;
and moving a second intermediate point on the second tangent line along the driving direction to reduce the distance between the second intermediate point and the starting point of the next segmented track.
8. The method of claim 6, wherein determining whether the intermediate track meets a set condition according to the arc length and the chord length comprises:
calculating the difference between the arc length and the chord length;
obtaining a deviation value by taking the quotient of the difference value and the chord length;
if the deviation value is smaller than a set threshold value, the middle track meets the condition; otherwise, the intermediate trajectory does not satisfy a condition.
9. A trajectory fitting device, comprising:
the track point set acquisition module is used for acquiring a track point set corresponding to the path to be fitted;
the segmented track acquisition module is used for performing segmented fitting on the track point set to obtain a plurality of segmented tracks;
the middle track acquisition module is used for respectively carrying out Bezier curve fitting on paths between adjacent segmented tracks in the segmented tracks to obtain at least one middle track;
and the target track acquisition module is used for splicing the plurality of segmented tracks and the at least one intermediate track according to a set driving direction to obtain a target track.
10. A computer device, the device comprising: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the trajectory fitting method according to any one of claims 1 to 8 when executing the program.
11. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processing device, is adapted to carry out the trajectory fitting method according to any one of claims 1 to 8.
CN202110608649.1A 2021-06-01 2021-06-01 Trajectory fitting method, device, equipment and storage medium Active CN113327264B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110608649.1A CN113327264B (en) 2021-06-01 2021-06-01 Trajectory fitting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110608649.1A CN113327264B (en) 2021-06-01 2021-06-01 Trajectory fitting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113327264A true CN113327264A (en) 2021-08-31
CN113327264B CN113327264B (en) 2023-01-13

Family

ID=77423207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110608649.1A Active CN113327264B (en) 2021-06-01 2021-06-01 Trajectory fitting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113327264B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114578401A (en) * 2022-04-29 2022-06-03 泽景(西安)汽车电子有限责任公司 Method and device for generating lane track points, electronic equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002117411A (en) * 2000-10-12 2002-04-19 Matsushita Electric Ind Co Ltd Curve drawing method, curve drawing device, and storage medium with curve drawing program stored therein
CN102998684A (en) * 2012-11-21 2013-03-27 厦门雅迅网络股份有限公司 Terminal positioning track fitting method based on Bezier curve
CN104318600A (en) * 2014-10-10 2015-01-28 无锡梵天信息技术股份有限公司 Method for achieving role treading track animation by using Bezier curve
CN104965519A (en) * 2015-06-10 2015-10-07 北京理工大学 Bezier curve-based terminal guidance method with fall angle constraint
CN109446662A (en) * 2018-10-31 2019-03-08 百度在线网络技术(北京)有限公司 Generation method and device, the computer equipment and storage medium of vehicle simulation track
CN109726489A (en) * 2019-01-02 2019-05-07 腾讯科技(深圳)有限公司 A kind of method and system for establishing auxiliary driving data library
CN110595475A (en) * 2019-08-16 2019-12-20 中国第一汽车股份有限公司 Tracking path fitting method and device, intelligent automobile and storage medium
CN111078106A (en) * 2020-02-26 2020-04-28 紫光云(南京)数字技术有限公司 Curve generation method and device applied to touch screen equipment and computer storage medium
CN111539345A (en) * 2020-04-27 2020-08-14 北京百度网讯科技有限公司 Method, device, equipment and readable storage medium for determining lane change action
WO2020192149A1 (en) * 2019-03-28 2020-10-01 深圳市商汤科技有限公司 Test method and apparatus for trajectory tracking controller, medium and device
CN111767361A (en) * 2020-07-06 2020-10-13 中电万维信息技术有限责任公司 GIS application based on Bezier curve algorithm
CN111857037A (en) * 2020-06-19 2020-10-30 深圳市亿维自动化技术有限公司 Transition track generation method, robot and computer readable storage medium
CN112269848A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 Crowdsourcing trajectory data fusion method and device
US20210156713A1 (en) * 2018-08-06 2021-05-27 Tencent Technology (Shenzhen) Company Ltd Method and apparatus for reconstructing motion track, storage medium, and electronic device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002117411A (en) * 2000-10-12 2002-04-19 Matsushita Electric Ind Co Ltd Curve drawing method, curve drawing device, and storage medium with curve drawing program stored therein
CN102998684A (en) * 2012-11-21 2013-03-27 厦门雅迅网络股份有限公司 Terminal positioning track fitting method based on Bezier curve
CN104318600A (en) * 2014-10-10 2015-01-28 无锡梵天信息技术股份有限公司 Method for achieving role treading track animation by using Bezier curve
CN104965519A (en) * 2015-06-10 2015-10-07 北京理工大学 Bezier curve-based terminal guidance method with fall angle constraint
US20210156713A1 (en) * 2018-08-06 2021-05-27 Tencent Technology (Shenzhen) Company Ltd Method and apparatus for reconstructing motion track, storage medium, and electronic device
CN109446662A (en) * 2018-10-31 2019-03-08 百度在线网络技术(北京)有限公司 Generation method and device, the computer equipment and storage medium of vehicle simulation track
CN109726489A (en) * 2019-01-02 2019-05-07 腾讯科技(深圳)有限公司 A kind of method and system for establishing auxiliary driving data library
WO2020192149A1 (en) * 2019-03-28 2020-10-01 深圳市商汤科技有限公司 Test method and apparatus for trajectory tracking controller, medium and device
CN110595475A (en) * 2019-08-16 2019-12-20 中国第一汽车股份有限公司 Tracking path fitting method and device, intelligent automobile and storage medium
CN111078106A (en) * 2020-02-26 2020-04-28 紫光云(南京)数字技术有限公司 Curve generation method and device applied to touch screen equipment and computer storage medium
CN111539345A (en) * 2020-04-27 2020-08-14 北京百度网讯科技有限公司 Method, device, equipment and readable storage medium for determining lane change action
CN111857037A (en) * 2020-06-19 2020-10-30 深圳市亿维自动化技术有限公司 Transition track generation method, robot and computer readable storage medium
CN111767361A (en) * 2020-07-06 2020-10-13 中电万维信息技术有限责任公司 GIS application based on Bezier curve algorithm
CN112269848A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 Crowdsourcing trajectory data fusion method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李浩等: "基于视觉引导的直角坐标机器人轨迹规划研究", 《组合机床与自动化加工技术》 *
林良毅等: "基于三阶贝塞尔曲线的屈服轨迹描述及演化模型的研究", 《塑性工程学报》 *
许静雅: "参数曲线、曲面的拟合及其拼接", 《华南理工大学学报(自然科学版)》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114578401A (en) * 2022-04-29 2022-06-03 泽景(西安)汽车电子有限责任公司 Method and device for generating lane track points, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113327264B (en) 2023-01-13

Similar Documents

Publication Publication Date Title
CN113345228B (en) Driving data generation method, device, equipment and medium based on fitted track
US9739620B2 (en) Compressing trajectory data of a navigation device
US20210213940A1 (en) Method, apparatus, device and storage medium for autonomous parking
WO2023001168A1 (en) Obstacle trajectory prediction method and apparatus, electronic device, and storage medium
US9644976B2 (en) Building missing movement path of an object
CN109916414B (en) Map matching method, apparatus, device and medium
CN110006439B (en) Map track data matching method, map track data matching device, server and storage medium
CN112528859B (en) Lane line detection method, device, equipment and storage medium
CN111311906B (en) Intersection distance detection method and device, electronic equipment and storage medium
CN113934775B (en) Vehicle track map matching method, device, equipment and computer readable medium
CN115585816B (en) Lane-level map matching method and device
CN113327264B (en) Trajectory fitting method, device, equipment and storage medium
CN111858814A (en) Method, device and equipment for repairing motion trail and storage medium
CN110806834A (en) Information processing method and device based on input method, electronic equipment and medium
CN111896020B (en) Method for information processing, electronic device, and storage medium
CN112590929B (en) Correction method, apparatus, electronic device, and medium for steering wheel of autonomous vehicle
CN110726414B (en) Method and apparatus for outputting information
CN116758498B (en) Obstacle information generation method, obstacle information generation device, electronic device, and computer-readable medium
CN115512336B (en) Vehicle positioning method and device based on street lamp light source and electronic equipment
CN114488237A (en) Positioning method and device, electronic equipment and intelligent driving method
CN114862491A (en) Vehicle position determining method, order dispatching method, device, server and storage medium
CN113804196B (en) Unmanned vehicle path planning method and related equipment
CN112612277A (en) Vehicle trajectory planning method, device, equipment and computer readable medium
CN113008246A (en) Map matching method and device
CN115824233B (en) Travel road information matching method, apparatus, device and computer readable medium

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