How can I embed a rewind-bar for a videoplayer
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Geoff Hayes
2016-9-20
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).
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!