image_modify_rgb_v {plothelper} | R Documentation |
Modify R, G, B Values according to V values
Description
While the image_modify_rgb
function modifies R, G, B with reference to
the original values,
image_modify_rgb_v
also takes into
account the brightness (V) values. It is similar
to those apps which divide an image into
a bright part and a dark part (and, for
example, you can increase red in the
bright part and decrease red in the
dark part.
Usage
image_modify_rgb_v(
x,
fun_r = NULL,
fun_g = NULL,
fun_b = NULL,
alpha = FALSE,
rescale_v = NULL,
result = "magick",
res = 144
)
Arguments
x |
an image created
by |
fun_r , fun_g , fun_b |
a function or a list which
designates an internal curve. See the Details part of
|
alpha |
whether to allow the output colors have transparency. Default is FALSE. |
rescale_v |
You can rescale the V values before
modifying colors. A desired range of V values can
be given,
e. g., |
result |
the default is "magick", the output is
a magick picture. When it is "raster", a matrix is created
which can be use as a raster
for |
res |
when the result is a magick picture, the
|
Details
This function uses custom functions
or internal curves to
make modification. See the Details part
of image_modify_hsv
to
know how to use them. Note: values will
be coerced to be in the [0, 255] range with
no warning. For example, the original value
is 240 and it becomes 280 in the output, then
it will be set to 255 automatically.