labelType

Label type enumerations for labeling

Description

The labelType enumerations enable you to specify the types of labels 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 label definitions of specific types. When selecting labels from a groundTruth or groundTruthMultisignal object, use these enumerations to select labels of a specific type.

Creation

Description

example

labelType.Rectangle creates a rectangular region of interest (ROI) label type for labeling image and video data.

labelType.Line creates a polyline ROI label type for labeling image and video data.

labelType.PixelLabel creates a pixel ROI label type for labeling image and video data.

labelType.Cuboid creates a cuboid ROI label type for labeling lidar point cloud data.

labelType.Scene creates a scene label type for labeling data across a specified time interval.

labelType.Custom creates a custom label type. Labeler apps do not display labels of type Custom.

Object Functions

isCustomDetermine if label types are Custom labels
isROIDetermine if label types are ROI labels
isSceneDetermine if label types are Scene labels

Examples

collapse all

Create a label definition creator object. Add a label named "Road" with the label type specified as a rectangle.

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

Add a label named "Sky" with the label type specified as a scene.

addLabel(ldc,'Sky',labelType.Scene);

Add a sublabel named "Lanes" to the label "Road". Specify the label type for the sublabel as a line.

addSublabel(ldc,'Road','Lanes',labelType.Line);

Display the details of the definitions stored in the label definition creator object.

ldc
ldc = 
labelDefinitionCreator contains the following labels:

	Road with 1 sublabels and 0 attributes and belongs to None group.	(info)
	Sky with 0 sublabels and 0 attributes and belongs to None group.	(info)

For more details about attributes and sublabels, use the info method.

Display information about the label "Road" as a structure by using the info function. The Type field in the structure labelStruct indicates the type of label.

labelStruct = info(ldc,'Road')
labelStruct = struct with fields:
           Name: "Road"
           Type: Rectangle
     LabelColor: {''}
          Group: "None"
     Attributes: []
      Sublabels: "Lanes"
    Description: ' '

Introduced in R2017a