主要内容

labelDefinitionCreatorMultiSensor

R2026b

Create label definitions for multi-sensor ground truth

Since R2026b

Description

The labelDefinitionCreatorMultiSensor object stores definitions of labels, sublabels, and attributes to label ground truth data for a multisignal workflow. Use Object Functions to add, remove, modify, or display label definitions. Use the create (Automated Driving Toolbox) object function to create a label definitions table from the labelDefinitionCreatorMultisignal object. You can use the created label definitions table with the groundTruthMultiSensor object or load the definitions into the Multi-Sensor Labeler app.

Creation

Description

ldc = labelDefinitionCreatorMultiSensor creates an empty label definition creator object ldc for a multi-sensor workflow. Add label definitions to this object using Object Functions. Use the info function to inspect details of stored labels, sublabels, and attributes.

example

ldc = labelDefinitionCreatorMultiSensor(labelDefs) creates a label definition creator object ldc for a multi-sensor workflow and stores definitions from the label definitions table labelDefs. Use Object Functions to add new label definitions or modify the existing label definitions. Use the info function to inspect details of stored labels, sublabels, and attributes.

example

Input Arguments

expand all

Label definitions, specified as a table with up to nine columns. The possible columns are Name, SignalType, LabelType, Group, Description, LabelColor, PixelLabelID, SemanticPointLabelID, and Hierarchy. This table specifies the definitions of labels, sublabels, and attributes for labeling ground truth data. For more details, see the LabelDefinitions property of the groundTruthMultiSensor object.

Output Arguments

expand all

Label definition creator for the multi-sensor workflow, returned as a labelDefinitionCreatorMultiSensor object that contains information about label definitions associated with ground truth data.

Object Functions

addLabelAdd label to multi-sensor label definition creator
addSublabelAdd sublabel to label in multi-sensor label definition creator
addAttributeAdd attribute to label or sublabel in multi-sensor label definition creator
removeLabelRemove label from multi-sensor label definition creator
removeSublabelRemove sublabel from label in multi-sensor label definition creator
removeAttributeRemove attribute from label or sublabel in multi-sensor label definition creator
editLabelGroupAssign label to different group in multi-sensor label definition creator
editGroupNameChange group name in multi-sensor label definition creator
editLabelDescriptionModify label or sublabel description in multi-sensor label definition creator
editAttributeDescriptionModify attribute description in multi-sensor label definition creator
createCreate label definitions table from multi-sensor label definition creator
infoDisplay label, sublabel, or attribute information from multi-sensor label definition creator

Examples

collapse all

Create a labelDefinitionCreatorMultiSensor object and add labels, sublabels, and attributes to it.

Create an empty labelDefinitionCreatorMultiSensor object.

ldc = labelDefinitionCreatorMultiSensor;

Add a label with the name "Vehicle". Specify the type as "Rectangle". Adding a "Rectangle" also adds a "Cuboid" entry to the label definitions table.

addLabel(ldc,"Vehicle","Rectangle")

Add an attribute with the name "Color" to the label "Vehicle". Specify the attribute type as a string with the value "Red".

addAttribute(ldc,"Vehicle","Color",attributeType.String,"Red")

Add a sublabel with the name "Wheel" to the label "Vehicle". Specify the type of the sublabel as "Rectangle".

addSublabel(ldc,"Vehicle","Wheel","Rectangle")

Add an attribute called "Diameter" to the sublabel "Wheel". Specify the attribute value as a "Numeric" scalar.

addAttribute(ldc,"Vehicle/Wheel","Diameter","Numeric",14)

Display the details of the updated labelDefinitionCreatorMultiSensor object.

ldc
ldc =
labelDefinitionCreatorMultiSensor contains the following labels:

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

For more details about attributes and sublabels, use the info method.

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

labelDefs = create(ldc)
labelDefs = 2×7 table
       Name        SignalType    LabelType     Group      Description    LabelColor     Hierarchy
    ___________    __________    _________    ________    ___________    __________    ____________

    {'Vehicle'}    Image         Rectangle    {'None'}       {' '}       {0×0 char}    {1×1 struct}
    {'Vehicle'}    PointCloud    Cuboid       {'None'}       {' '}       {0×0 char}    {1×1 struct}

Create a labelDefinitionCreatorMultiSensor object from an existing label definitions table and modify it.

Load an existing multi-sensor label definitions table into the workspace.

labelDefFile = fullfile(toolboxdir("pointcloud"),"pcdata","labelDefsMultiSensor.mat");
ld = load(labelDefFile)
ld = 

  struct with fields:

    labelDefs: [12×8 table]

Create a labelDefinitionCreatorMultiSensor object from the label definitions table.

ldc = labelDefinitionCreatorMultiSensor(ld.labelDefs)
labelDefinitionCreatorMultiSensor contains the following labels:

	Car with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Face with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Lane with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Building with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Sky with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Road with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Truck with 0 sublabels and 0 attributes and belongs to None group.	(info)
	RedLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)
	GreenLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)
	YellowLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)

For more details about attributes and sublabels, use the info method.

Add a new attribute to the label "Car".

addAttribute(ldc,"Car","Color","List",{"Red","Green","Blue"})

Display the details of the updated labelDefinitionCreatorMultiSensor object.

ldc
ldc = 

labelDefinitionCreatorMultiSensor contains the following labels:

	Car with 0 sublabels and 1 attributes and belongs to None group.	(info)
	Face with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Lane with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Building with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Sky with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Road with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Truck with 0 sublabels and 0 attributes and belongs to None group.	(info)
	RedLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)
	GreenLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)
	YellowLight with 0 sublabels and 0 attributes and belongs to TrafficLight group.	(info)

For more details about attributes and sublabels, use the info method.

More About

expand all

Version History

Introduced in R2026b