Returns the attributes of, and optionally plots, an image.
# S3 method for rimg summary(object, plot = FALSE, axes = TRUE, col = NULL, ...)
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 |
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
).
Thomas E. White thomas.white026@gmail.com
# \donttest{ papilio <- getimg(system.file("testdata/images/papilio.png", package = "pavo")) papilio_class <- classify(papilio, kcols = 4)#>#> img_ID col_ID name R G B #> 1 papilio 1 1 0.5314972 0.4704838 0.22256249 #> 2 papilio 2 2 0.9625248 0.8923020 0.48144936 #> 3 papilio 3 3 0.2016155 0.1600663 0.05673045 #> 4 papilio 4 4 0.9993541 0.9992899 0.99896834# Plot the colour-classified image alongside the colour class palette summary(papilio_class, plot = TRUE)#>#>#> Press [enter] for next plot.#> Press [enter] for next plot.# }