Filter löschen
Filter löschen

Cannot read a another video (HELP)

2 Ansichten (letzte 30 Tage)
Exton
Exton am 20 Okt. 2012
""
obj=VideoReader('222.wmv');
a=read(obj);
frames=get(obj,'numberOfFrames');
for k = 1 : frames
I(k).cdata = a(:,:,:,k);
I(k).colormap = [];
end
implay(I);
""
i have a video with name '111.wmv' this 1 i can read it but when i want to read another video name'222.wmv' it give a an error
"
Dot name reference on non-scalar structure.
Error in VideoReader/read (line 91)
if( ~isempty(obj.NumberOfFrames) )
Error in new (line 3)
a=read(obj);
" what does it mean & how do i solved it????

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Okt. 2012
It means the VideoReader() call failed, such as might occur if 222.wmv was not found.
  7 Kommentare
Walter Roberson
Walter Roberson am 21 Okt. 2012
Wait, this sounds familiar now. There is a bug, I think it is in R2012b only, that affects structure access.
Edit line 91 to change
if( ~isempty(obj.NumberOfFrames) )
to
if( ~isempty(obj(1).NumberOfFrames) )
and likewise on other lines that encounter the same problem.
Exton
Exton am 21 Okt. 2012
Nice man got it... THANKYOU ^_^

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by