reducolor: Reduce image color to either 2 or 8 colors for cartoonized...

Description Usage Arguments Value Examples

View source: R/reducolor.R

Description

Reduce image color to either 2 or 8 colors for cartoonized effect

Usage

1
reducolor(input_path, style, output_path = NULL)

Arguments

input_path

character the image file path

style

string vector selected two colors from c("white", "black", "red", "green", "blue", "yellow", "pink", "aqua" ) or "eight" for eight colors

output_path

character if not Null, the modified image will be saved in the provided folder path and name

Value

modified image array

Examples

1
2
3
input_path <- system.file("tmp_image", "mandrill.jpg", package = "rimager")
new <- reducolor(input_path, c("black", "white"), "new.jpg")
OpenImageR::imageShow(new)

UBC-MDS/rimager documentation built on April 1, 2020, 4:36 a.m.