how to fed all the images to an array from a folder and from that array fed one by one image to a function?
Afficher commentaires plus anciens
function [features]=feature_extractor_2d(im2)
%this function zones the input image and extracts features for each zone.
srcFiles = dir('C:\Users\Omm\Desktop\thesis\multicharacterrec\*.png'); % the folder in which ur images exists
for i = 1 : length(srcFiles)
filename = strcat('C:\Users\Omm\Desktop\thesis\multicharacterrec\',srcFiles(i).name);
im = imread(filename);
%selecting the universe of discourse
im2=discourser(im);
end
this function is replacing all the previous images to a new image and taking last one as a input but i want to get the features of all the image one by one please guide me how to do it in matlab?
6 commentaires
Image Analyst
le 14 Juil 2016
Don't use image as the name of your variable. image is the name of a built-in function so you should not use that name. I don't know what "universe of discourse" is, nor do I know what your discourser() function does. Anyway, you get an image from imread(), then do something with with it in discourser() to get a new image, but then what do you mean by the "outputs of all the image"? The image is an image. What do you mean by the output of that image? The image doesn't output anything - it just is.
ayushi
le 14 Juil 2016
Walter Roberson
le 14 Juil 2016
Please do not use image as the name of a variable, as it is the name of the important MATLAB graphics routine to display images.
Remember, even if you can keep it straight in your mind, that other people need to be able to read the code, and they are going to get confused about your use of image as a variable name.
Walter Roberson
le 14 Juil 2016
image = imread(filename);
is still using "image" as the name of a variable.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Import and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!