Adjusts image vibrance (adaptive saturation), similar in spirit to the iPhone "Vibrance" control: it boosts muted colors more than already-saturated colors, and reduces saturation more strongly in already-saturated regions when negative. Works on HDR arrays as well (values can exceed 1).
render_vibrance(
image,
vibrance = 0,
protect_luminance = 0.25,
filename = NULL,
preview = FALSE
)Image filename, 3-layer RGB array, 4-layer RGBA array, or matrix. If a filename,
it will be read via ray_read_image().
Default 0. Numeric scalar in -1..1 (values are clamped). Positive values
increase vibrance primarily in low-saturation regions; negative values decrease vibrance primarily
in high-saturation regions.
Default 0.25. Numeric scalar in 0..1. Reduces the vibrance effect
in deep shadows and bright highlights to avoid harsh color shifts. Set to 0 to disable.
Default NULL. If not NULL, the processed image will be written to this file.
Default FALSE. Whether to plot the processed image.
4-layer RGBA array (or matrix if passed a matrix and ray_read_image() is not used).
if(run_documentation()){
dragon |>
render_vibrance(vibrance = 0.4, preview = TRUE)
}