How to mask a binary image with a mask?

1 visualización (últimos 30 días)
Biza Ferreira
Biza Ferreira el 28 de Jun. de 2015
Respondida: Image Analyst el 28 de Jun. de 2015
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?

Respuestas (1)

Image Analyst
Image Analyst el 28 de Jun. de 2015
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.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by