How to work on the white region of this binary mask?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Samar Ragab
el 26 de Ag. de 2018
Comentada: Afaf Saad
el 10 de Sept. de 2018
I have a mammogram database and I want to apply some features on the white region.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194415/image.jpeg)
1 comentario
Respuesta aceptada
Image Analyst
el 26 de Ag. de 2018
One easy way is to just process the whole image and then erase the resulting image outside the mask
outputImage = some algorithm using the entire image....
maskedOutputImage = outputImage; % Initialize
maskedOutputImage(~mask) = 0; % Set to zero outside the mask.
0 comentarios
Más respuestas (1)
KALYAN ACHARJYA
el 26 de Ag. de 2018
Editada: KALYAN ACHARJYA
el 26 de Ag. de 2018
Yes You can do that easily, Considering binary_image.jpg as a binary image
BW1=binary_image;
binary_image(BW1==1)=your do operation statement or values here:
1 comentario
Image Analyst
el 26 de Ag. de 2018
Editada: Image Analyst
el 26 de Ag. de 2018
I think you meant binary_image(BW1 == 1). But be aware that binary_image(BW1=1) is a 1-D vector, not a 2-D image so your algorithm would have to account for that.
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!