Reading jpeg image sequence from current directory.

1 回表示 (過去 30 日間)
Swapna Tekale
Swapna Tekale 2014 年 7 月 10 日
編集済み: William beason 2014 年 9 月 22 日
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 日
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.
  1 件のコメント
Swapna Tekale
Swapna Tekale 2014 年 7 月 12 日
Thank you my code worked.

サインインしてコメントする。

その他の回答 (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 件のコメント
Swapna Tekale
Swapna Tekale 2014 年 7 月 10 日
Thank you for answering my question. Can you please specify what exactly I have to change.

サインインしてコメントする。


Swapna Tekale
Swapna Tekale 2014 年 7 月 10 日
Thank you for answering my question. Can you please specify what exactly I have to change.

Community Treasure Hunt

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

Start Hunting!

Translated by