GeometricMedian

Image Analyst ライセンスで利用できます。

サマリー

Calculates the geometric median across pixels in a time series of multiband imagery.

説明

For more information about how this function works, see the Geometric Median function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

構文

GeometricMedian (rasters, epsilon, {max_iteration}, {extent_type}, {cellsize_type})
パラメーター説明データ タイプ
rasters
[rasters,...]

The input multiband rasters.

List
epsilon

The convergence value between two consecutive iterations. When epsilon is less than or equal to the specified value, the iteration will stop, and the result of the last iteration will be used.

(デフォルト値は次のとおりです 0.001)

Double
max_iteration

The maximum number of iterations to complete. The computation will end once this value is reached, regardless of the epsilon setting.

(デフォルト値は次のとおりです 10)

Integer
extent_type

Specifies the processing extent for the output raster.

  • FirstOfUse the extent of the first input raster to determine the processing extent.
  • IntersectionOfUse the extent of the overlapping pixels to determine the processing extent. This is the default.
  • UnionOfUse the extent of all the rasters to determine the processing extent.
  • LastOfUse the extent of the last input raster to determine the processing extent.

(デフォルト値は次のとおりです IntersectionOf)

String
cellsize_type

Specifies the cell size to use in the output raster.

  • FirstOfUse the first cell size of the input rasters. This is the default.
  • MinOfUse the smallest cell size of all the input rasters.
  • MaxOfUse the largest cell size of all the input rasters. This is the default.
  • MeanOfUse the mean cell size of all the input rasters.
  • LastOfUse the last cell size of the input rasters.

(デフォルト値は次のとおりです MaxOf)

String
戻り値
データ タイプ説明
Raster

The output raster object.

コードのサンプル

GeometricMedian example

This example calculates the geometric median from a collection of Landsat images.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Construct a collection from a mosaic dataset
rc = RasterCollection(r'C:\data.gdb\time_series_landsat_images')

#Execute
geomedian = arcpy.ia.GeometricMedian(rc, {"epsilon": 0.001, "max_iteration": 5, "extent_type":"UnionOf", "CellsizeType": "FirstOf"})

# Save the output
geomedian.save("C:/arcpyExamples/outputs/geomedian_raster.crf")