powered by
Extracts a rectangular region of interest (ROI) from a canopy image. This function complements read_caim() and read_caim_raw().
read_caim()
read_caim_raw()
crop_caim(r, upper_left = NULL, width = NULL, height = NULL)
terra::SpatRaster object containing the same layers and values as r but restricted to the selected ROI, preserving all other properties.
r
terra::SpatRaster.
numeric vector of length two. Pixel coordinates of the upper-left corner of the ROI, in the format c(column, row).
c(column, row)
numeric vector of length one. Size (in pixels) of the rectangular ROI to read.
caim <- read_caim() ncell(caim) caim <- crop_caim(caim, c(231,334), 15, 10) ncell(caim)
Run the code above in your browser using DataLab