pwspy.utility.machineVision.to8bit

pwspy.utility.machineVision.to8bit(arr)[source]

Converts boolean or float type numpy arrays to 8bit and scales the data to span from 0 to 255. Used for many OpenCV functions.

Parameters

arr (ndarray) – The input array

Return type

ndarray

Returns

The output array of dtype numpy.uint8