summary.rimg {pavo} | R Documentation |
Image summary
Description
Returns the attributes of, and optionally plots, an image.
Usage
## S3 method for class 'rimg'
summary(object, plot = FALSE, axes = TRUE, col = NULL, ...)
Arguments
object |
(required) an image of class |
plot |
logical; plot the image and, if the image is color-classified, the colours
corresponding to colour class categories side-by-side? Defaults to |
axes |
should axes be drawn when |
col |
optional vector of colours when plotting colour-classified images with |
... |
additional graphical options when |
Value
Either the RGB values of the k-means centres from the colour-classified image,
or a plot of both the image and specified colours (when plot = TRUE
).
Author(s)
Thomas E. White thomas.white026@gmail.com
Examples
papilio <- getimg(system.file("testdata/images/butterflies/papilio.png", package = "pavo"))
papilio_class <- classify(papilio, kcols = 4)
summary(papilio_class)
# Plot the colour-classified image alongside the colour class palette
summary(papilio_class, plot = TRUE)
# Multiple images
snakes <- getimg(system.file("testdata/images/snakes", package = "pavo"))
snakes_class <- classify(snakes, kcols = 3)
summary(snakes_class, plot = TRUE)
[Package pavo version 2.9.0 Index]