MATLAB: Reading jpeg image sequence from current directory.

image sequencejpeg files

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

Best Answer

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.