convert an RGB image to Gray
rgb_2gray(RGB_image)
a 3-dimensional array where the third dimension is equal to 3
a matrix
This function converts an RGB image to gray
path = system.file("tmp_images", "1.png", package = "OpenImageR")
image = readImage(path)
gray = rgb_2gray(image)