# NOT RUN {
##- required packages
require(uavRst)
setwd(tempdir())
data("rgb")
raster::plotRGB(rgb)
fn<-file.path(tempdir(),"rgb.tif")
raster::writeRaster(rgb,
filename=fn,
format="GTiff",
overwrite=TRUE)
##- original color space
raster::plotRGB(raster::stack("rgb.tif"))
##- change colorspace from RGB to HSI
r2 <- colorspace(input="rgb.tif",colorspace="HSI")
##- visualize it
raster::plotRGB(r2)
##+
# }
Run the code above in your browser using DataLab