From: loli me on
Hey,

i have problems unsing the example data myCameraGUI.m from
MATLAB.
After starting und stoping the Video CAmera in myCameraGUI
comes the error message:

>>
??? A timeout occurred during GETSNAPSHOT.

Error in ==> uiwait at 62
waitfor (hFigDlg, 'waitstatus', 'inactive');

Error in ==> myCameraGUI>myCameraGUI_OpeningFcn at 78
uiwait(handles.myCameraGUI);

Error in ==> gui_mainfcn at 221
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata
(gui_hFigure), varargin{:});

Error in ==> myCameraGUI at 40
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin
{:});

Error in ==> window2>pushbuttonJ_Callback at 79
h = figure (myCameraGUI)

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> window2 at 42
gui_mainfcn(gui_State, varargin{:});

Warning: The TimerFcn callback is being disabled.
To enable the callback, set the TimerFcn property.
??? Error using ==> figure
Single input must be an existing figure handle or a scalar
integer from 1 to 2147483646

Error in ==> window2>pushbuttonJ_Callback at 79
h = figure (myCameraGUI)

Error in ==> gui_mainfcn at 96
feval(varargin{:});

Error in ==> window2 at 42
gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback

Maybe someone could help me!

Thanks

loli
From: Vihang Patil on
"loli me" <loli.m(a)mathworks.com> wrote in message
<fmn8r9$q0k$1(a)fred.mathworks.com>...
> Hey,
>
> i have problems unsing the example data myCameraGUI.m from
> MATLAB.
> After starting und stoping the Video CAmera in myCameraGUI
> comes the error message:
>
> >>
> ??? A timeout occurred during GETSNAPSHOT.
>

Hello
I had faced the same error message too. I have observed, in
my case, this would happen if you use a USB Frame Grabber
Card/ USB tv tuner card. The workaround I used was to let
the preview window be running at all times while the
getsnapshot is being issued.
If you thing that preview window is unacceptable to be
visible at all times you can turn the preview windows
figure handle visible property ,'visible' 'off' and still
use the getsnapshot to work for you..
Also having the preview window working in the background,
the getsnapshot command will work faster too.
HTH
Vihang