zonal_mask | R Documentation |
This function imports a SpatRaster image using terra::rast()
functionality, and divide into four masks, using the image centre and borders as vertices.
The four zonal masks are then returned as a RasterStack.
zonal_mask(img)
img |
SpatRaster. The input single layer image generated from |
A 4-layers stacks of image masks
image<-system.file('extdata/circular_coolpix4500+FC-E8_chestnut.jpg',package='hemispheR')
zmsk<-zonal_mask(terra::rast(image, lyrs=3))
terra::plot(zmsk,col=gray.colors(5),main=c('N','W','S','E'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.