Main Content

attributeType

Attribute type enumerations for labeling

Description

TheattributeTypeenumerations enable you to specify the types of attributes used in these labeling apps:Image Labeler,Video Labeler,Lidar Labeler(Lidar Toolbox), andGround Truth Labeler(Automated Driving Toolbox)(requires Automated Driving Toolbox™). When creating label definitions by using alabelDefinitionCreatororlabelDefinitionCreatorMultisignal(Automated Driving Toolbox)object, use these enumerations to create attributes of specific types.

Creation

Description

attributeType('Numeric')creates a numeric attribute type enumeration. Attributes of this type are numeric scalar values. You can also use the programmatic format,attributeType.Numeric.

attributeType('String')creates a string attribute type enumeration. Attributes of this type are string scalars. You can also use the programmatic format,attributeType.String.

attributeType('Logical')creates a logical attribute type enumeration. Attributes of this type aretrue(logical1),false(logical0), or an empty logical value. You can also use the programmatic format,attributeType.Logical.

example

attributeType('List')creates a list attribute type enumeration. Attributes of this type are lists of predefined strings. You can also use the programmatic format,attributeType.List.

attributeType('None')creates an enumeration whose type is not defined. You can also use the programmatic format,attributeType.None.

Object Functions

hasValue Determine if the attribute type is numeric or logical

Examples

collapse all

Create a label definition creator object and add a label named "Vehicle". Specify the type of label as a rectangle.

ldc = labelDefinitionCreator; addLabel(ldc,'Vehicle',labelType.Rectangle);

添加一个属性命名为“颜色”Vehic标签”le". Specify the attribute type as a list.

addAttribute(ldc,'Vehicle','Color',attributeType.List,{'White','Green','Blue'})

Display information about the attribute "Color" as a structure by using theinfofunction. TheTypefield in the output structurecolorStructindicates the type of attribute.

colorStruct = info(ldc,'Vehicle/Color')
colorStruct =struct with fields:Name: "Color" Type: List ListItems: {'White' 'Green' 'Blue'} Description: ' '

See Also

Apps

Objects

Introduced in R2018b