How to import sequence of images from any folder?

2 ビュー (過去 30 日間)
Meshooo
Meshooo 2015 年 1 月 30 日
コメント済み: Meshooo 2015 年 2 月 2 日
Dear all,
I have a sequence of tif images that I want to import them to my GUI. However, using the following code I can import the images only if they are in a folder which is part of the path of my matlab
[fileName,pathName] = uigetfile('*.tif')
dname = fullfile(pathName,fileName)
filelist = dir([fileparts(dname) filesep '*.tif']);
fileNames = {filelist.name}';
num_frames = (numel(filelist));
I = imread((fileNames{1})); %to show the first image in the selected folder
imshow(I, []);
How can I import images from any folder which is not included in my matlab path?
Any help is appreciated.
Meshoo

採用された回答

David Young
David Young 2015 年 1 月 30 日
Try
I = imread(fullfile(pathname, fileNames{1}));

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by