Reputation: 1332
For example I have a image of a cat, and second image with a mask of cat. And I want to add transparent red mask for pixels of a cat in first image. Both images are numpy arrays...So how to do it?
Upvotes: 0
Views: 1419
Reputation: 221504
IIUC you could do something like this -
img[:,:,2] = np.where(mask,255,img[:,:,2])
Results -
Upvotes: 2