Main Content


Class: lidar.labeler.AutomationAlgorithm
Namespace: lidar.labeler

Initialize state for algorithm execution (optional)

Since R2022a


The initialize method initializes the state of the automation algorithm before the automation algorithm runs.

Clients of AutomationAlgorithm can optionally implement this method.

initialize(algObj,frame) initializes the state of the algObj automation algorithm using the first frame in the time range of the data being labeled.

Clients of AutomationAlgorithm must implement this user-defined method.

initialize(algObj,frame,labelsToAutomate) additionally provides a table, labelsToAutomate, that contains labels selected for the automation algorithm to use for labeling. This syntax does not support voxel label automation. In addition, this syntax is available only for time-dependent (temporal) automation algorithms.

Input Arguments

expand all

Automation algorithm, specified as a lidar.labeler.AutomationAlgorithm object.

Frame corresponding to the start of time range, specified as a pointCloud object.

Labels selected for automation, specified as a table with these columns.

Column NameDescription

labelType enumeration that contains the type of label definition. Valid label types are:

  • labelType.Cuboid

  • labelType.Line

  • labelType.Scene

lidarLabelType.Voxel is not supported.

NameCharacter vector that contains the name of the label.
TimeScalar of type double that specifies the time, in seconds, when the label was marked.

Location of the label in the frame. The format of this vector depends on the label type.

Label TypePosition Format
Cuboid — Cuboid ROI labels

M-by-9 numeric vector of the form [xctr, yctr, zctr, xlen, ylen, zlen, xrot, yrot, zrot], where:

  • M is the number of labels in the frame.

  • xctr, yctr, and zctr specify the center of the cuboid.

  • xlen, ylen, and zlen specify the length of the cuboid along the x-axis, y-axis, and z-axis, respectively.

  • xrot, yrot, and zrot specify the rotation angles for the cuboid along the x-axis, y-axis, and z-axis, respectively. These angles are clockwise-positive when looking in the forward direction of their corresponding axes.

This figure shows how these values specify the position of a cuboid.

Line — Polyline ROI labelsM-by-1 vector of cell arrays, where M is the number of labels in the frame. Each cell array contains an N-by-2 numeric matrix of the form [x1 y1; x2 y2; ... ; xN yN] for N points in the polyline.
Scene — Scene labels

Logical value of 1 if the label is present in the frame and 0 otherwise.

Each row of the table corresponds to a label selected for automation. This labelsToAutomate table contains a line label with five points, and a cuboid label.

       Type           Name           Time        Position  
     _________    ____________    _________    ____________
     Line         'LaneMarker'    0.066667     [5x2 double]
     Cuboid       'Truck'         0.099999     [1x9 double] 

Version History

Introduced in R2022a