GUI with live preview stops upon clicking

2 views (last 30 days)
Benjamin
Benjamin on 25 Aug 2013
i have created a GUI with live video preview based on the instructions in
however, when i click on the video preview, the video freezes. In my program, i need to get the mouse coordinates when a user clicks at any point in the video preview.
is there any way that will solve the video freezing problem?

Answers (1)

Jan
Jan on 25 Aug 2013
Without seeing the code, it is hard to guess the reasons for its behavior. Did you try to use the debugger to find out, where the program "freezes"?
  1 Comment
Benjamin
Benjamin on 1 Sep 2013
I have tried to use the debugger, but unable to capture the reason behind the freezing of axes. I realized that it is not the program that freezes, it is just axes that freezes.
Further exploration shows the following error :
Error using imaqdevice/stop (line 37) Image acquisition object OBJ is an invalid object.
Error in gui1>startStopCamera_Callback (line 106) stop(handles.video)
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in gui1 (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)gui1('startStopCamera_Callback',hObject,eventdata,guidata(hObject))
Error using waitfor Error while evaluating uicontrol Callback

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!