I have a problem I don't know how to resolve in Matlab. Basically. I have an image array hw x 3 and a seperate binary array that defines the background foreground. What I want to do, is split the image into two parts - corresponding to the mask.
Thanks in advance for the help!
The mask is the same for all thre channels, thus simply copy it.
Maybe foreground and background is switch, but I think you will get it.
A bit shorter, using multiplication instead of logical indexing: