Main Content

editLabelDescription

Modify description of label or sublabel in label definition creator object

Description

example

editLabelDescription(ldc,labelName,description) modifies the description of a label or sublabel identified by labelName. The label or sublabel must be in the label definition creator object ldc.

Examples

collapse all

Load an existing label definitions table into the workspace.

load('editlabelDefs.mat')

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

ldc = labelDefinitionCreator(labelDefs)
ldc = 
labelDefinitionCreator contains the following labels:

	Vehicle with 0 sublabels and 3 attributes and belongs to None group.	(info)
	Pedestrian with 0 sublabels and 0 attributes and belongs to None group.	(info)
	LaneMarker with 0 sublabels and 2 attributes and belongs to None group.	(info)
	TrafficLight with 1 sublabels and 0 attributes and belongs to None group.	(info)

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

Modify the Description of a Label

Display information about the label "LaneMarker".

info(ldc,'LaneMarker')
           Name: "LaneMarker"
           Type: Line
     LabelColor: {''}
          Group: "None"
     Attributes: ["BoundaryType"    "Location_wrt_Ego"]
      Sublabels: []
    Description: ''

Modify the description for the label "LaneMarker".

editLabelDescription(ldc,'LaneMarker','Use 5 or more points for curved lane lines.')

Display information about the label "LaneMarker" to verify the modified label description.

info(ldc,'LaneMarker')
           Name: "LaneMarker"
           Type: Line
     LabelColor: {''}
          Group: "None"
     Attributes: ["BoundaryType"    "Location_wrt_Ego"]
      Sublabels: []
    Description: 'Use 5 or more points for curved lane lines.'

Modify the Description of a Sublabel

Display information about the label "TrafficLight".

info(ldc,'TrafficLight')
           Name: "TrafficLight"
           Type: Rectangle
     LabelColor: {''}
          Group: "None"
     Attributes: []
      Sublabels: "Light"
    Description: 'Bounding box for the traffic light. Use sublabels to mark each individual light.'

Display information about the sublabel "Light" under the label "TrafficLight".

info(ldc,'TrafficLight/Light')
           Name: "Light"
           Type: Rectangle
     Attributes: ["Active"    "Color"]
      Sublabels: []
    Description: 'lights'

Modify the description for the sublabel "Light".

editLabelDescription(ldc,'TrafficLight/Light','Mark a tight bounding box around each light.')

Display information about the sublabel "Light" to verify the modified sublabel description.

info(ldc,'TrafficLight/Light')
           Name: "Light"
           Type: Rectangle
     Attributes: ["Active"    "Color"]
      Sublabels: []
    Description: 'Mark a tight bounding box around each light.'

Input Arguments

collapse all

Label definition creator, specified as a labelDefinitionCreator object.

Label or sublabel name, specified as a character vector or string scalar that uniquely identifies the label or sublabel for which the description is to be updated.

  • To specify a label, use the form 'labelName'.

  • To specify a sublabel, use the form 'labelName/sublabelName'.

Description, specified as a character vector or string scalar that contains the new description for the label or sublabel identified by labelName.

Version History

Introduced in R2018b