How can I embed a rewind-bar for a videoplayer

1 visualización (últimos 30 días)
Dries van Roovert
Dries van Roovert el 16 de Sept. de 2016
Comentada: Geoff Hayes el 20 de Sept. de 2016
Hi guys,
I'm trying to embed a videoplayer in a custom GUI environment. Now, I want to use a uicontrol style slider as a rewind bar to "browse" the frames. I've tried to print 1 frame on the axis as a callback function and delete the previous frame. The problem is that the new frame doesn't show on the axis.
delete(get(app.Axis,'Children'));
FrameNumber=get(app.hObject,'Value');
VideoPlayFile=vision.VideoPlayer(app.dir);
Frame=step(VideoPlayFile,FrameNumber);
showFrameOnAxis(app.Axis,Frame);
hObject is the slider. Many thanks in advance if you read this and can help me.
Kind regards, Dries
  1 comentario
Geoff Hayes
Geoff Hayes el 20 de Sept. de 2016
Dries - what function does the above code appear in? Is it in a callback (of some kind) for the slider? Please clarify by posting the function signature (and all code for this function). Also, post the code for showFrameOnAxis or step through this function (using the debugger) to see why the desired frame is not being shown. You may also want to look at (or print out) FrameNumber each time the above code is called. Does it have a valid value? (i.e. is it an integer that corresponds to a valid frame within the video).

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Computer Vision with Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by