strange behaviour of read() function for Videos
Afficher commentaires plus anciens
Hi, I have just started to work with VideoReader and the read function to access single frames of the video sequence. Now I have remarked that the result of read() depends on the previous access.
I have just done a little example to demonstrate this:
__________
tic
mov = VideoReader('/home/florian/Videos/output.avi');
%mov = VideoReader('/home/florian/Videos/out7.avi');
toc
read(mov,1);
read(mov,2);
read(mov,3);
read(mov,4);
read(mov,5);
read(mov,6);
read(mov,7);
read(mov,8);
read(mov,9);
read(mov,10);
read(mov,11);
read(mov,12);
read(mov,13);
read(mov,14);
x = read(mov,15);
y = read(mov,16);
z = read(mov,17);
read(mov,1);
z2 = read(mov,17);
read(mov,1);
x2 = read(mov,15);
read(mov,1);
y2 = read(mov,16);
max(max(max(x-x2)))
max(max(max(y-y2)))
max(max(max(z-z2)))
____________________________
I expect the output of x,x2 of y,y2 and z,z2 to be the same, since it is an easy access of frame 15, 16 and 17. If they are the same, the difference is the 0-matrix and the max of it (three dimensional) should be zero. But I got the strange results
_
Elapsed time is 8.905139 seconds.
ans =
190
ans =
187
ans =
204
__________
which proves their not the same. Could any one help me out?
I am using Linux (Ubuntu 12.10) with the R2013a matlab version.
Thank you for your effort.
2 commentaires
Walter Roberson
le 6 Avr 2014
Are the videos fixed frame rate or variable frame rate?
Florian
le 7 Avr 2014
Réponses (1)
Image Analyst
le 5 Avr 2014
0 votes
I have Windows 7 and it works with rhinos.avi and traffic.avi, the demos that MATLAB Image Processing Toolbox ships with. Do you get 0 0 0 for those two videos? What about other videos that are not from the same source as your output.avi?
2 commentaires
Florian
le 7 Avr 2014
Image Analyst
le 7 Avr 2014
You can send them the video and ask them to look at it, if you have a support contract.
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!