ee.Kernel.compass

Tạo một nhân phát hiện cạnh La bàn của Prewitt 3x3.

Cách sử dụngGiá trị trả về
ee.Kernel.compass(magnitude, normalize)Kernel
Đối sốLoạiThông tin chi tiết
magnitudeSố thực, mặc định: 1Điều chỉnh tỷ lệ mỗi giá trị theo số tiền này.
normalizeBoolean, mặc định: falseChuẩn hoá các giá trị của nhân để có tổng bằng 1.

Ví dụ

Trình soạn thảo mã (JavaScript)

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

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

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

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

# Output weights matrix

#  [1,  1, -1]
#  [1, -2, -1]
#  [1,  1, -1]