addLabel
Add label to label definition creator object for multisignal workflow
Since R2020a
Description
addLabel(
adds a label with the specified name and type to the ldc
,labelName
,typeOfLabel
)labelDefinitionCreatorMultisignal
object ldc
.
addLabel(___,
specifies
options using one or more name-value pair arguments in addition to the input arguments in
the previous syntax.Name,Value
)
Examples
Add Label Using Label Definition Creator for Multisignal Workflow
Create an empty labelDefinitionCreatorMultisignal
object.
ldc = labelDefinitionCreatorMultisignal;
Add a label named 'Car'
. Specify the type of label as 'Cuboid'
. Adding a 'Cuboid'
also adds a 'Rectangle'
entry to the label definitions table.
addLabel(ldc,'Car','Cuboid');
Add another label named 'StopSign'
in a group named 'TrafficSign'
. Specify the type of label as a 'Rectangle'
. Adding 'Rectangle'
also adds a 'Cuboid'
entry to the label definitions table. Add a description to the label.
addLabel(ldc,'StopSign','Rectangle','Group','TrafficSign','Description','Bounding boxes for stop signs');
Display the details of the updated labelDefinitionCreatorMultisignal
object.
ldc
ldc = labelDefinitionCreatorMultisignal contains the following labels: Car with 0 sublabels and 0 attributes and belongs to None group. (info) StopSign with 0 sublabels and 0 attributes and belongs to TrafficSign group. (info) For more details about attributes and sublabels, use the info method.
Display information about the label 'Car'
using the object function info
.
info(ldc,'Car')
Name: "Car" SignalType: Image LabelType: Rectangle Group: "None" LabelColor: {''} Attributes: [] Sublabels: [] Description: ' ' Name: "Car" SignalType: PointCloud LabelType: Cuboid Group: "None" LabelColor: {''} Attributes: [] Sublabels: [] Description: ' '
Display information about the label 'StopSign'
using the object function info
.
info(ldc,'StopSign')
Name: "StopSign" SignalType: Image LabelType: Rectangle Group: "TrafficSign" LabelColor: {''} Attributes: [] Sublabels: [] Description: 'Bounding boxes for stop signs' Name: "StopSign" SignalType: PointCloud LabelType: Cuboid Group: "TrafficSign" LabelColor: {''} Attributes: [] Sublabels: [] Description: 'Bounding boxes for stop signs'
Input Arguments
ldc
— Label definition creator for multisignal workflow
labelDefinitionCreatorMultisignal
object
Label definition creator for the multisignal workflow, specified as a labelDefinitionCreatorMultisignal
object.
labelName
— Label name
character vector | string scalar
Label name, specified as a character vector or string scalar that uniquely identifies the label to be added.
typeOfLabel
— Type of label
labelType
enumeration | character vector | string scalar
Type of label, specified as one of these values:
labelType
enumeration — You can use any of theselabelType
enumerators to specify the type of label:Cuboid
,Rectangle
,Line
,PixelLabel
,Scene
, orCustom
.Note
Adding a
Cuboid
orRectangle
also adds aRectangle
orCuboid
entry, respectively, to the label definitions table.
Example: addLabel(ldc,'Car',labelType.Cuboid);
Character vector or string scalar — This value must partially or fully match one of the
labelType
enumerators.
Example: addLabel(ldc,'Car','Cub');
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: addLabel(ldc,'StopSign','Rectangle','Group','TrafficSign','Description','Bounding
boxes for stop signs');
Group
— Group name
'None'
(default) | character vector | string scalar
Group name, specified as a comma-separated pair consisting of
'Group'
and a character vector or string scalar. Use this
name-value pair to specify a name for a group of labels.
Description
— Label description
' '
(default) | character vector | string scalar
Label description, specified as a comma-separated pair consisting of
'Description'
and a character vector or string scalar. Use this
name-value pair to describe the label.
Version History
Introduced in R2020a
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)