addattribute
Add attributes to label or sublabel in label definition creator object for multisignal workflow
句法
Description
addattribute(
将带有指定名称的属性和类型添加到指示的标签或Sublabel。该属性是在指定标签或sublabel的层次结构下添加的ldc
,,,,标签名
,,,,attributeName
,,,,typeOfAttribute
,,,,attributeDefault
)labelDefinitionCreatorMultisignal
目的ldc
。
Examples
将属性添加到标签和sublabel中的标签定义创建器对象的多信号工作流程
Create an emptylabelDefinitionCreatorMultisignal
目的。
LDC = labeldefinitioncreatormultisignal;
添加一个名称的标签'Car'
。将标签的类型指定为'Rectangle'
。添加一个'Rectangle'
还添加了一个'Cuboid'
entry to the label definitions table.
Addlabel(LDC,'Car',,,,'Rectangle');
添加一个属性'Color'
to the label'Car'
。将属性类型指定为'细绳'
带有值'红色的'
。
addattribute(LDC,'Car',,,,'Color',,,,'细绳',,,,'红色的')
添加一个名称的标签'TrafficLight'
。Specify the type of the label as'Rectangle'
。Add a description to the label.
Addlabel(LDC,'TrafficLight',,,,'Rectangle',,,,'描述',,,,'Bounding boxes for stop signs');
Add a sublabel with the name'RedLight'
to the label'TrafficLight'
。将Sublabel的类型指定为'Rectangle'
。
AddSublabel(LDC,'TrafficLight',,,,'RedLight',,,,'Rectangle');
添加一个属性'ison'
to the sublabel'RedLight'
在标签中'TrafficLight'
。将Sublabel的属性类型指定为“逻辑”
带有值错误的
。
addattribute(LDC,“交通灯/红光”,,,,'ison',,,,“逻辑”,,,,错误的);
显示更新的详细信息labelDefinitionCreatorMultisignal
目的。
ldc
LDC = labeldefinitioncreatormultisignal包含以下标签:具有0个sublabels和1个属性的汽车,属于无组。(INFO)带有1个sublabels和0个属性的交通光芒,属于无组。(信息)有关属性和子标签的更多详细信息,请使用信息方法。
显示有关属性的信息under the label'Car'
using the object function信息
。
信息(ldc,'Car')
姓名: "Car" SignalType: Image LabelType: Rectangle Group: "None" LabelColor: {''} Attributes: "Color" Sublabels: [] Description: ' ' Name: "Car" SignalType: PointCloud LabelType: Cuboid Group: "None" LabelColor: {''} Attributes: "Color" Sublabels: [] Description: ' '
显示有关属性的信息under the label'TrafficLight'
using the object function信息
。
信息(ldc,'TrafficLight')
名称:“流量光明” SignalType:映像LabelType:Rectangle组:“无” LabelColor:{''}属性:[] Sublabels:“ Redlight”描述:'停止符号的边界框:“ crompleard signallight” signalType:pointcloud signaltype:pointcloud labeltype:pointcloud labeltype:Cuboid组:“无”标签:{''}属性:[] sublabels:“ redlight”描述:'停止符号的边界框'
显示有关属性的信息在Sublabel下'RedLight'
在标签中'TrafficLight'
using the object function信息
。
信息(ldc,“交通灯/红光”)
名称:“ redlight”类型:矩形标签:''属性:“ ison” sublabels:[]描述:''
显示有关属性的信息'ison'
在Sublabel下'RedLight'
在标签中'TrafficLight'
using the object function信息
。
信息(ldc,'TrafficLight/RedLight/isOn')
姓名: "isOn" Type: Logical DefaultValue: 0 Description: ' '
输入参数
ldc
-Label definition creator for multisignal workflow
labelDefinitionCreatorMultisignal
目的
标签定义创造者multisignal workflow, specified as alabelDefinitionCreatorMultisignal
目的。
标签名
-Label or sublabel name
角色向量|字符串标量
标签或sublabel名称,指定为字符向量或字符串标量,该名称唯一标识要添加属性的标签或sublabel。
要指定标签,请使用表单'标签名'。
Example:addAttribute(LDC,“ CAR”,“颜色”)
要指定Sublabel,请使用表单'标签名/sublabelName'。在这种情况下,属性与Sublabel相关联。
Example:addAttribute(LDC,“交通灯/redlight','ison')
attributeName
-属性名称
角色向量|字符串标量
属性名称,指定为字符向量或字符串标量,标识要添加到标签或sublabel的属性。
typeOfAttribute
-属性类型
属性型
枚举|角色向量|字符串标量
属性类型,,,,specified as one of these values:
属性型
枚举 - 属性的类型必须是其中之一属性型
枚举者:数字
,,,,逻辑
,,,,细绳
, 或者列表
。
Example:addAttribute(LDC,'CAR','COLOR',attributetype.string,'red');
Character vector or string scalar — This value must partially or fully match one of the enumerators in the
属性型
枚举。
Example:addattribute(LDC,'Car','Color','Str','Red');
attributeDefault
-属性的默认值
numeric scalar|logical scalar|角色向量|字符串标量|字符向量的单元格数|字符串标量的单元格数组
Default value of the attribute, specified as one of these:
数字标量 - 指定此值
typeOfAttribute
是数字
。逻辑scalar — Specify this value when
typeOfAttribute
是逻辑
。Character vector or string scalar — Specify this value when
typeOfAttribute
是细绳
。Cell array of character vectors or cell array of string scalars — Specify this value when
typeOfAttribute
是列表
。The first entry in the cell array is the default value.
名称值参数
Specify optional pairs of arguments asname1 = value1,...,namen = valuen
, 在哪里姓名
是参数名称和Value
是the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.
在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名
用引号。
Example:addAttribute(LDC,“汽车/车轮”,“外部载臂”,attributetype.numeric,740,'description',''MM'外直径);
Description
-属性描述
''
(默认)|角色向量|字符串标量
属性描述,指定为逗号分隔对'描述'
and a character vector or string scalar. Use this name-value pair to describe the attribute.
版本历史记录
MATLABCommand
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。万博1manbetx
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
Americas
- América Latina(Español)
- 加拿大(英语)
- United States(英语)