after doing preprcessing in image how can creat .mat files for this images

hi every one...i doing pre-processing in images (median filter and canny edge detection now i want to store this images in .mat files to enter this files into Neural network how can do this??what the dimintions will creat in this files?am i correct???how to creat Target and input matrix in .mat files?? plz help me

 Accepted Answer

Use save() to save images or any other variables into a mat file. The help for save() has examples to help you.

8 Comments

primrose's "Answer" moved here:
pathName = 'E:\matlab\imm';
myFolder = 'E:\matlab\imm';
filePattern = fullfile(myFolder, '*.jpg');
jpegFiles = dir(filePattern);
for k = 1:length(jpegFiles)
baseFileName = jpegFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
img{k} =imresize( imread(fullFileName),[50 50]);
end
savefile = 'jpgfile.mat';
save(savefile, 'img')
i used this code to save the image in mat files...i have 20 images for two type of cares how to choose image as input and images as target????plz help me
I don't know what inputs and targets are. You must know in advance which a particular image is, a target or an input. Maybe you can store them in two different folders.
thanks image Analyst..I'm thankful to you..i created folder of 20 images for 2 diferent cars..each cars have 10 images with diferent noise...can i used this images as inputs images and used original images as target images???plz help me
thanks image analyst...now how to enter can tell the networks the first ten images is for first car and the other ten images for seconde cars??...plz image analyst help me
I don't know how to tell your networks. I don't have the Vehicle Network Toolbox. I don't have the Neural Network Toolbox either. All I know how to do is to create file names, but that's trivial and the FAQ shows you how to do that anyway. Maybe someone with that toolbox will answer. Otherwise ask the Mathworks.

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!