MATLAB Answers

0

How to import sequence of images from any folder?

Meshooo 님이 질문을 제출함. 30 Jan 2015
최근 활동 Meshooo 님이 댓글을 추가함. 2 Feb 2015
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

  댓글 수: 0

로그인 to comment.

답변 수: 1

Answer by David Young
on 30 Jan 2015
 Accepted Answer

Try
I = imread(fullfile(pathname, fileNames{1}));

  댓글 수: 1

Thank you..

로그인 to comment.



Translated by