Main Content

alignBoundaryPoints

Align lane boundary points in lane boundary segment object

Since R2024a

Description

example

lbsegmentUpdated = alignBoundaryPoints(lbsegment) aligns all boundary points laterally across the road in the input laneBoundarySegment object lbsegment, and returns an updated laneBoundarySegment object, lbsegmentUpdated.

Note

This function requires the Scenario Builder for Automated Driving Toolbox™ support package. You can install the Scenario Builder for Automated Driving Toolbox support package from the Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Examples

collapse all

Load lane boundary segment data into the workspace.

data = load("laneBoundarySegmentData.mat","lbsegment");

Display the lane boundary points in the loaded lane boundary segment object.

lbsegment = data.lbsegment
lbsegment = 
  laneBoundarySegment with properties:

       BoundaryIDs: [4×1 string]
    BoundaryPoints: {4×1 cell}
      BoundaryInfo: []
     NumBoundaries: 4
         NumPoints: 128
      GeoReference: []

Plot the lane boundary points in the loaded lane boundary segment object.

plot(lbsegment)

Align the lane boundary points in the loaded lane boundary segment object.

lbsegment = alignBoundaryPoints(lbsegment);

Plot the aligned lane boundaries.

plot(lbsegment)

Input Arguments

collapse all

Lane boundary segment, specified as a laneBoundarySegment object.

Output Arguments

collapse all

Updated lane boundary segment, returned as a laneBoundarySegment object.

The returned laneBoundarySegment object lbsegmentUpdated contains the aligned lane boundary points of the lane boundaries from the input laneBoundarySegment object lbsegment.

Version History

Introduced in R2024a