Learn R Programming

ripa (version 2.0-1)

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
x <- read.jpeg(system.file("extdata", "Rlogo.jpg", package="ripa"))
  plot(rgb2grey(x))

Run the code above in your browser using DataLab