colorspace | R Documentation |
Color space conversion functions for RGB, YUV, YIQ, XYZ, and HSI.
rgb2grey(obj, compress=TRUE)
rgb2hsi(obj)
hsi2rgb(obj, cspace = "Adobe", compress=TRUE)
rgb2yuv(obj)
yuv2rgb(obj, cspace = "Adobe", compress=TRUE)
rgb2yiq(obj)
yiq2rgb(obj, cspace = "Adobe", compress=TRUE)
rgb2xyz(obj)
xyz2rgb(obj, cspace = "Adobe", black= 0, exposure=1, compress=TRUE)
obj |
an object of class "adimpro", |
cspace |
Target color space, one of |
exposure |
Multiplicative factor for all color channels (in xyz or rgb spaces). Applied in linear color space, i.e. if the image is gamma corrected the gamma correction is reversed first. |
black |
Adjustment for black color. Color values with luminance <= black will be assigned to black in RGB. |
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.
Conversion to XYZ
, YIQ
, YUV
and HSI
involves an inverse gamma correction if required.
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 and Joerg Polzehl polzehl@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).
## Not run: demo(color)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.