R/ColorConv.R
ColorConv.Rd
This function converts an image to one of the color : gray, red, green, blue
ColorConv(img, color)
path of the input image from package jpeg's function readJPEG().
desired color to convert: gray, red, green, blue
The converted image
img <- array(runif(1000),dim=c(10,10,3)) ColorConv(img, color = 'gray') #> [1] 0.5150383