convert plot image into normal imge

1 次查看(过去 30 天)
clc;
clear;
close all;
i1=imread('76.jpg');
i1=rgb2gray(i1);
i2=im2bw(i1,.4);
i2= wiener2(i2,[5 5]);
i2=imfill(i2,'holes');
%i2=~i2;
B = bwboundaries(i2);
e=length(B);
labeledImage = bwlabel(i2, 8);
blobMeasurements = regionprops(labeledImage, i1, 'all');
[C,hC]=contour(i2);
imshow(i2)
hold on
for k = 1:e
boundary = B{k};
figure, c=plot(boundary(:,2), boundary(:,1), 'g', 'LineWidth', 0.2);
thisBlobsBoundingBox = blobMeasurements(k).BoundingBox;
figure,subImage = imcrop(i1, thisBlobsBoundingBox);
imshow(subImage);
end
hold off;
i want convert plot point (c) to image please help me.

回答(2 个)

Image Analyst
Image Analyst 2012-10-9
What kind of image do you want? You can't make a grayscale image from the blob boundary coordinates. You can get a binary image of the outlines though:
perimeterImage = bwperim(i2);

Walter Roberson
Walter Roberson 2012-10-9
saveas() or print(), or use the File Exchange contribution "export_fig"

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by