Learn R Programming

wvtool (version 1.0)

rgb2gray: Convert RGB image to Grayscale

Description

A function returns grayscale image with coefficients = c(0.3, 0.59, 0.11).

Usage

rgb2gray(x, coefs=c(0.30, 0.59, 0.11))

Arguments

x
A raster image or a matrix
coefs
R, G, B weights. Default are coefs=c(0.30, 0.59, 0.11)

Value

See Also

gray2bin