How to save all the figures with the result of image processing
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
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!