MATLAB Answers

Call image folder to do looping

2 views (last 30 days)
Syakira Akmal
Syakira Akmal on 17 Apr 2017
Commented: Syakira Akmal on 17 Apr 2017
Hi, may i know what is code set for calling a image folder. Actually i want do calculation in one time which i do a looping.This my coding
for i=1;97
[File_Name, Path_Name] = uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...
'*.*','All Files'},'title',...
a = imread([File_Name, Path_Name]);
%to set point
[X,Y] = size(a);
%to calculate mean image
m = mean2(a);
%to calculate standard deviation
sd = std2(a);
but i stuck because i don't know how make it automatically do a calculation for one folder and then save all the data in excel. Anyone please help me.?


Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 17 Apr 2017
To process a sequence of files in a single folder, see the FAQ:
To recursively drill down into subfolders, see the attached demos.
By the way, this is not proper syntax:
for i=1;97
maybe you meant
for k = 1 : 97

  1 Comment

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by