addLabel
Add label to label definition creator object for lidar workflow
Description
addLabel(
adds a label with the specified name and type to the ldc,labelName,typeOfLabel)labelDefinitionCreatorLidar object
ldc.
addLabel(___, specifies
options using one or more name-value pair arguments in addition to the input arguments in
the previous syntax. For example, Name,Value)Group, truck sets
the group of the added label to truck.
Examples
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]} {0×0 char} {'None'} {' '} {1×1 struct}
Create an empty labelDefinitionCreatorLidar object.
ldc = labelDefinitionCreatorLidar
ldc = labelDefinitionCreatorLidar
Add a Cuboid label, Vehicle, to the label definition creator object. Include Group information for the label.
addLabel(ldc,'Vehicle','Cuboid','Group','Transport');
Add a Scene label, TrafficSign, to the object. Include Group information for the label.
addLabel(ldc,'TrafficSign','Scene','Group','Data');
Add a Color attribute to the Vehicle label as a string.
addAttribute(ldc,'Vehicle','Color','String','Red');
Display the details of the updated label definition creator object.
ldc
ldc = labelDefinitionCreatorLidar contains the following labels: Vehicle with 1 attributes and belongs to Transport group. (info) TrafficSign with 0 attributes and belongs to Data group. (info) For more details about attributes, use the info method.
Display information about the label Vehicle using the info object function.
info(ldc,'Vehicle') Name: "Vehicle"
Type: {[Cuboid]}
LabelColor: {''}
Group: "Transport"
Attributes: "Color"
Description: ' '
Display information about the Color attribute of the Vehicle label using the info object function.
info(ldc,'Vehicle/Color') Name: "Color"
Type: String
DefaultValue: 'Red'
Description: ' '
Input Arguments
Label definition creator for the lidar workflow, specified as a labelDefinitionCreatorLidar object.
Label name, specified as a character vector or string scalar. This sets the name of the label in the label definition creator object.
Type of label, specified using one of these options. For example,
labelType.Cuboid specifies a Cuboid label
type.
labelTypeenumeration — Specify the type of label as aSceneorCuboidlabelTypeenumerator.Character vector or string scalar — Specify a value that partially or fully matches one of the
labelTypeenumerators. For example,Cubspecifies aCuboidlabel type.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: Group, truck sets the group of the added
label to truck.
Group name, specified as a comma-separated pair consisting of
'Group' and the character vector or string scalar. Use this
name-value pair arguments to specify a name for a group of labels.
Label description, specified as a comma-separated pair consisting of
'Description' and the character vector or string scalar. Use
this name-value pair arguments to describe the label.
Version History
Introduced in R2020b
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)