Matlab - How to mask a 3-D image using a binary image -


i have image red, green, blue channel , binary version of image.

what want concatenate 2 images binary image works mask normal image.

i want select pixels color image 1 in binary.

i know should work cat, or repmat, since i'm pretty new matlab can't figure out how this, after reading docs of functions.

if have 3-d image i , binary mask m, can mask irrelevant bits 0 either multiplying image mask:

i = bsxfun(@times, i, m);     

or logical indexing:

i(~mask(:, :, ones(1, size(i, 3)))) = 0; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -