Borrar filtros
Borrar filtros

error in loading video file Climate.mp4

2 visualizaciones (últimos 30 días)
Osita Onyejekwe
Osita Onyejekwe el 7 de Abr. de 2017
Comentada: Walter Roberson el 7 de Abr. de 2017
I'm trying to load a video file in directory to capture frames and i keep getting the error this error. Below is the code and the error that I am getting
obj = VideoReader(Climate.mp4);
for k = 1 : 5 %fill in the appropriate number
this_frame = READFRAME(obj, k);
thisfig = figure();
thisax = axes('Parent', thisfig);
image(this_frame, 'Parent', thisax);
title(thisax, sprintf('Frame #%d', k));
end
Undefined variable "Climate" or function "Climate.mp4".
Error in Climate_Change (line 48)
obj = VideoReader(Climate.mp4);
How do I fix this?
Thank you

Respuestas (1)

Paramesh
Paramesh el 7 de Abr. de 2017
see this this syntax
v = VideoReader('xylophone.mp4');
  2 comentarios
Osita Onyejekwe
Osita Onyejekwe el 7 de Abr. de 2017
now i get this error,
Undefined function 'READFRAME' for input arguments of type 'VideoReader'.
Walter Roberson
Walter Roberson el 7 de Abr. de 2017
You might happen to be using an old version between the time that VideoReader was introduced but before the readFrame() method was introduced (note capitalization, by the way.) If so then you will need to recode in terms of the older read() method; https://www.mathworks.com/help/matlab/ref/videoreader.read.html

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by