ee.Kernel.fixed

Creates a Kernel.
UsageReturns
ee.Kernel.fixed(width, height, weights, x, y, normalize)Kernel
ArgumentTypeDetails
widthInteger, default: -1The width of the kernel in pixels.
heightInteger, default: -1The height of the kernel in pixels.
weightsListA 2-D list of [height] x [width] values to use as the weights of the kernel.
xInteger, default: -1The location of the focus, as an offset from the left.
yInteger, default: -1The location of the focus, as an offset from the top.
normalizeBoolean, default: falseNormalize the kernel values to sum to 1.

Examples

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]
 */