Convert RGB image to Luminance. Reduces the three R, G and B matrices to a one dimensional matrix for weighted intensities

rgb2luminance(img)

Arguments

img

RGB image; class: [array]; dim: [nrow, ncol, 3]

Value

gray: grayscale image; class: [matrix]; dim: [nrow, ncol, 1]