Main Content

info

Display information about a label, sublabel, or attribute stored in label definition creator object

Description

example

info(ldc,name) displays information about the specified label, sublabel or attribute stored in the label definition creator object ldc.

infoStruct = info(ldc,name) returns the information as a structure.

Examples

collapse all

Load an existing label definitions table into the workspace. Create a label definition creator object.

FilePath = fullfile(toolboxdir('vision'),'visiondata','labelDefsWithAttributes.mat');
Ld = load(FilePath);
ldc = labelDefinitionCreator(Ld.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.

Get information about the label "TrafficLight" as a structured data.

trafficStruct = info(ldc,'TrafficLight')
trafficStruct = struct with fields:
           Name: "TrafficLight"
           Type: Rectangle
     LabelColor: {''}
          Group: "None"
     Attributes: []
      Sublabels: "Light"
    Description: 'Mark a tight bounding box around the traffic light. Use the sublabels to mark each individual light'

Get information about the sublabel "Light" under the label "TrafficLight" as a structured data.

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

Get information about the attribute "Color" under the sublabel "TrafficLight/Light" as a structured data.

colorStruct = info(ldc,'TrafficLight/Light/Color')
colorStruct = struct with fields:
           Name: "Color"
           Type: List
      ListItems: {3x1 cell}
    Description: 'Specify the color of the light as one of Red, Yellow (amber) or Green.'

Display the ListItems field of the structure colorStruct.

colorStruct.ListItems
ans = 3x1 cell
    {'Red'   }
    {'Yellow'}
    {'Green' }

Input Arguments

collapse all

Label definition creator, specified as a labelDefinitionCreator object.

Name of label, sublabel, or attribute in the ldc object, specified as a character vector or string scalar whose form depends on the type of name you specify.

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

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

  • To specify an attribute, use the form 'labelName/sublabelName/attributeName'.

Output Arguments

collapse all

Information structure, returned as a structure that contains the fields Name, Type, Attributes (when pertinent), Sublabels (when pertinent), and Description. If name specifies an attribute, then infoStruct also contains the fields DefaultValue and ListItems (for List attributes).

Version History

Introduced in R2018b

See Also

Objects

Functions