Error: Index exceeds matrix dimensions.
Mostra commenti meno recenti
obj=mmreader('ATMvid.avi');
a=read(obj, [10 200]);
%a=read(obj);
frames=get(obj,'numberOfFrames');% to find no.of frames
frames
for k = 1 : frames-1
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
In above code I am getting error "Index exceeds matrix dimensions.", please help
Risposte (1)
Azzi Abdelmalek
il 24 Feb 2013
Modificato: Azzi Abdelmalek
il 24 Feb 2013
What you should do is
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
8 Commenti
pratibha rane
il 24 Feb 2013
Modificato: Azzi Abdelmalek
il 24 Feb 2013
Azzi Abdelmalek
il 24 Feb 2013
Maybe your file is not in the current folder
Image Analyst
il 24 Feb 2013
Walter Roberson
il 24 Feb 2013
What does mmfileinfo say about the encoder?
Is it an Indeo5 file? And are you running on 64 bit Windows? If so then are you also running with 64 bit MATLAB ?
pratibha rane
il 24 Feb 2013
pratibha rane
il 24 Feb 2013
pratibha rane
il 25 Feb 2013
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!