exponenta event banner

removeSublabel

Удаление надписи из метки в объекте создания определения метки

Описание

пример

removeSublabel(ldc,labelName,sublabelName) удаляет указанную субкнигу из указанной метки. Эта метка должна находиться в объекте создания определения метки ldc.

Примечание

Удаление подаблицы также удаляет все атрибуты, связанные с этой подаблицей.

Примеры

свернуть все

Загрузите существующую таблицу определений меток в рабочую область.

labelDefFile = fullfile(toolboxdir('vision'), 'visiondata', 'labelDefsWithAttributes.mat');
ld = load(labelDefFile)
ld = struct with fields:
    labelDefs: [4x4 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.

Отображение информации о метке «TrafficLight», определенной в объекте создания определения метки.

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'

Удалите надписи «Light» из метки «TrafficLight».

removeSublabel(ldc,'TrafficLight','Light')

Отображение подробных данных объекта создания определения метки для подтверждения удаления суббнака из метки «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.

Отображение информации о метке «TrafficLight». Убедитесь, что надписи «Light» удалены.

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'

Входные аргументы

свернуть все

Автор определения метки, указанный как labelDefinitionCreator объект.

Имя метки, указываемое как вектор символа или скаляр строки, однозначно идентифицирующий метку, с которой связана подаблица.

Имя субкниги, указанное как вектор символов или строковый скаляр, который идентифицирует субкнигу, подлежащую удалению из указанной метки labelName.

См. также

Объекты

Функции

Представлен в R2018b