Description Usage Arguments Value Author(s) Examples
meanrgb
returns the mean RGB values for the imageMatrix object.
meanHSV
returns the mean HSV values for the imageMatrix object.
1 2 |
imageMatrix |
an imageMatrix object |
A list with three elements corresponding to the HSV or RGB measures in the imageMatrix.
Solomon Messing <[last-name] at stanford dot edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.