img_adjust_gamma: Perform gamma correction

View source: R/img_adjust_gamma.R

img_adjust_gammaR Documentation

Perform gamma correction

Description

Transorm the input image according to the equation x^gamma.

Usage

img_adjust_gamma(x, gamma = 1)

Arguments

x

an image, of type imager::cimg().

gamma

gamma value, in [0,+Inf[ where 1 means no change, <1 make the image lighter, >1 makes the image darker.

Examples

x <- img_read(system.file("extdata", "amphipoda/33463695.jpg",
             package="morphr")) %>% img_show()
img_adjust_gamma(x, 0.2) %>% img_show()
img_adjust_gamma(x, 2) %>% img_show()

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.