ee.Kernel.prewitt

สร้างเคอร์เนลการตรวจหาขอบแบบ Prewitt ขนาด 3x3

การใช้งานการคืนสินค้า
ee.Kernel.prewitt(magnitude, normalize)เคอร์เนล
อาร์กิวเมนต์ประเภทรายละเอียด
magnitudeFloat, ค่าเริ่มต้น: 1ปรับขนาดแต่ละค่าตามจำนวนนี้
normalizeบูลีน ค่าเริ่มต้น: falseทำให้ค่าเคอร์เนลอยู่ในค่าปกติที่ผลรวม 1

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

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

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

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

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

# Output weights matrix

#  [1, 0, -1]
#  [1, 0, -1]
#  [1, 0, -1]