ee.Kernel.kirsch

生成 3x3 Kirsch 罗盘边缘检测内核。

用法返回
ee.Kernel.kirsch(magnitude, normalize)内核
参数类型详细信息
magnitude浮点数,默认值:1按此量缩放每个值。
normalize布尔值,默认值:false将内核值归一化为总和为 1。

示例

代码编辑器 (JavaScript)

print('A Kirsch compass kernel', ee.Kernel.kirsch());

/**
 * Output weights matrix
 *
 * [5, -3, -3]
 * [5,  0, -3]
 * [5, -3, -3]
 */

Python 设置

如需了解 Python API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

print('A Kirsch compass kernel:')
pprint(ee.Kernel.kirsch().getInfo())

#  Output weights matrix

#  [5, -3, -3]
#  [5,  0, -3]
#  [5, -3, -3]