ee.Kernel.laplacian8

生成 3x3 Laplacian-8 边缘检测内核。

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

示例

代码编辑器 (JavaScript)

print('A Laplacian-8 kernel', ee.Kernel.laplacian8());

/**
 * Output weights matrix
 *
 * [1,  1, 1]
 * [1, -8, 1]
 * [1,  1, 1]
 */

Python 设置

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

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

print('A Laplacian-8 kernel:')
pprint(ee.Kernel.laplacian8().getInfo())

#  Output weights matrix

#  [1,  1, 1]
#  [1, -8, 1]
#  [1,  1, 1]