Learn R Programming

colordistance (version 1.1.2)

plotImage: 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.

Value

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

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.

Examples

Run this code
# NOT RUN {
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)))
# }

Run the code above in your browser using DataLab