Input image. Should have 3 channels, represented as R, G and B respectively in that order.
Pre-allocated buffer, where grayscale image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1]), it is discarded and allocated anew.
Convertion strategy - mean, or luminance preservation.
Returns grayscale version of the given RGB image, of the same size.
Note: Input and pre-allocated slices' strides must be identical.
Convert RGB image to grayscale.