addLabel
R2026bDescription
addLabel(
adds a label with the specified name and type to the ldc,labelName,typeOfLabel)labelDefinitionCreatorMultiSensor 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 definitions to a labelDefinitionCreatorMultiSensor object.
Create an empty labelDefinitionCreatorMultiSensor object.
ldc = labelDefinitionCreatorMultiSensor;
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
"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
labelDefinitionCreatorMultiSensor object.
ldc
ldc = labelDefinitionCreatorMultiSensor 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
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 added.
Type of label, specified as one of these values:
labelTypeenumeration — You can use any of theselabelType(Computer Vision Toolbox) enumerators to specify the type of label:Cuboid,Rectangle,Line,Point,Polygon,ProjectedCuboid,PixelLabel,SemanticPointLabel,SceneLogical,SceneNumeric,SceneStringorCustom.Note
Adding a
CuboidorRectanglealso adds aRectangleorCuboidentry, respectively, to the label definitions table. Similarly, adding aLinelabel type creates a 2-D line label for images and a corresponding 3-D line label for the point cloud signal in 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(Computer Vision Toolbox) 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.
Example: addLabel(ldc,"StopSign","Rectangle",Group="TrafficSign",Description="Bounding
boxes for stop signs");
Group name, specified as a character vector or string scalar. Use this name-value pair to specify a name for a group of labels.
Label description, specified as a character vector or string scalar. Use this name-value pair to describe the label.
Label color, specified as a 3-element row vector of RGB values in the range [0, 1]. Yellow (RGB = [1 1 0]) is reserved for the color of selected labels.
Version History
Introduced in R2026b
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)