Info
此问题已关闭。 请重新打开它进行编辑或回答。
Buttondownfcn callback on live video data (preview)
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I am currently trying to initiate a callback routine when the user presses on an axis that contains a live video stream, i.e.
frame = getsnapshot(handles.vidObj);
axes = imshow(frame, 'Parent', handles.axes_stream);
preview(handles.vidObj, axes); % assign vidObj to axes
However, I have not yet been able to achieve this despite looking at various discussions. I presume it is because the displayed video is stopping my mouse button being registered and the callback routine is not working.
Any help would be appreciated.
1 个评论
回答(1 个)
Sean de Wolski
2012-11-16
I am guessing that preview is nullifying your ButtonDownFcn (just an educated guess though). Thus you would need to reinstate your ButtonDownFcn on the axes after calling preview.
8 个评论
Image Analyst
2012-11-26
编辑:Image Analyst
2012-11-26
I haven't tried clicking on the live video axes. Would clicking on a button be an acceptable workaround? Because I know I can click on buttons while I have a live image in an axes, and it does the callback operations just fine.
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!