meanhsv {ImageMetrics}
Compute mean HSV and RGB of image/object
Description
meanrgb returns the mean RGB values for the imageMatrix object. meanHSV returns the mean HSV values for the imageMatrix object.
Usage
meanrgb(imageMatrix) meanhsv(imageMatrix)
Arguments
- imageMatrix
- an imageMatrix object
Values
A list with three elements corresponding to the HSV or RGB measures in the imageMatrix.
Examples
## Compare brightness of video still capture from MSNBC footage of Obama, with still capture from ## an ad featuring the same footage (only Obama appears darker) that appeared in an ad on the Clinton ## campaign website, causing a stir in the blogosphere. data(Campaign2008) clinton = new("imageMatrix", X = readPNG(system.file("extdata", "Clinton.png", package="ImageMetrics")), type = "rgba") clintonface = new("imageMatrix", X = ObjSelect( image = clinton@X, poly= clintonpoly ), type = "rgb") msnbc = new("imageMatrix", X = readPNG(system.file("extdata", "MSNBC.png", package="ImageMetrics")), type = "rgba") msnbcface = new("imageMatrix", X = ObjSelect( image = msnbc@X, poly= msnbcpoly ), type = "rgb") ## Not run: plot(clinton) plot(clintonface) plot(msnbc) plot(msnbcface) ## End(Not run) meanhsv(clintonface) meanhsv(msnbcface)
Documentation reproduced from package ImageMetrics, version 0.6. License: BSD
