ee.Kernel.compass

यह फ़ंक्शन, किनारे का पता लगाने के लिए 3x3 Prewitt's Compass कर्नेल जनरेट करता है.

इस्तेमालरिटर्न
ee.Kernel.compass(magnitude, normalize)कर्नेल
आर्ग्यूमेंटटाइपविवरण
magnitudeफ़्लोट, डिफ़ॉल्ट: 1हर वैल्यू को इस रकम से स्केल करें.
normalizeबूलियन, डिफ़ॉल्ट वैल्यू: falseकर्नल वैल्यू को सामान्य करें, ताकि उनका योग 1 हो.

उदाहरण

कोड एडिटर (JavaScript)

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

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

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

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]