Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
A timeout occurred during GETSNAPSHOT.

Subject: A timeout occurred during GETSNAPSHOT.

From: loli me

Date: 17 Jan, 2008 09:58:01

Message: 1 of 3

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

Subject: A timeout occurred during GETSNAPSHOT.

From: Vihang Patil

Date: 19 Jan, 2008 05:48:01

Message: 2 of 3

"loli me" <loli.m@mathworks.com> wrote in message
<fmn8r9$q0k$1@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

Subject: A timeout occurred during GETSNAPSHOT.

From: lee

Date: 18 Jun, 2008 16:58:01

Message: 3 of 3

"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<fms2uh$5m0$1@fred.mathworks.com>...
> "loli me" <loli.m@mathworks.com> wrote in message
> <fmn8r9$q0k$1@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
>



how does one find the preview window's handle and set it to
'visible','off'? I've tried the standard commands to find
currently open figure and objects but neither seem to detect
the preview window (it seems to be different from a standard
figure).

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us