How to convert an RGB image to Boolean array?
Hello,
I'm totally new to OpenCV and NumPy. When I load an image using cv2.imread
, I get a NumPy array with RGBs inside, so every pixel is described as [B G R]. I want to convert this array to boolean one, where every pixel is either black (0) or white (1).
Are there any built-in OpenCV functions for this task?