I have loaded image as a numpy array using pillow and the dimensions of the resulting numpy array is (184, 184, 4), i.e it's a 184x184 pixel image with each pixel having RGBA dimensions.
For all practical purposes my application just needs to know if a pixel is black or not and hence I just need a 184x184 np array with 0, 1's.
I am new to numpy and particularly image manipulation, wanted to know if there is a faster method to do it.
I tried the naive implementation of checking each pixel in a loop, which appears to be too costly.