zonal_mask {hemispheR}R Documentation

Divide a raster image into four stacks which are used as masks.

Description

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.

Usage

zonal_mask(img)

Arguments

img

SpatRaster. The input single layer image generated from terra::rast().

Value

A 4-layers stacks of image masks

Examples

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'))


[Package hemispheR version 1.1.4 Index]