attributeType - Attribute type enumerations for labeling - MATLAB (original) (raw)
Main Content
Attribute type enumerations for labeling
Description
Creation
Syntax
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
(logical1
), false
(logical 0
), or an empty logical value. You can also use the programmatic format,attributeType.Logical
.
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
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: ' '
Version History
Introduced in R2018b
See Also
Apps
- Image Labeler | Ground Truth Labeler (Automated Driving Toolbox) | Video Labeler
Objects
- labelType | labelDefinitionCreator | labelDefinitionCreatorMultisignal (Automated Driving Toolbox)