Hi, I am trying to run two GigE cameras using the image acquisition toolbox. I am running into the same problem whether I use the videoinput object with either the general gige adapter or the one provided by FLIR (mwspinnakerimaq), as well as using the gigecam objects. Basically, I can grab frames in a loop from either camera on its own no problem. However, as soon as I put both cameras in the "start" state I will get a timeout error on the getsnaphot command, even if I don't ask the second camera for a snaphot. The code below works just fine until you uncomment the indicated line. vid1 = videoinput('gige',1); src1 = getselectedsource(vid1); set(src1,'ExposureAuto','off') vid1.IgnoreDroppedFrames = 'on'; vid1.FramesPerTrigger = 1; triggerconfig(vid1,'manual') vid2 = videoinput('gige',2); src2 = getselectedsource(vid2); set(src2,'ExposureAuto','off') vid2.IgnoreDroppedFrames = 'on'; vid2.FramesPerTrigger = 1; triggerconfig(vid2,'manual'); start(vid1) % start(vid2) % uncommenting this line causes the timeout error N = 100; tic for ii = 1:N frame1 = getsnapshot(vid1); end t = toc; fprintf('Average Frame Rate = %.1fHz\n',N/t); stop(vid1) % stop(vid2) I feel like I ran into a probelm with the image aquisition toolbox, these particular GigE cameras, or I'm missing some basic setting or something.
John Michell answered .
2025-11-20
vid1 = videoinput('gige',1);
is changed to
vid1 = videoinput('gige',1,'Mono8');
the problem goes away and I am able to take frames from both cameras without a problem.
The system performance is a bit better when using the adapter from FLIR. i.e.
vid1 = videoinput('mwspinnakerimaq',1,'Mono8_Mode0')