Skip to main content

Speckle

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

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

Обсуждение

Более подробную информацию о работе этой функции см. в растровой функции Спекл.

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

Синтаксис

Speckle(raster, {filter_type}, {filter_size}, {noise_model}, {noise_var}, {additive_noise_mean}, {multiplicative_noise_mean}, {nlooks}, {damp_factor})

Параметр Объяснение Тип данных

raster

The input raster.

Raster

filter_type

Specifies the filter type that will be used in the smoothing algorithm to remove speckle noise.

  • Lee—The Lee filter will be used, which reduces the speckle noise by applying a spatial filter to each pixel in an image and filters the data based on local statistics calculated within a square window.

  • EnhancedLee—The EnhancedLee filter will be used, which is a refined version of the Lee filter that reduces the speckle noise effectively by preserving image sharpness and detail. This filter requires the damp_factor and nlooks arguments to be set.

  • Frost—The Frost filter will be used, which reduces speckle noise and preserves important image features at the edges with an exponentially damped circularly symmetric filter that uses local statistics within individual filter windows. This filter requires the damp_factor argument to be set.

  • Kuan—The Kuan filter will be used, which follows a similar filtering process to the Lee filter in reducing speckle noise. This filter also applies a spatial filter to each pixel in an image, filtering the data based on local statistics of the centered pixel value that is calculated using the neighboring pixels. The Kuan filter requires the nlooks argument to be set, which controls image smoothing and estimates noise variance.

  • Gamma MAP—A Bayesian analysis and gamma distribution filter will be used to reduce the speckle noise. This filter is useful for reducing speckle while preserving edges.

  • Refined Lee—A spatial filter will be applied to selected pixels, based on local statistics, to reduce the speckle noise. This filter uses a nonsquare filter window to match the direction of edges. It is useful for reducing speckle while preserving edges.

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

String

filter_size

Specifies the size of the filter window in pixels.

  • 3x3—The pixel size of the filter window is 3 by 3.

  • 5x5—The pixel size of the filter window is 5 by 5.

  • 7x7—The pixel size of the filter window is 7 by 7.

  • 9x9—The pixel size of the filter window is 9 by 9.

  • 11x11—The pixel size of the filter window is 11 by 11.

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

String

noise_model

Specifies the type of noise that is reducing the quality of the radar image. This argument is only valid when the filter_type argument is set to Lee.

  • Multiplicative—Random signal noise that is multiplied into the relevant signal during capture or transmission is reducing the quality of the image.

  • Additive—Random signal noise that is added into the relevant signal during capture or transmission is reducing the quality of the image.

  • AdditiveAndMultiplicative—A combination of both noise models is reducing the quality of the image.

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

String

noise_var

The noise variance of the radar image.

This argument is only valid when the filter_type argument is set to Lee and the noise_model argument is set to Additive or AdditiveAndMultiplicative.

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

Double

additive_noise_mean

The mean value of additive noise. A larger noise mean value will produce less smoothing, while a smaller value results in more smoothing.

This argument is only valid when the filter_type argument is set to Lee and the noise_model argument is set to Additive or AdditiveAndMultiplicative.

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

Double

multiplicative_noise_mean

The mean value of multiplicative noise. A larger noise mean value will produce less smoothing, while a smaller value results in more smoothing.

This argument is only valid when the filter_type argument is set to Lee and the noise_model argument is set to Multiplicative or AdditiveAndMultiplicative.

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

Double

nlooks

The number of looks of the image, which controls image smoothing and estimates noise variance. A smaller value results in more smoothing, while a larger value retains more image features.

This argument is only valid when the filter_type argument is set to Lee and the noise_model argument is set to Multiplicative, or when the filter_type argument is set to Kuan.

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

Integer

damp_factor

The extent of exponential damping effect on filtering. A larger damping value preserves edges better but smooths less, while a smaller value produces more smoothing.

This parameter is only valid when the filter_type argument is set to EnhancedLee or Frost.

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

Double

Возвращаемое значение

Тип данных Объяснение

Raster

Выходной растр.

Пример кода

Speckle, пример

Применяет фильтр Ли к радарному изображению Sentinel 1.

import arcpy

out_speckle_raster = arcpy.sa.Speckle("Sentinel_1.tif", filter_type="Lee", filter_size="3x3",
                                              noise_model="AdditiveAndMultiplicative", noise_var=0.25,
                                              additive_noise_mean=0, multiplicative_noise_mean=1)