Main Content

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, Lidar Labeler (Lidar Toolbox), and Ground Truth Labeler (Automated Driving Toolbox). When creating label definitions by using a labelDefinitionCreator or labelDefinitionCreatorMultisignal (Automated Driving Toolbox) object, use these enumerations to create label definitions of specific types. When selecting labels from a groundTruth or groundTruthMultisignal (Automated Driving Toolbox) or groundTruthLidar (Lidar Toolbox) object, use these enumerations to select labels of a specific type.

Creation

Description

labelType("Rectangle") creates an axis-aligned rectangular region of interest (ROI) label type for labeling image and video data. You can also use the programmatic format, labelType.Rectangle.

example

labelType("RotatedRectangle") creates a rotated rectangular region of interest (ROI) label type for labeling image and video data. You can also use the programmatic format, labelType.RotatedRectangle.

labelType("Line") creates a polyline ROI label type for labeling image and video data. You can also use the programmatic format, labelType.Line.

labelType("PixelLabel") creates a pixel ROI label type for labeling image and video data. You can also use the programmatic format, labelType.PixelLabel.

labelType("Polygon") creates a polygon ROI label type for labeling image and video data. You can also use the programmatic format, labelType.Polygon.

labelType("Cuboid") creates a cuboid ROI label type for labeling lidar point cloud data. You can also use the programmatic format, labelType.Cuboid.

labelType("ProjectedCuboid") creates a projected cuboid ROI label type for labeling image and video data. You can also use the programmatic format, labelType.ProjectedCuboid.

labelType("Scene") creates a scene label type for labeling data across a specified time range. You can also use the programmatic format, labelType.Scene.

labelType('Custom') creates a custom label type. Labeler apps do not display labels of type Custom. You can also use the programmatic format, labelType.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: ' '

Version History

Introduced in R2017a

See Also

Apps

Objects