I have a black and white drawing that was drawn online, so the pixels are only solid black or solid white. The drawing is a png, which I am analyzing in python.
im = Image.open(os.path.join(dir))
im = img_as_float(im)
plt.imshow(im)
Does anyone have advice on how to count the number of black pixels in a png?