img_guess_background: Guess the background colour of an image

View source: R/img_guess_background.R

img_guess_backgroundR Documentation

Guess the background colour of an image

Description

Guess the background colour as the dominant colour at the border of the image.

Usage

img_guess_background(x)

Arguments

x

an image, of type imager::cimg().

Examples

x <- img_read(system.file("extdata", "blob.jpg", package="morphr")) %>% img_show()
img_guess_background(x)
x <- img_read(system.file("extdata", "shape.png", package="morphr")) %>% img_show()
img_guess_background(x)

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.