attributeType

Attribute type enumerations for labeling

Description

The attributeType enumerations enable you to specify the types of attributes used in these labeling apps: Image Labeler, Video Labeler, and Ground Truth Labeler (requires Automated Driving Toolbox™). When creating label definitions by using a labelDefinitionCreator or labelDefinitionCreatorMultisignal 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.

attributeType.String creates a string attribute type enumeration. Attributes of this type are string scalars.

attributeType.Logical creates a logical attribute type enumeration. Attributes of this type are true (logical 1), false (logical 0), or an empty logical value.

example

attributeType.List creates a list attribute type enumeration. Attributes of this type are lists of predefined strings.

attributeType.None creates an enumeration whose type is not defined.

Object Functions

hasValueDetermine 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);

Add an attribute named "Color" to the label "Vehicle". 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 the info function. The Type field in the output structure colorStruct indicates the type of attribute.

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

Introduced in R2018b