Main Content

labelDefinitionCreatorLidar

Store, modify, and create label definitions tables for lidar

Since R2020b

Description

The labelDefinitionCreatorLidar object stores definitions of labels and attributes to label ground truth data for a lidar workflow. Use various Object Functions to add, remove, modify, or display label definitions. Use the create object function to create a label definitions table from the labelDefinitionCreatorLidar object. You can use this label definitions table with the Lidar Labeler app.

Creation

Description

example

ldc = labelDefinitionCreatorLidar creates an empty label definition creator object, ldc, for the lidar workflow. Add label definitions to this object, as well as modify or remove them, using various Object Functions. Use the info object function to inspect the stored labels and attributes.

example

ldc = labelDefinitionCreatorLidar(labelDefs) creates a label definition creator object, ldc, for a lidar workflow that contains the definitions from the label definitions table labelDefs.

Input Arguments

expand all

Label definitions, returned as a table with up to eight columns. The possible columns are Name, Type, Group, Description, LabelColor, and Hierarchy. This table contains the definitions and attributes of labels used for labeling ground truth lidar data. For more details, see the labelDefinitions property of the groundTruthLidar object.

Object Functions

addLabelAdd label to label definition creator object for lidar workflow
addAttributeAdd attribute to label in label definition creator for lidar workflow
editLabelGroupModify label group name in label definition creator object for lidar workflow
editLabelDescriptionModify label description in label definition creator for lidar workflow
editAttributeDescriptionModify attribute description in label definition creator object for lidar workflow
editGroupNameChange group name in label definition creator for lidar workflow
removeLabelRemove label from label definition creator for lidar workflow
removeAttributeRemove attribute from label in label definition creator for lidar workflow
createCreate label definitions table from label definition creator object for lidar workflow
infoDisplay label or attribute information stored in label definition creator for lidar workflow

Examples

collapse all

Create an empty labelDefinitionCreatorLidar object.

ldc = labelDefinitionCreatorLidar;

Add a Cuboid label, Vehicle, to the label definition creator.

addLabel(ldc,'Vehicle','Cuboid')

Add a Color attribute to the Vehicle label as a list of three strings.

addAttribute(ldc,'Vehicle','Color','List',{'Red','White','Green'})

Display the details of the updated label definition creator object.

ldc
ldc = 
labelDefinitionCreatorLidar contains the following labels:

	Vehicle with 1 attributes and belongs to None group.	(info)

For more details about attributes, use the info method.

Create a label definitions table from the definition stored in the object.

labelDefs = create(ldc)
labelDefs=1×6 table
       Name           Type       LabelColor     Group      Description     Hierarchy  
    ___________    __________    __________    ________    ___________    ____________

    {'Vehicle'}    {[Cuboid]}    {0x0 char}    {'None'}       {' '}       {1x1 struct}

Load a lidar label definitions table into the workspace.

lidarDir = fullfile(matlabroot,'toolbox','lidar','lidardata','lidarLabeler');
addpath(lidarDir)
load('lidarLabelerGTruth.mat')

Create a labelDefinitionCreatorLidar object from the label definitions table.

ldc = labelDefinitionCreatorLidar(lidarLabelerGTruth.LabelDefinitions)
ldc = 
labelDefinitionCreatorLidar contains the following labels:

	car with 0 attributes and belongs to vehicle group.	(info)
	bike with 0 attributes and belongs to vehicle group.	(info)
	pole with 0 attributes and belongs to None group.	(info)
	vegetation with 0 attributes and belongs to None group.	(info)

For more details about attributes, use the info method.

Add a new attribute to the car label.

addAttribute(ldc,'car','Color','List',{'Red','Green','Blue'})

Display the details of the updated labelDefinitionCreatorLidar object.

ldc
ldc = 
labelDefinitionCreatorLidar contains the following labels:

	car with 1 attributes and belongs to vehicle group.	(info)
	bike with 0 attributes and belongs to vehicle group.	(info)
	pole with 0 attributes and belongs to None group.	(info)
	vegetation with 0 attributes and belongs to None group.	(info)

For more details about attributes, use the info method.

Version History

Introduced in R2020b