im_distribute: Apply shift and rescale to the distribution of pixel values

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Apply shift and rescale to the distribution of pixel values

Usage

1
2
3
4
5
6
7
8
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

1
2
3
4
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/noesis documentation built on Nov. 25, 2020, 10:16 a.m.