Learn R Programming

hazer (version 1.1.1)

getBrightness: The brighness map of an image (0 to 1).

Description

The brighness map of an image (0 to 1).

Usage

getBrightness(rgbArray)

Arguments

rgbArray

RGB array (W x H x 3) where the third dimension contains R, G and B channels, values varying from 0 to 1.

Value

a numeric matrix (W x H) giving the brightness for each pixel of the image.

See Also

getDarkness, getContrast and getHazeFactor

Examples

Run this code
# NOT RUN {
library(jpeg)

img <- readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))

b <- getBrightness(img)

par(mfrow=c(2,1), mar = c(0.5, 1, 0.5, 1))

plotRGBArray(img)
plotRGBArray(b)
# }

Run the code above in your browser using DataLab