render_bw {rayimage} | R Documentation |
Render Black and White
Description
Transforms an image to black and white, preserving luminance.
Usage
render_bw(
image,
rgb_coef = c(0.2126, 0.7152, 0.0722),
filename = NULL,
preview = FALSE
)
Arguments
image |
Image filename, 3-layer RGB array, or matrix. |
rgb_coef |
Default |
filename |
Default |
preview |
Default |
Value
3-layer RGB resized array or matrix.
Examples
if(run_documentation()){
#Plot the image with a title
dragon |>
add_title("Dragon", title_offset=c(10,10), title_bar_color="black",
title_size=20, title_color = "white") |>
render_bw(preview = TRUE)
}
[Package rayimage version 0.11.0 Index]