Reading jpeg image sequence from current directory.
Show older comments
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
Accepted Answer
More Answers (2)
per isakson
on 10 Jul 2014
Here are some links on debugging in Matlab
BTW:
fileNames = numel(fileNames);
will assign a double scalar to fileNames
1 Comment
Swapna Tekale
on 10 Jul 2014
Swapna Tekale
on 10 Jul 2014
0 votes
Categories
Find more on Image Sequences and Batch Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!