adjust.image {adimpro}R Documentation

Image Processing

Description

Adjust color channels and apply gamma correction (if applicable).

Usage

adjust.image(img, color.par = NULL, alg = 1, compress= TRUE)

Arguments

img image object, class"adimpro".
color.par list of parameters for the gamma correction and some white balance. list entries:
ga gamma value default 2.4
bp break point default 0.00304
alg algorithm for gamma correction default 1
red factor for red channel. default 1.0
blue factor for blue channel. default 1.0
brightness factor for all channels default 1.0
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.

Details

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).

Value

Adjusted image object of class "adimpro".

Author(s)

Karsten Tabelow tabelow@wias-berlin.de

See Also

show.image, write.image

Examples

img <- read.image(system.file("img/wias.ppm",package="adimpro"))
img2 <- adjust.image(img,color.par=list(red=1.5,blue=2))
show.image(img2)

[Package adimpro version 0.4.4 Index]