info
Display information about a label, sublabel, or attribute stored in label definition creator object
Description
Examples
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: {3×1 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 = 3×1 cell
{'Red' }
{'Yellow'}
{'Green' }
Input Arguments
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
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)