convert plot image into normal imge
1 view (last 30 days)
Show older comments
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.
0 Comments
Answers (2)
Image Analyst
on 9 Oct 2012
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);
0 Comments
Walter Roberson
on 9 Oct 2012
saveas() or print(), or use the File Exchange contribution "export_fig"
0 Comments
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!