Error: Index exceeds matrix dimensions.

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 24일
편집: Azzi Abdelmalek 2013년 2월 24일

0 개 추천

What you should do is
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end

댓글 수: 8

pratibha rane
pratibha rane 2013년 2월 24일
편집: Azzi Abdelmalek 2013년 2월 24일
thanks, still i am getting error-nitialization failed. (No combination of intermediate filters could be found to make the connection.)
Error in ==> mmreader.mmreader at 66
uddobj = audiovideo.mmreader(fullFilePath);
code:
obj=mmreader('ATMvid.avi');
a=read(obj, [10 101]);
%a=read(obj);
frames=get(obj,'numberOfFrames');% to find no.of frames
frames
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 24일
Maybe your file is not in the current folder
Image Analyst
Image Analyst 2013년 2월 24일
We think it's a problem with his movie file. See his duplicate post
Walter Roberson
Walter Roberson 2013년 2월 24일
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
pratibha rane 2013년 2월 24일
yes, 64 bit windows 7.
pratibha rane
pratibha rane 2013년 2월 24일
matlab7.7(2008)-32bit.how to finf indeo5 file?
pratibha rane
pratibha rane 2013년 2월 25일
this problem solved after installation of window 7 codec net pack.

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

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2013년 2월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by