Basler Pylon API from Python
Python can control Basler cameras using the official Basler PyPylon API on Linux, MacOS, and Windows. The Raspberry Pi and some other ARM systems are also covered by Basler camera drivers.
Install
- Install Pylon suite with SDK / Developer options. For the Raspberry Pi, choose ARM 32-bit hardfloat Debian installer as despite the 64-bit processor, the OS is 32-bit.
- setup PyPylon
- Checkout PyPylon example scripts
Live preview
ARM and x86 Linux: run Basler Pylon GUI live viewer:
/opt/pylon*/bin/PylonViewerApp
For Linux, Basler Pylon is in the system menu under “Sound & Video/pylon Viewer” and “other/pylon IP Configurator”.
Notes
RuntimeError: Payload data has been discarded. Payload data can be discarded by the camera device if the available bandwidth is insufficient.
Basler claims root is needed for Pylon to work in some systems.