Main Content

resamplePoints

Resample lane boundary points

Since R2024a

Description

lbsegmentUpdated = resamplePoints(lbsegment,numSamples) resamples the lane boundaries in the input laneBoundarySegment object lbsegment to the specified number of lane boundary points numSamples, 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.

example

Examples

collapse all

Load lane boundary segment data into the workspace.

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

Display 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: []

Resample the number of lane boundary points to 20 for each lane boundary in the lane boundary segment object. Display the resampled lane boundary segment object.

lbsegment = resamplePoints(lbsegment,20)
lbsegment = 
  laneBoundarySegment with properties:

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

Input Arguments

collapse all

Lane boundary segment, specified as a laneBoundarySegment object.

Number of lane boundary sample points, specified as an integer greater than 2.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Updated lane boundary segment, returned as a laneBoundarySegment object.

The returned laneBoundarySegment object lbsegmentUpdated contains the resampled lane boundary points of the input laneBoundarySegment object lbsegment.

Version History

Introduced in R2024a