Call image folder to do looping

2 ビュー (過去 30 日間)
Syakira Akmal
Syakira Akmal 2017 年 4 月 17 日
コメント済み: Syakira Akmal 2017 年 4 月 17 日
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',...
'C:\fypSNAKE')
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);
end
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.?

回答 (1 件)

Image Analyst
Image Analyst 2017 年 4 月 17 日
To process a sequence of files in a single folder, see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
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 件のコメント
Syakira Akmal
Syakira Akmal 2017 年 4 月 17 日
oh.. yurp.. thanks

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by