Video acquisition
The pymanip.video
module provides tools to help with camera acquisition. We
use the third-party pymba
module bindings to the AVT Vimba SDK for
AVT cameras, the third-party pyAndorNeo
module bindings to the
Andor SDK3 library for the Andor Camera, the third-party pyueye
module
bindings to the IDS ueye library, the Python module provided by Ximea for the
Ximea cameras, and PyVCAM wrapper for Photometrics camera.
We wrote our own bindings to the Pixelfly library for the PCO camera. Beware that the code works for us, but there is no garantee that it will work with your camera models.
The idea was for us to be able to switch cameras, without having to change much of
the acquisition code. So we define an abstract pymanip.video.Camera
base
class, and all concrete sub-classes follow the exact same user API. The methods allow
to start video acquisition, in a manner consistent with our needs, and also provides
a unified live preview API.
It also makes it relatively straightforward to do simultaneous acquisition on several
cameras, even if they are totally different models and brands and use different
underlying libraries.
The useful concrete classes are given in this table:
Camera type |
Concrete class |
---|---|
AVT |
|
PCO |
|
Andor |
|
IDS |
|
Ximea |
|
Photometrics |
|
They all are sub-classes of the pymanip.video.Camera
abstract base
class. Most of the user-level useful documentation lies in the base class.
Indeed, all the concrete implementation share the same API, so their internal
methods are implementation details.
In addition, a high-level class, pymanip.video.session
is provided to
build simple video acquisition scripts, with possible concurrent cameras trigged
by a function generator.
- Simple usage
- Asynchronous acquisition
- Advanced usage
- Asynchronous acquisition session (
pymanip.video.session
) - Implementation
- Concrete implementation for Andor camera
- Concrete implementation for AVT camera
- Concrete implementation for PCO camera
- Concrete implementation for IDS camera
- Concrete implementation for Ximea camera
- Concrete implementation for Photometrics camera