A fct function
Different vegetation indices can be used to remove images background. For the list of indices please visit the FIELDimageR manual at link: https://github.com/OpenDroneMap/FIELDimageR#P6
fieldMask(
mosaic,
Red = 1,
Green = 2,
Blue = 3,
RedEdge = NULL,
NIR = NULL,
mask = NULL,
index = "HUE",
myIndex = NULL,
cropValue = 0,
cropAbove = TRUE,
projection = TRUE,
DSMmosaic = NULL,
DSMcropAbove = TRUE,
DSMcropValue = 0,
plot = TRUE
)
object of class stack with at least 3 bands.
respective position of the band at the original image file.
if avaliable the soil will be removed following this mask and not the vegetation index, cropValue and cropAbove must be used.
vector with the vegetation indices to be calculated. For the list of indices please visit the FIELDimageR manual at link:
user can calculate a diferent index using the bands names, e.g. "(Green+Blue)/Red-NIR/RedEdge"
referent value of soil in the image.
if TRUE all values above the cropValue will be accounted to make the mask.
if TRUE the projection will not be accounted to the mask.
DSM should be used if the file of height is provided.
if is TRUE the original and crop image will be plotted.
The return value, if any, from executing the function.
A list with elements:
The function returns a image format stack with the original bands (layers) without the background and mask with logical values of 0 and 1 for vegetation or soil.
fieldMask