removeAttribute
Remove attribute from label or sublabel in label definition creator object
Description
removeAttribute(
removes the specified attribute from the indicated label or sublabel in the label definition
creator object ldc
,labelName
,attributeName
)ldc
.
Examples
Load an existing label definitions table into the workspace.
labelDefFile = fullfile(toolboxdir('vision'),'visiondata','labelDefsWithAttributes.mat'); ld = load(labelDefFile)
ld = struct with fields:
labelDefs: [4×4 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.
Remove an Attribute from a Label
Display information about the label "Vehicle" defined in the label definition creator object.
info(ldc,'Vehicle')
Name: "Vehicle" Type: Rectangle LabelColor: {''} Group: "None" Attributes: ["Class" "Color" "View"] Sublabels: [] Description: 'Draw a tight bounding box around the vehicle. Use this label for cars, buses and trailers.'
Remove the attribute "Color" from the label "Vehicle".
removeAttribute(ldc,'Vehicle','Color')
Display information about the label "Vehicle". Confirm that the attribute "Color" is removed.
info(ldc,'Vehicle')
Name: "Vehicle" Type: Rectangle LabelColor: {''} Group: "None" Attributes: ["Class" "View"] Sublabels: [] Description: 'Draw a tight bounding box around the vehicle. Use this label for cars, buses and trailers.'
Remove an Attribute from a Sublabel
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'
Display information about the sublabel "Light" under the label "TrafficLight".
info(ldc,'TrafficLight/Light')
Name: "Light" Type: Rectangle Attributes: ["Active" "Color"] Sublabels: [] Description: 'Mark a tight bounding box around each light.'
Remove the attribute "Active" from the sublabel "TrafficLight/Light".
removeAttribute(ldc,'TrafficLight/Light','Active')
Display information about the sublabel "TrafficLight/Light". Confirm that the attribute "Active" is removed.
info(ldc,'TrafficLight/Light')
Name: "Light" Type: Rectangle Attributes: "Color" Sublabels: [] Description: 'Mark a tight bounding box around each light.'
Input Arguments
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 from which the attribute is to be removed.
To specify a label, use the form 'labelName'.
To specify a sublabel, use the form 'labelName/sublabelName'. In this case, the attribute associates to the sublabel.
Attribute name, specified as a character vector or string scalar that identifies the
attribute to be removed from the indicated label or sublabel
labelName
.
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)