Description Usage Arguments Value Examples
Calculate the median values for the HSV coordinates of the image. The colour returned is not necessarily a colour in the image, it just contains the median values.
1 | medianHsv(hsvs)
|
hsvs |
colorspace library HSV values. |
A colorspace library HSV object representing the median HSV colour of the image. This may not match a colour actually in the image.
1 2 3 4 5 6 7 8 | library(CulturalAnalytics)
library(jpeg)
imgdir<-paste(system.file(package = "CulturalAnalytics"), "images", sep = "/")
imgs<-paste(imgdir, dir(path = imgdir, pattern = ".jpg"), sep = "/")
img<-readJPEG(imgs[1])
rgbs<-imageToRgb(img)
hsvs<-rgbToHsv(rgbs)
hsvMed<-medianHsv(hsvs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.