info
Display information about a label, sublabel, or attribute stored in label definition creator object
Description
Examples
Display Information About Definitions Stored in Label Definition Creator Object
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
ldc
— Label definition creator
labelDefinitionCreator
object
Label definition creator, specified as a labelDefinitionCreator
object.
name
— Name of label, sublabel, or attribute
character vector | string scalar
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
infoStruct
— Information structure
structure
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
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)