Main Content

addattribute

Add attributes to label or sublabel in label definition creator object for multisignal workflow

Description

addattribute(ldc,,,,标签名,,,,attributeName,,,,typeOfAttribute,,,,attributeDefault将带有指定名称的属性和类型添加到指示的标签或Sublabel。该属性是在指定标签或sublabel的层次结构下添加的labelDefinitionCreatorMultisignal目的ldc

例子

addattribute(___,,,,名称,价值specifies options using one or more name-value pair arguments in addition to the input arguments in the previous syntax.

Examples

全部收缩

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: ' '

输入参数

全部收缩

标签定义创造者multisignal workflow, specified as alabelDefinitionCreatorMultisignal目的。

标签或sublabel名称,指定为字符向量或字符串标量,该名称唯一标识要添加属性的标签或sublabel。

  • 要指定标签,请使用表单'标签名'。

Example:addAttribute(LDC,“ CAR”,“颜色”)

  • 要指定Sublabel,请使用表单'标签名/sublabelName'。在这种情况下,属性与Sublabel相关联。

Example:addAttribute(LDC,“交通灯/redlight','ison')

属性名称,指定为字符向量或字符串标量,标识要添加到标签或sublabel的属性。

属性类型,,,,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');

Default value of the attribute, specified as one of these:

  • 数字标量 - 指定此值typeOfAttribute数字

  • 逻辑scalar — Specify this value whentypeOfAttribute逻辑

  • Character vector or string scalar — Specify this value whentypeOfAttribute细绳

  • Cell array of character vectors or cell array of string scalars — Specify this value whentypeOfAttribute列表。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'外直径);

属性描述,指定为逗号分隔对'描述'and a character vector or string scalar. Use this name-value pair to describe the attribute.

版本历史记录

在R2020a中引入