rasterLocalCategoricalModes finds the most popular category within the
weighted neighborhood of
An in memory raster image. Pixels should be whole numbers or
A matrix of weights. The modal kernel will be applied to each
A spatial neighborhood is calculated for each pixel in
The spatial neighborhood for each pixel is defined by the weight matrix
W, where the center of the odd dimensioned matrix
W is identified
with the target pixel. The target pixel value is replaced with the most
popular value within the neighborhood weighted by
W. Ties are
handled by randomly by uniformly selecting a category amongst the tied
categories. Only non-missing or neighbors with non-zero weights are used
in the calculation.
An in memory raster image by most popular categories.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.