Main Content

lidar.labeler.AutomationAlgorithm Class

Namespace: lidar.labeler

Interface for algorithm automation in ground truth labeling

Since R2022a

Description

The lidar.labeler.AutomationAlgorithm class specifies the interface for defining custom automation algorithms to run in the Lidar Labeler app. Classes that inherit from the AutomationAlgorithm interface can be used with the automation workflow of the Lidar Labeler app to generate ground truth labels.

The lidar.labeler.AutomationAlgorithm class is a handle class.

Class Attributes

Abstract
true

For information on class attributes, see Class Attributes.

Properties

expand all

The AutomationAlgorithm class predefines this set of properties.

Ground truth data, specified as a groundTruthLidar. This property holds all the labels in the Lidar Labeler app prior to automation.

Attributes:

GetAccess
public
SetAccess
private

Label definitions selected for automation in the app, specified as a structure. The app support selection of only one labeling definition per automation session. In the app, the selected label definition is highlighted in yellow in either the ROI Labels or Scene Labels pane on the left.

The structure contains these fields.

FieldDescription
Type

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

  • labelType.Cuboid

  • labelType.Line

  • labelType.Scene

lidarLabelType object contains the label type for voxel labeled ROI. You define the label using lidarLabelType.Voxel.

NameCharacter vector that contains the name of the label definition.
Attributes (optional)

Structure array that contains one structure for each attribute in the label definition. If the label definition does not contain attributes, then this property does not include the Attributes field.

The first field of each attribute structure in this structure array contains the attribute name. The second field contains a structure of values that are associated with that name. If you are defining a List attribute, you must also define the list of values for that attribute. Values for Numeric Value, String, or Logical attributes are optional. Descriptions for the attributes are optional for all cases.

VoxelLabelID (optional)Positive integer that contains the voxel label ID for the label definition. This VoxelLabelID field applies only for label definitions of type lidarLabelType.Voxel.

To view a sample SelectedLabelDefinitions structure that contains an attribute, enter this code at the MATLAB® command prompt.

selectedLabelDefs.Type = labelType.Cuboid;
selectedLabelDefs.Name = 'Car';
selectedLabelDefs.Attributes = struct('distance', ...
    struct('DefaultValue',0,'Description','Sensor distance'))

To view a sample SelectedLabelDefinitions structure that contains voxel label definitions, enter this code at the MATLAB command prompt.

selectedLabelDefs.Type = lidarLabelType.Voxel;
selectedLabelDefs.Name = 'Tree';
selectedLabelDefs.Attributes = struct('distance', ...
    struct('DefaultValue',0,'Description','Sensor distance'))

Attributes:

GetAccess
public
SetAccess
private

Valid label definitions that the algorithm can automate, specified as a structure array. Each structure in the array corresponds to a valid label definition. To determine which label definitions are valid, the app uses the checkLabelDefinition method. This table describes the fields for each valid label definition structure.

FieldDescription
Type

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

  • labelType.Cuboid

  • labelType.Line

  • labelType.Scene

lidarLabelType object contains the label type for voxel labeled ROI. You define the label using lidarLabelType.Voxel.

NameCharacter vector that contains the name of the label definition.
Attributes (optional)

Structure array that contains one structure for each attribute in the label definition. If the label definition does not contain attributes, then this property does not include the Attributes field.

The first field of each attribute structure in this structure array contains the attribute name. The second field contains a structure of values that are associated with that name. If you are defining a List attribute, you must also define the list of values for that attribute. Values for Numeric Value, String, or Logical attributes are optional. Descriptions for the attributes are optional for all cases.

VoxelLabelID (optional)Positive integer that contains the voxel label ID for the label definition. This VoxelLabelID field applies only for label definitions of type lidarLabelType.Voxel.

To view a sample ValidLabelDefinitions structure that contains an attribute, enter this code at the MATLAB command prompt.

validLabelDefs(1).Type = labelType.Cuboid;
validLabelDefs(1).Name = 'Car';
validLabelDefs(2).Type = labelType.Line;
validLabelDefs(2).Name = 'LaneMarker';
validLabelDefs(3).Type = lidarLabelType.Voxel;
validLabelDefs(3).Name = 'Tree';

Attributes:

GetAccess
public
SetAccess
private

Clients of the AutomationAlgorithm class are required to define this set of properties. These properties set up the name, description, and user instructions for your automated algorithm.

Automation algorithm name, specified as a character vector.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Algorithm description, specified as a character vector.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Algorithm directions displayed in app, specified as a cell array. UserDirections are specified as a cellstr, with each string representing a separate direction. Use the checkSetup method to verify that the directions have been adhered to.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Methods

expand all

Version History

Introduced in R2022a