How write this image with plotted boundary in a folder
조회 수: 3 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Image Analyst
2015년 7월 1일
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);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!