plotImage: Display an image in a plot window

View source: R/01_raw_image_handling.R

plotImageR Documentation

Display an image in a plot window

Description

Plots an image as an image.

Usage

plotImage(img)

Arguments

img

Either a path to an image or a loadImage object.

Details

Redundant, but a nice sanity check. Used in a few other functions in colordistance package. Takes either a path to an image (RGB or PNG) or an image object as read in by loadImage.

Value

A plot of the provided image in the current plot window.

Examples

colordistance::plotImage(system.file("extdata",
"Heliconius/Heliconius_A/Heliconius_01.jpeg", package="colordistance"))
colordistance::plotImage(loadImage(system.file("extdata",
"Heliconius/Heliconius_A/Heliconius_01.jpeg", package="colordistance"),
lower=rep(0.8, 3), upper=rep(1, 3)))

hiweller/colordistance documentation built on Feb. 1, 2024, 7:49 p.m.