rangeHsv: Calculate the range for each component of an HSV colour

Description Usage Arguments Value Examples

View source: R/cultural-analytics.r

Description

This function calculates the ranges for the components of an HSV colorspace library objects and returns them as named values in a list.

Usage

1
rangeHsv(hsvs)

Arguments

hsvs

colorspace library HSV values.

Value

A list with the range for the H, S and V values under those names.

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)
hsvrange<-rangeHsv(hsvs)

CulturalAnalytics documentation built on May 31, 2017, 3:28 a.m.