rangeRgb: Calculate the range for each component of an RGB colour

Description Usage Arguments Value Examples

Description

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

Usage

1
rangeRgb(rgbs)

Arguments

rgbs

colorspace library RGB values.

Value

A list with the range for the R, G and B values under those names.

Examples

1
2
3
4
5
6
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)
rgbrange<-rangeRgb(rgbs)

CulturalAnalytics documentation built on May 2, 2019, 5:24 p.m.