convert plot image into normal imge

1 vue (au cours des 30 derniers jours)
senthil kumar
senthil kumar le 9 Oct 2012
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.

Réponses (2)

Image Analyst
Image Analyst le 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);

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

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by