| colorspace {adimpro} | R Documentation |
Color space conversion functions for RGB, YUV, YIQ, XYZ, and HSI.
rgb2grey(obj, compress=TRUE) rgb2hsi(obj) hsi2rgb(obj, compress=TRUE) rgb2yuv(obj) yuv2rgb(obj, compress=TRUE) rgb2yiq(obj) yiq2rgb(obj, compress=TRUE) rgb2xyz(obj) xyz2rgb(obj, compress=TRUE)
obj |
an object of class "adimpro", obj$type should coincide with
the first three letters of the function name, that is obj$img containes
color values in the corresponding color space. |
compress |
logical, determines if image data are returned in raw-format. |
The functions convert an image obj from one color space into
another.
rgb2grey converts from RGB to GREYSCALE.
rgb2hsi and hsi2rgb convert from RGB to HSI and vice
versa.
rgb2yuv and yuv2rgb convert from RGB to YUV and vice
versa.
rgb2yiq and yiq2rgb convert from RGB to YIQ and vice
versa.
rgb2xyz and xyz2rgb convert from RGB to CIE XYZ and vice
versa.
an object of class "adimpro", with value$type specifying the color space
(last three letters of the function name or 'greyscale' for rgb2grey)
and value$img containing the color values.
Karsten Tabelow tabelow@wias-berlin.de
Gonzalez, R.C., and Woods, R.E. (2002). Digital Image Processing. Prentice Hall.
Polzehl, J., and Tabelow, K. (2007). Adaptive smoothing of digital images, Journal of Statistical Software 19 (1).
img <- read.image(system.file("img/wias.ppm",package="adimpro"))
img.hsi <- rgb2hsi(img)
plot(img.hsi)