Reading jpeg image sequence from current directory.

Hi, I want to read JPEG images from current directory. Images are named sequentially like IM1, IM2 and so on of same size i.e 384 by 256. I wrote following code. It is giving error-- Assignment has more non singleton rhs dimensions than non- singleton subscripts.
fileFolder = fullfile(matlabroot,'toolbox','images',imdemos', 'img');
dirout = dir(fullfile(fileFolder,'*.jpeg'));
fileNames = numel(fileNames);
I = imread(fileNames{1});
sequence = zeros([size(I) numFrames],class(I));
sequence(:,:,1) = I;
for p = 2:numFrames
sequence(:,:,p) = imread(fileNames{p});
end

 채택된 답변

William beason
William beason 2014년 7월 10일
편집: William beason 2014년 9월 22일

0 개 추천

You should check this link here http://outsourcingtax.weebly.com/ to know more briefly about the debugging and image related coding. I am sure it will helpful for you.

추가 답변 (2개)

per isakson
per isakson 2014년 7월 10일
Here are some links on debugging in Matlab
BTW:
fileNames = numel(fileNames);
will assign a double scalar to fileNames

댓글 수: 1

Thank you for answering my question. Can you please specify what exactly I have to change.

댓글을 달려면 로그인하십시오.

Swapna Tekale
Swapna Tekale 2014년 7월 10일

0 개 추천

Thank you for answering my question. Can you please specify what exactly I have to change.

질문:

2014년 7월 10일

편집:

2014년 9월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by