rgbImageHist: Calculate a colour histogram for an RGB image data.frame

Description Usage Arguments Value References Examples

Description

This function calculates a colour histogram from a data.frame representing the pixels of an image as generated by imageToDataFrame .

Usage

1
rgbImageHist(rgbDataFrame, binResolution=25)

Arguments

rgbDataFrame

A data.frame representing the pixels of an image as generated by imageToDataFrame .

binResolution

How many sections to divide each dimension of colour space into.

Value

A colour histogram.

References

See: http://cns.bu.edu/~gsc/ColorHistograms.html

Examples

1
2
3
4
5
6
7
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])
rgbdf<-imageToDataFrame(img)
rgbhist<-rgbImageHist(rgbdf)


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.