But Im wondering, how can you get the stream of two (or more) cameras in python?
I’ve already successfully connected two cameras in the common vision manager, however using your example code I can only get the stream from the first camera.
Please also note, that you cannot acquire images from more than one device asynchronously.
This is due to the GIL (global interpreter lock), which does not allow real parallel execution. As a consequence the interpreter and all python threads block during a stream.wait() and cannot continue execution until this call returns.
Currently, you must synchronize (e.g. via hardware trigger) all your cameras to acquire safely from multiple streams.
I’m currently working on a solution that offers true asynchronous acquisition through native threads. As soon as it is available I will introduce it in Getting Started with CVBpy.
Hi,
accessing the second (1) port loads the device at port 0 and then shifts the port to 1. You would need to change the order in which you open the devices. So first loading port 1 and then 0 should fix the problem.
To work around that problem we added the device discovery. This doesn’t use the GenICam.ini anymore. This only opens the device you want not interfering with other processes.