ee.Kernel.fixed

Erstellt einen Kernel.

NutzungAusgabe
ee.Kernel.fixed(width, height, weights, x, y, normalize)Kernel
ArgumentTypDetails
widthGanzzahl, Standard: -1Die Breite des Kernels in Pixeln.
heightGanzzahl, Standard: -1Die Höhe des Kernels in Pixeln.
weightsListeEine zweidimensionale Liste mit [Höhe] × [Breite]-Werten, die als Gewichte des Kernels verwendet werden sollen.
xGanzzahl, Standard: -1Die Position des Fokus als Versatz vom linken Rand.
yGanzzahl, Standard: -1Die Position des Fokus als Versatz vom oberen Rand.
normalizeBoolescher Wert, Standard: „false“Normalisieren Sie die Kernelwerte so, dass sie sich auf 1 summieren.

Beispiele

Code-Editor (JavaScript)

// Kernel weights.
var weights = [[4, 3, 2, 1, 2, 3, 4],
               [4, 3, 2, 1, 2, 3, 4],
               [4, 3, 2, 1, 2, 3, 4]];

print('A fixed kernel', ee.Kernel.fixed({weights: weights}));

/**
 * Output weights matrix
 *
 * [4, 3, 2, 1, 2, 3, 4]
 * [4, 3, 2, 1, 2, 3, 4]
 * [4, 3, 2, 1, 2, 3, 4]
 */

Python einrichten

Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite Python-Umgebung.

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

weights = [[4, 3, 2, 1, 2, 3, 4],
           [4, 3, 2, 1, 2, 3, 4],
           [4, 3, 2, 1, 2, 3, 4]]

print('A fixed kernel:')
pprint(ee.Kernel.fixed(**{'weights': weights}).getInfo())

#  Output weights matrix

#  [4, 3, 2, 1, 2, 3, 4]
#  [4, 3, 2, 1, 2, 3, 4]
#  [4, 3, 2, 1, 2, 3, 4]