This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

labelType

Enumeration of supported label types

Description

The labelType enumeration provides a means to specify the type of label in a labelDefinitionCreator object and the labeler apps: Ground Truth Labeler (requires Automated Driving Toolbox™), Image Labeler, and Video Labeler.

Creation

Syntax

labelType

Description

example

labelType creates an labelType enumeration to specify a type of label.

Properties

expand all

These properties represent the enumerators.

Rectangular region of interest (ROI) label, specified as an enumerator in labelType enumeration.

Polyline region of interest label, specified as an enumerator in labelType enumeration.

Scene label, specified as an enumerator in labelType enumeration. Scene labels can be marked on a frame or on an interval of frames.

Custom label type, specified as an enumerator in labelType enumeration. The Labeler apps do not display labels with type Custom.

Label marked as pixel labeled region of interest, specified as an enumerator in labelType enumeration. The pixel labeled ROI provides labels for every pixel within the ROI and is used to label a group of neighboring pixels that share the same label category.

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.	(info)
	Sky with 0 sublabels and 0 attributes.	(info)

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

Display information about the label "Road" as a structured data by using the info object 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
     Attributes: []
      Sublabels: "Lanes"
    Description: ' '

Introduced in R2017a