GETSNAPSHOT timeout error after camera settings change

4 views (last 30 days)
Hi there,
I'm having some troubles with getsnapshot() function. The thing is that if I try to use getsnapshot() after I've changed the camera settings (exposure for instance) an error occurrs. Here is a an extract of the code:
vid = videoinput('winvideo', 1, 'RGB24_640x480');
%preview(vid)
src_obj = getselectedsource(vid);
data = getsnapshot(vid);
src_obj.Exposure = -9;
data = getsnapshot(vid);
??? Error using ==> imaqdevice.getsnapshot at 65 A timeout occurred during GETSNAPSHOT.
This timeout error doesn't occur if the preview is turned on. I'd like to bypass the preview command because it makes a window appear during the execution of the program.
I can't figure out what changes with the preview open. I also tryed to add a manual trigger, and make the camera running before using getsnapshot(). In this case the camera settings have to be changed when running is off (stop(vid)). However it doesn't work either.
triggerconfig(vid, 'manual');
start(vid);
Help is very appreciated,
Thank you!
  1 Comment
David Tarkowski
David Tarkowski on 3 Aug 2011
What is the frame rate when the Exposure is set to -9? How long does the preview window take to start updating at that value?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!