Most efficient way to mask an opencv bgr with a boolean array
Answer is
img[~mask,:] = [0,0,0]
That ,: takes care of the other dimension so you don't get mismatch issues.
I have an image loaded with opencv with img.shape = (208, 117, 3). I also have a boolean numpy array with mask.shape = (208, 117). How to I make all pixels in the img (0,0,0) wherever the mask has False, otherwise leave the pixels as they are?