attributeType

Enumeration of supported attribute types

Description

The attributeType enumeration provides a means to specify the type of attribute in a labelDefinitionCreator object and the Ground Truth Labeler (requires Automated Driving Toolbox™) and Video Labeler apps.

Creation

Syntax

attributeType

Description

example

attributeType creates an attributeType enumeration to specify the type of attribute.

Properties

expand all

These properties represent the enumerators.

Numeric scalar attribute, specified as an enumerator in attributeType enumeration.

String attribute, specified as an enumerator in attributeType enumeration.

Logical attribute, specified as an enumerator in attributeType enumeration.

List of strings attribute, specified as an enumerator in attributeType enumeration takes the attribute value as a string from a pre-defined list of strings.

None, specified as an enumerator in attributeType enumeration indicates that the attribute type is not yet 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 structured data by using the info object 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