I am creating the data base for the Microscopic cell 400 images that extracts the alive and dead cells by calling gerect func. I need to save the result in the .mat files starting with image name.I am using 'try' and 'catch' to generate the database. my code as follows:
[fname path]=uigetfile('.jpg','open a cell pic');fname=strcat(path,fname);a=imread(fname);im=rgb2gray(a);imshow(im);title('input image');while(1) rect=datapoints(im); % calling getrect function to extract points
%c=input('enter the label: \n');
try load data trainSets=[rect c]; data=[data; trainSets]; save data.mat data; catch data=[rect c]; save data.mat data end
this program creating only one .mat File name named as 'data.mat' , but i need .mat for each image i open.as image1.mat, then image2.mat and so on Plz help !!!!!!
Best Answer