svhist: Histogram showing HSV and RGB for image/object

Description Usage Arguments Value Author(s) Examples

Description

svhist plots the density of the color saturation and value (brightness) for the imageMatrix object. huehist plots the density of the hue for the imageMatrix object. rgbhist plots the density of red, green, and blue channels for the imageMatrix object.

Usage

1
2
3
svhist(imageMatrix, ...)
huehist(imageMatrix, ...)
rgbhist(imageMatrix, ...)

Arguments

imageMatrix

an imageMatrix object

...

extra parameters, e.g., to be passed to plot

Value

Plots the density of the image features corresponding to the function specified.

Author(s)

Solomon Messing <[last-name] at stanford dot edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 

## 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("data", "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("data", "MSNBC.png", package="ImageMetrics")), type = "rgba")
msnbcface = new("imageMatrix", X = ObjSelect( image = msnbc@X, poly= msnbcpoly ), type = "rgb")

svhist(clintonface, main="Clinton")
svhist(msnbcface, main="MSNBC")

## End(Not run)

SolomonMg/ImageMetrics documentation built on May 27, 2019, 7:39 a.m.