Borrar filtros
Borrar filtros

How write this image with plotted boundary in a folder

1 visualización (últimos 30 días)
Poonam
Poonam el 1 de Jul. de 2015
Respondida: Image Analyst el 1 de Jul. de 2015
figure;imshow(Img);
title('Hill Climbing Segmentation');
axis image; % Make sure image is not artificially stretched because of screen's aspect ratio.
hold on;
boundaries = bwboundaries(bw);
numberOfBoundaries = size(boundaries, 1);
for k = 1 : numberOfBoundaries
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'g', 'LineWidth', 2);
end
hold off;
have got this image want to write this image in directory with its boundary how to write,have used imwrite() in for loop but it write only image not image with boundary is not present

Respuestas (1)

Image Analyst
Image Analyst el 1 de Jul. de 2015
You can use getimage() though it will just get a 24 bit RGB image of what's in the axes, so the graphics won't be burned in at the full image resolution. Though maybe that will be good enough for your needs. Then just call imwrite to write the image to disk:
displayedImage = getimage();
imwrite(displayedImage, fullFileName);

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by