FG Camera Library  1.5.0.0 (2023-09-08)
Python

How to use the Python bindings

Note
Please take a look at the Linux / Windows SDK documentation on how to install the Python bindings.

The C functions for this library are implemented by the Python module fg.

The Pyton documentation for the module briefly describes the function arguments and return values. The documentation is also available on the device, for example:

~# pydoc3 fg.install_camera
...

API Differences:

  • C API:
    • All functions return a UINT32 value to indicate the status of each function.
    • Additional function results are returned by passing pointer arguments.
  • Python API:
    • Functions will raise a Python exception in case of an error.
    • Function results are regular return values of the function. Mupltiple result values are returned as a tuple.
    • Image buffers are represented by the 'voidptr' object which implements the Python buffer protocol.
    • Enumerations are implemented by enum.Enum objects.

Python examples can be found in the following SDK folder:
/opt/ImagoTechnologies/SDK/python/examples