Rescaling a raster changes the raster's resolution.
The factor is a value by which the number of cells in x and y
dimension will be multiplied. If the raster should be up-scaled
factor > 1), only integer values are allowed (will be truncated if
it is not an integer). If the raster should be down-scaled (
1) any inverse of an integer value (1/n) is allowed (denominator will be
rounded to the next integer, such as 1/2 or 1/5).
kernelFunction used here deviates from the other
(morpholological) kernels in that it is a function, which interpolates the
values of new cells. See
kernelFunction for an
RasterLayer with a dimension that has been up or down-scaled
obj, where the new values have been determined by applying
1 2 3 4 5 6 7 8 9 10
input <- rtRasters$continuous visualise(input) visualise(rRescale(input, factor = 0.5)) # up-scaling can be useful for follow-up morphological operations binarised <- rBinarise(input, thresh = 30) visualise(rSkeletonise(binarised)) rescaled <- rRescale(binarised, factor = 2) visualise(rSkeletonise(rescaled), new = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.