Learn R Programming

Rvision (version 0.4.3)

LUT: Look-up Table Transform

Description

LUT performs a look-up table transform of an Image object.

Usage

LUT(image, lut, in_place = FALSE)

Arguments

image

An Image object.

lut

A look-up table. This should be a vector with 256 elements, or a 256 x n table, with n corresponding to the number of channels in image. If lut is a vector and image has more than one channel, then lut is recycled for each channel.

in_place

A logical indicating whether the change should be applied to the image itself (TRUE, faster but destructive) or to a copy of it (FALSE, the default, slower but non destructive).

Value

An Image object if in_place=FALSE. Otherwise, it returns nothing and modifies image in place.

See Also

Image, histmatch

Examples

Run this code
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
high_contrast_lut <- 255 * pbeta(0:255 / 255, 4, 4)
high_contrast_balloon <- LUT(balloon, high_contrast_lut)
plot(high_contrast_balloon)

# }

Run the code above in your browser using DataLab