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
Для просмотра документации необходимо авторизоваться на сайте