What is done in this line? f = f(arrayfun(@(x) x.name(1), f) ~= '.');

1 次查看(过去 30 天)
clc
clear all
close all
dirpath = 'E:\4-1\image-thesis\implementation\shaila\';
f=dir(fullfile(dirpath,'*.jpg'));
f = f(arrayfun(@(x) x.name(1), f) ~= '.');
for i=1:length(f)
a=imread(strcat(dirpath,f(i).name));
if (ndims(a)==2 | (a(:,:,1)==a(:,:,2) & a(:,:,2)==a(:,:,3)))
%if (ndims(a)==2)
figure;imshow(a)
end
end
What is done in this line?
f = f(arrayfun(@(x) x.name(1), f) ~= '.');

采纳的回答

Matt J
Matt J 2013-5-28
编辑:Matt J 2013-5-28
It takes file names obtained from DIR and throws away those that begin with '.'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by