GeometricMedian
汇总
计算多波段影像时间序列中像素的几何中值。
讨论
有关此函数工作原理的详细信息,请参阅 几何中值 函数。
栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。
语法
GeometricMedian(rasters, epsilon, {max_iteration}, {extent_type}, {cellsize_type})
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
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 (默认值为 10) |
Integer |
|
extent_type |
Specifies the processing extent for the output raster.
(默认值为 IntersectionOf) |
String |
|
cellsize_type |
Specifies the cell size to use in the output raster.
(默认值为 MaxOf) |
String |
返回值
| 数据类型 | 说明 |
|---|---|
|
Raster |
输出栅格对象。 |
代码示例
此示例计算 Landsat 影像集合中的几何中值。
# Import system modules
import arcpy
from arcpy.ia import *
# Construct a collection from a mosaic dataset
rc = RasterCollection(r'C:\data.gdb\time_series_landsat_images')
# Run
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")