Move image colors to gray

nr_desaturate(nr, factor = 1)

Arguments

nr

native raster image

factor

desaturation factor. Default: 1 (fully desaturate)

Value

Invisibly return the supplied native raster image which was been modified in-place

See also

Other color manipulation functions: nr_color_replace(), nr_dither(), nr_threshold()

Examples

nr <- nr_copy(deer[[1]])
plot(nr)

nr_desaturate(nr)

plot(nr)