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!