* References the tree's root item at path "/"
open_framegrabber ('Ensenso-NxLib', 0, 0, 0, 0, 0, 0, 'default', 0, 'Raw', -1, 'false', 'Item', '/', 0, 0, RootHandle)
* replace "1234" and "2345" with your camera's serial numbers
open_framegrabber ('Ensenso-NxLib', 0, 0, 0, 0, 0, 0, 'default', 0, 'Raw', 'auto_grab_data=0', 'false', 'Stereo', '1234', 0, 0, CameraHandle1)
open_framegrabber ('Ensenso-NxLib', 0, 0, 0, 0, 0, 0, 'default', 0, 'Raw', 'auto_grab_data=0', 'false', 'Stereo', '2345', 0, 0, CameraHandle2)
* Configure trigger modes and outputs
set_framegrabber_param (CameraHandle1, 'Parameters/Capture/TriggerMode', 'Software')
set_framegrabber_param (CameraHandle1, 'Parameters/IO/Output', 10.0)
set_framegrabber_param (CameraHandle2, 'Parameters/Capture/TriggerMode', 'FallingEdge')
for Index := 1 to 10 by 1
* Execute the Capture command with default parameters
set_framegrabber_param (RootHandle, 'do_execute', 'Capture')
* Please note that the default parametrization of Capture is sufficient for synchronized operation because:
* * Capture triggers all opened cameras and waits for all cameras to return an image
* * Cameras configured for hardware triggering are triggered first, so they are always armed and waiting for the trigger signal
* before the software triggered camera start its exposure and outputs the trigger signal
* Now compute the disparity map, point map, and process the data according to your needs (see Grabbing 3D Data for an example on this)
...
endfor
|