How to save all the figures with the result of image processing

1 回表示 (過去 30 日間)
Valeska Pearson
Valeska Pearson 2013 年 9 月 11 日
Hi, I have a question regarding working with a lot of results from image processing.
All of the feature extraction results are stored as output to a .csv file in a for loop. But I need some help to have the function that was called to store the last figure each time it finished my image processing. Because the for loop can go up to about 89 images, it is very time consuming and after my segmentation algorithms etc are performed, I have the feature extraction stored as data in .csv file for SVM, but I don't know how to obtain the info of the image and how to save the image each time without manually clicking on figures. How can I store the result binary image in a file for each iteration?
the for loop and function calc_exudate is here and my approach to store each image. FeatureExtraction is a binary image that I want to save.
for k=1:size(Items,1)
[FinalA,ASquare,n, FeatureExtraction] = Calc_Exudate(Images{Items(k)});
fnames={Images{Items(k)}}
name=char(fnames);
caption = sprintf('Working on %s\nImage',name);
title(caption);
ext = '.jpg';
path = 'C:/Users/nvg/Desktop/Hoofstuk 3/Matlab/Support Vector Machine/Calc_exudate Results/';
file_name = 'caption ';
imwrite(FeatureExtraction, [path, file_name, ext]);
severity_ratio=sum(FinalA)./ASquare;
total_area=sum(FinalA);
DataMat(k,:) = [n, ASquare,severity_ratio, Classify(k)];
%append A n to xls or csv
dlmwrite('toetsdata2.csv',[n ASquare total_area severity_ratio
Classify(k)],'delimiter','\t','-append');
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeDisplay Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by