LabelBadBands

Краткая информация

Создает растровый объект, который помечает плохие каналы в многомерном или гиперспектральном растре на основе выбранного поднабора каналов. На выходе сохраняется тот же порядок каналов, что и на входе.

Обсуждение

Эта функция позволяет указать набор каналов, используя диапазоны или списки, которые следует пометить как плохие. На выходе для свойства канала IsBadBand будет установлено значение 1. Это свойство будет создано, если оно еще не существует. Эта функция работает как с мультиспектральными, так и с гиперспектральными изображениями и поддерживает тот же порядок каналов, что и на входе.

Указанный набор растровых данных является временным для растрового объекта. Чтобы сделать его постоянным, вы можете вызвать метод растрового объекта save.

Более подробную информацию о том, как работает эта функция, см. в описании растровой функции Пометить плохие каналы.

Синтаксис

LabelBadBands (raster, {method}, {bands})
ПараметрОписаниеТип данных
raster

The input multidimensional or hyperspectral image.

Raster
method

Specifies the method that will be used to label bad bands in the input image.

  • BY_IDS—The band designation or sequence number will be used to label bad bands in the input image.
  • BY_WAVELENGTHS—Band wavelengths on the electromagnetic spectrum will be used to label bad bands in the input image.

(Значение по умолчанию — BY_IDS)

String
bands

The bands that will be labeled as bad bands based on the specified method argument option. The following are examples:

  • Using the BY_IDS option for the method argument, specify '100 105 110 120-130'. Values will be minus by 1 for a 0-based index.
  • Using the BY_WAVELENGTHS option for the method argument, specify '400-480 900'.

The bands argument specifies the bands that will be labeled as bad bands and depends on the method option specified. The bands are entered as a space-delimited list and can be specified as ranges of bands. For example, when specifying a subset using the BY_IDS option for the method parameter, a value of 20-50 60-100 200 will label band IDs between (inclusive) 20 and 50, 60 and 100, and a band with an ID of 200.

When specifying the bands parameter value using the BY_WAVELENGTHS option for the method argument, all bands within the wavelength range will be labeled.

When specifying bands by wavelength, the units—such as microns or nanometers—will be the same as the input units.

(Значение по умолчанию — None)

String
Возвращаемое значение
Тип данныхОписание
Raster

Выходное изображение с помеченными плохими каналами.

Пример кода

LabelBadBands, пример 1

В этом примере каналы извлекаются из входного растра с помощью опции BY_IDS.

labeled_bands = arcpy.ia.LabelBadBands(raster=img_lyr, method="BY_IDS", bands="100 105 110 120-130")
LabelBadBands, пример 2

В этом примере каналы извлекаются из входного растра с помощью опции BY_WAVELENGTH.

labeled_bands = arcpy.ia.LabelBadBands(raster=img_lyr, method="BY_WAVELENGTHS", bands="400-700")