Thank you for the help on this Sean. I've rewritten the code so that the camera can simply be triggered by an external device. The idea would be to have this trigger the device at a steady 30 fps and then matlab could perform the computations in between. The issue that I'm having now is that I can't get Matlab to configure the camera for the triggering. I'm using,
vid = imaq.VideoDevice('gige', 1);
set(vid, 'ROI', [1 1 640 240]); %[x y width height] use 640 240
set(vid, 'HardwareTriggering', 'On');
set(vid.DeviceProperties, 'FrameStartTriggerActivation', 'RisingEdge');
All of this works loads and returns no errors. However, when I now run
I get the error
Error using imaq.VideoDevice/start (line 478)
Invalid use of START method on VideoDevice System object. Use the
STEP method to acquire a frame.
If I use frame = step(vid);
I get the error,
Warning: The videoinput object is configured for hardware
trigger, however, no TriggerMode properties have been set to
'On'. The most likely result of this will be immediate
What I am trying to do is just have it collect a single frame per trigger to continue my while loop. I cannot figure out how to set a specific TriggerMode. I know the camera is capable of "Mode 0" but if I look get(vid), I just get
Device: 'Blackfly BFLY-PGE-13E4M (gige-1)'
ROI: [1 1 640 240]
DeviceProperties: [1x1 imaq.internal.DeviceProperties]
So I'm not sure how to work with the DeviceSpefic setting. The camera is a new Pointgrey blackfly.
Any help is greatly appreciated.