
Comment the following two lines to disable waiting on exit.Ĭerr << endl << " Press Enter to exit." << endl Print the index and the model name of the camera.Ĭout GrabSucceeded() GetWidth() GetHeight() GetBuffer() Ĭout << " Gray value of first pixel: " << (uint32_t)pImageBuffer << endl << endl Ĭerr << " An exception occurred." << endl Pylon::DisplayImage(cameraContextValue, ptrGrabResult) Show the image acquired by each camera in the window related to each camera. Create an array of instant cameras for the found devices and avoid exceeding a maximum number of devices.ĬInstantCameraArray cameras(min(devices.size(), c_maxCamerasToUse))

Throw RUNTIME_EXCEPTION( " No camera present.") If (tlFactory.EnumerateDevices(devices) = 0) Get all attached devices and exit application if no device is found.

Before using any pylon methods, the pylon runtime must be initialized.ĬTlFactory& tlFactory = CTlFactory::GetInstance() The exit code of the sample application. static const size_t c_maxCamerasToUse = 2 The bandwidth used by a FireWire camera device can be limited by adjusting the packet size. The "Controlling Packet Transmission Timing with the Interpacket and Frame Transmission Delays on Basler GigE Vision Cameras" // Application Notes (AW000649xx000) // provide more information about this topic. To manage the bandwidth, the GevSCPD interpacket delay parameter and the GevSCFTD transmission delay // parameter can be set for each GigE camera device.

This applies, for instance, if two GigE cameras are connected to the same network adapter via a switch. It is important to manage the available bandwidth when grabbing with multiple cameras. Limits the amount of cameras used for grabbing. static const uint32_t c_countOfImagesToGrab = 1000
