I am trying to replace objects which I found using a mask with the original images pixels. I have a mask that shows black where the object is not detected and white if detected. I am then using the image in a where statement
image[np.where((image2 == [255,255,255].any(axis = 2))
I am stuck here and I have no idea how to change found white values to what the original image is (to use alongside other masks). I have tried image.shape
and this did not work.
Thanks.