Input image. Should have 3 channels, represented as B, G and R respectively in that order.
Pre-allocated range, 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 BGR image, of the same size.
Note: Input and pre-allocated slices' strides must be identical.
Convert BGR image to grayscale.
Same as rgb2gray, but follows swapped channels if luminance preservation is chosen as convertion strategy.