rgb2grey {rimage}R Documentation

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

  x <- read.jpeg(system.file("data", "cat.jpg", package="rimage"))
  plot(rgb2grey(x))

[Package rimage version 0.5-7 Index]