Is there a better way to apply a binary mask to colour channels in numpy? I end up having to do this all the time and it feels like there should be.
for c in range(3):
a_image[mask, c] = b_image[mask, c]
shapes are (x, y, c)
for a_image
and b_image
, and (x, y)
for mask
.