Main Content

create

Create label definitions table from the label definition creator object

Description

example

labelDefs = create(ldc) creates a label definitions table, labelDefs, from the label definition creator object ldc. You can import the labelDefs table into the Image Labeler and Video Labeler apps to label ground truth data.

Examples

collapse all

Create an empty label definition creator object.

ldc = labelDefinitionCreator
ldc = 
labelDefinitionCreator with 0 labels. Use the 

Add a label "Vehicle" to the label definition creator object. Specify the type of label as a rectangle and add a description to the label.

addLabel(ldc,'Vehicle','Rectangle','Description','Bounding box for the vehicle. Use this label for cars and buses.')

Add an attribute "IsCar" to the label "Vehicle". Specify the type of attribute as logical with value true and add description to the attribute.

addAttribute(ldc,'Vehicle','IsCar','logical',true,'Description','Type of vehicle')

Add an attribute "IsBus" to the label "Vehicle". Specify the type of attribute as logical with value false and add description to the attribute.

addAttribute(ldc,'Vehicle','IsBus','logical',false,'Description','Type of vehicle')

Create a label definitions table from the definitions stored in the label definition creator object.

labelDefs = create(ldc)
labelDefs=1×6 table
       Name          Type       LabelColor     Group                                  Description                                  Hierarchy  
    ___________    _________    __________    ________    ____________________________________________________________________    ____________

    {'Vehicle'}    Rectangle    {0x0 char}    {'None'}    {'Bounding box for the vehicle. Use this label for cars and buses.'}    {1x1 struct}

Input Arguments

collapse all

Label definition creator, specified as a labelDefinitionCreator object. The object ldc defines the labels, sublabels, and attributes used for generating the label definitions table labelDefs.

Output Arguments

collapse all

Label definitions, returned as a table with up to seven columns. The possible columns are Name, Type, LabelColor, PixelLabelID, Group, Description, and Hierarchy. This table specifies the definitions of labels, sublabels, and attributes for labeling ground truth data. For more details, see LabelDefinitions.

Version History

Introduced in R2018b