pavo (version 2.5.0)

plot.rimg: Plot unprocessed or colour-classified images

Description

Plot unprocessed or colour-classified image data. If the images are in a list, they will be stepped through one by one.

Usage

# S3 method for rimg
plot(x, axes = TRUE, col = NULL, ...)

Arguments

x

(required) an image of class rimg, or list thereof.

axes

should axes be drawn? (defaults to TRUE)

col

optional vector of colours when plotting colour-classified images. Defaults to the mean RGB values of the k-means centres (i.e. the average 'original' colours).

...

additional graphical parameters. Also see par().

Value

an image plot.

Examples

Run this code
# NOT RUN {
papilio <- getimg(system.file("testdata/images/papilio.png", package = "pavo"))
plot(papilio)
# }
# NOT RUN {
papilio_class <- classify(papilio, kcols = 4)
plot(papilio_class)
# }
# NOT RUN {
# Multiple images
snakes <- getimg(system.file("testdata/images/snakes", package = "pavo"))
plot(snakes)
# }
# NOT RUN {
snakes_class <- classify(snakes, kcols = 3)
plot(snakes_class)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab