How to mask a binary image with a mask?

조회 수: 1 (최근 30일)
Biza Ferreira
Biza Ferreira 2015년 6월 28일
답변: Image Analyst 2015년 6월 28일
Friends I have a small problem with a image and a mask , I need to make a mask in a binary image how can do this?

답변 (1개)

Image Analyst
Image Analyst 2015년 6월 28일
Pass your mask into your binary image. If you want to blacken outside the mask, one way to do it is:
binaryImage(~mask) = false;
Another way is
binaryImage = binaryImage & mask;
If you don't know how to create a mask, you can use thresholding, or draw by hand like in my attached demos.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by