img_invert: Invert a greyscale image

View source: R/img_invert.R

img_invertR Documentation

Invert a greyscale image

Description

This is a simple 1-x operation but having it as a function ease its inclusing in within a piped chain of commands

Usage

img_invert(x)

Arguments

x

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

Value

The inverted image, as a imager::cimg() object.

Examples

x <- img_read(system.file("extdata", "blob.jpg", package="morphr"))
img_show(x)
img_show(img_invert(x))

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