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

后端 未结 3 1818
感动是毒
感动是毒 2020-12-20 06:21

I have an image with red, green, blue channel and a binary version of the image.

What I want to do is concatenate those 2 images so that the binary image works as th

3条回答
  •  囚心锁ツ
    2020-12-20 06:55

    You can use the binary image as a logical index in the 3dim image. To zero all pixels in image that are zero in the binary mask, you can use the following code for each dimension: image(~mask)=0;

提交回复
热议问题