convert plot image into normal imge

1 visualizzazione (ultimi 30 giorni)
senthil kumar
senthil kumar il 9 Ott 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.

Risposte (2)

Image Analyst
Image Analyst il 9 Ott 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 il 9 Ott 2012
saveas() or print(), or use the File Exchange contribution "export_fig"

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by