Converts boolean or float type numpy arrays to 8bit and scales the data to span from 0 to 255. Used for many OpenCV functions.
arr (ndarray) – The input array
ndarray
The output array of dtype numpy.uint8