View source: R/tree_detection.R
raster2Cimg | R Documentation |
converts a SpatRaster object to cimg object. NA values in raster are replaced.
raster2Cimg(r, NA_replace = 0, maxpixels = 1e+10)
r |
SpatRaster object. raster of canopy height model, preferably filtered to avoid effect of holes on volume and surface computation |
NA_replace |
numeric. value to replace NA values with. |
maxpixels |
numeric. maximum number of pixels to be converted to cimg
(argument passed to |
A cimg object
cimg2Raster
data(chm_chablais3)
chm_chablais3 <- terra::rast(chm_chablais3)
chm_cim <- raster2Cimg(chm_chablais3)
chm_cim
summary(chm_cim)
# plot SpatRaster
terra::plot(chm_chablais3)
# plot cimg object
plot(chm_cim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.