medianHsv: Calculate the median HSV colour of an image.

Description Usage Arguments Value Examples

Description

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.

Usage

1
medianHsv(hsvs)

Arguments

hsvs

colorspace library HSV values.

Value

A colorspace library HSV object representing the median HSV colour of the image. This may not match a colour actually in the image.

Examples

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)


Search within the CulturalAnalytics package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.