Main Content

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, Lidar Labeler (Lidar Toolbox), and Ground Truth Labeler (Automated Driving Toolbox) (requires Automated Driving Toolbox™). When creating label definitions by using a labelDefinitionCreator or labelDefinitionCreatorMultisignal (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 are true (logical 1), false (logical 0), 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

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

See Also

Apps

Objects

Introduced in R2018b