メインコンテンツ

removeLabel

R2026b

Remove label from multi-sensor label definition creator

Since R2026b

Description

removeLabel(ldc,labelName) removes the specified label from the labelDefinitionCreatorMultiSensor object ldc.

Note

Removing a label also removes any sublabels or attributes associated with that label.

example

Examples

collapse all

Remove a label from a labelDefinitionCreatorMultiSensor object created from an existing label definitions table.

Load an existing 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.

Remove the label called "Car".

removeLabel(ldc,"Car");

Display the details of the updated labelDefinitionCreatorMultiSensor object to confirm that the label has been removed.

ldc
ldc = 

labelDefinitionCreatorMultiSensor contains the following labels:

	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.

Input Arguments

collapse all

Label definition creator for the multi-sensor workflow, specified as a labelDefinitionCreatorMultiSensor object.

Label name, specified as a character vector or string scalar that uniquely identifies the label to be removed from the ldc object.

Version History

Introduced in R2026b