adjust.image | R Documentation |
Color space transformations, change of white balance and exposure, gamma correction and histogram equalization.
adjust.image(img, gammatype=NULL, cspace = NULL, whitep = NULL,
temp = NULL, black=0, exposure = 1, kind = "Bradford",
alg = 1, compress= TRUE)
img |
image object, class"adimpro". |
gammatype |
character, determines the type of gamma correction within the image.
"ITU" stands for ITU-R BT.709-3 as e.g. used by |
cspace |
defines the output color space, default "sRGB" (sRGB D65), alternatives are
"Adobe" (Adobe 1998 D65), "wGamut" (Wide Gamut D65), "kodak" (Kodak ProPhoto D65)
"xyz", "yuv", "yiq" and "hsi". |
whitep |
White point in |
temp |
Color temperature. Can be used to specify chromatic |
black |
Adjustment for black color. Color values with luminance <= black will be assigned to black in RGB. Adjustment ist done in xyY space. |
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. |
kind |
Algorithm for chromatic adaptation. Alternatives are |
alg |
determines the approximation for the gamma correction. Select 1 for fastest computation and 3 for maximum accuracy, or 2 for a compromise. |
compress |
logical, determines if image data are stored in raw-format. |
This function adjusts color channels and applies gamma correction (if applicable).
If color.par$red
or color.par$blue
or color.par$brightness
differ from 1.0 the
corresponding channels are multiplied with the provided
values. Saturated values are set to 1.
If img$gamma==FALSE
, perform gamma correction with
color.par$ga
and color.par$bp
. alg
chooses between three different
computing algorithms (approximations) with increasing computation time
and precision (alg
is 1,2, or 3).
Adjusted image object of class "adimpro".
Karsten Tabelow tabelow@wias-berlin.de and Joerg Polzehl polzehl@wias-berlin.de
show.image
, write.image
## Not run: demo(color)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.