im_distribute: Shift and scale the distribution of pixel values

View source: R/pictplot.R

im_distributeR Documentation

Shift and scale the distribution of pixel values

Description

Shift and scale the distribution of pixel values

Usage

im_distribute(
  im,
  channel,
  mean = NULL,
  sd = NULL,
  space = "CIELAB",
  clamp = TRUE
)

Arguments

im

an image

channel

color channel

mean

center of distribution. when not given, the mean of that channel is used.

sd

dispersion of distribution. when not given, the sd of that channel is used.

space

color space

clamp

either TRUE (default, output pixel value is clamped to range 0-1) or FALSE

Value

an image

Examples

im_moments(regatta) # before manipulation
im_moments(im_distribute(regatta, "b", mean = 0, sd = 20)) # b channel is adjusted
plot(im_distribute(regatta, "b", mean = 0, sd = 20)) # see the effect
plot(im_distribute(regatta, c("a", "b"), c(-5, 0), c(15, 20))) # adjust two channels simultaneously

tsuda16k/pictplot documentation built on March 1, 2023, 8:44 p.m.