how to save the filled region to as an image
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
structBoundaries = bwboundaries(binaryImage);
xy = structBoundaries{i};
fill(xy(:,2),xy(:,1),'w');
how to save the filled region to as an image? when i do
im = fill(xy(:,2),xy(:,1),'w');
% im is a patch object
i want "im" as a double datatype or image datatype
i even used poly2mask, but only one region comes at a time, i need 2 regions out of 5 regions from structBoundaries to come in the mask
0 comentarios
Respuesta aceptada
Rik
el 2 de Feb. de 2018
Editada: Rik
el 2 de Feb. de 2018
You can create a binary mask in your desired resolution with this FEX submission. You can then use that mask to set the pixels in any color you like.
Edit:
If you have binary masks for one region at a time with poly2mask, you can just use the binary OR ('|') to merge multiple masks.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!