Learn R Programming

ripa (version 2.0-2)

rgb2grey: Convert color imagematrix to grey imagematrix

Description

This function convert color imagematrix to grey imagematrix.

Usage

rgb2grey(img, coefs=c(0.30, 0.59, 0.11))

Arguments

img
target image
coefs
coefficients for red plane, green plane, and blue plane.

Value

grey imagematrix

Examples

Run this code
## Not run: 
#   x <- read.jpeg(system.file("extdata", "Rlogo.jpg", package="ripa"))
#   plot(rgb2grey(x))
#   ## End(Not run)

Run the code above in your browser using DataLab