How can I embed a rewind-bar for a videoplayer
1 view (last 30 days)
Show older comments
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 Comment
Geoff Hayes
on 20 Sep 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).
Answers (0)
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!