uavRst (version 0.5-2)

colorspace: imagemagick based function to transform the RGB color space into another

Description

Imagemagick is used for the calculation of the transformations. Please provide a tif file

Usage

colorspace(input = NULL, colorspace = c("CIELab", "CMY", "Gray", "HCL",
  "HSB", "HSI", "Log", "XYZ", "YUV"), compress = "None", depth = 8,
  verbose = FALSE, retRaster = TRUE)

Arguments

input

character. name of a (Geo)Tiff containing RGB data channels

colorspace

character. For a list of argument to determine colorspace see colorspace manual

compress

character. compression type depending on the imagemagick version the choices are: None, BZip, Fax, Group4, JPEG, JPEG2000, Lossless, LZW, RLE or Zip.

depth

numeric. color space depth in bit default is 8

verbose

be quiet

retRaster

logical if true a rasterstack is returned

Examples

Run this code
# NOT RUN {
##- required packages
require(uavRst)
setwd(tempdir())
##- set locale
tmp<-Sys.setlocale('LC_ALL','C')
##- get some typical data as provided by the authority
utils::download.file(url="http://www.ldbv.bayern.de/file/zip/5619/DOP%2040_CIR.zip",
                     destfile="testdata.zip")
unzip("testdata.zip",junkpaths = TRUE,overwrite = TRUE)
##- original color space
raster::plotRGB(raster::stack("4490600_5321400.tif"))
##- change colorspace from RGB to HSI
r2 <- colorspace(input="4490600_5321400.tif",colorspace="HSI")

##- visualize it
raster::plotRGB(r2)

##- reset locale
tmp<-Sys.setlocale(category = "LC_ALL", locale = "de_DE.-8")
##+
# }

Run the code above in your browser using DataLab