removeSublabel
Remove sublabel from label in label definition creator object
Description
removeSublabel(
removes the specified sublabel from the indicated label. This label must be in the label
definition creator object ldc
,labelName
,sublabelName
)ldc
.
Note
Removing a sublabel also removes any attributes associated with that sublabel.
Examples
Remove Sublabel from Label in Label Definition Creator Object
Load an existing label definitions table into the workspace.
labelDefFile = fullfile(toolboxdir('vision'), 'visiondata', 'labelDefsWithAttributes.mat'); ld = load(labelDefFile)
ld = struct with fields:
labelDefs: [4x4 table]
Create a label definition creator object from the label definitions table.
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.
Display information about the label "TrafficLight" defined in the label definition creator object.
info(ldc,'TrafficLight')
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'
Remove the sublabel "Light" from the label "TrafficLight".
removeSublabel(ldc,'TrafficLight','Light')
Display the details of the label definition creator object to confirm that a sublabel is removed from the label "TrafficLight".
ldc
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 0 sublabels and 0 attributes and belongs to None group. (info) For more details about attributes and sublabels, use the info method.
Display information about the label "TrafficLight". Confirm that the sublabel "Light" is removed.
info(ldc,'TrafficLight')
Name: "TrafficLight" Type: Rectangle LabelColor: {''} Group: "None" Attributes: [] Sublabels: [] Description: 'Mark a tight bounding box around the traffic light. Use the sublabels to mark each individual light'
Input Arguments
ldc
— Label definition creator
labelDefinitionCreator
object
Label definition creator, specified as a labelDefinitionCreator
object.
labelName
— Label name
character vector | string scalar
Label name, specified as a character vector or string scalar that uniquely identifies the label to which the sublabel is associated.
sublabelName
— Sublabel name
character vector | string scalar
Sublabel name, specified as a character vector or string scalar that identifies the
sublabel to be removed from the indicated label labelName
.
Version History
Introduced in R2018b
See Also
Objects
Functions
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi 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)