Python MPA image example
-
Hi, I am working on the integration of a camera on the VOXL2. The camera acts as a USB CDC device and outputs an 8-bit greyscale image on ttyACM0. The manufacturer provides a python example to talk to the camera. I was able to deploy it on the voxl2 and read the images. Now I would like to push those to a pipeline for consumption by voxl-streamer and other processes. Do you have any sample code or guidance on how to do this on python? I would like to have a functional prototype of the whole thing before porting it to C++.
Thanks!
-
@david-moro , here is a complete example that receives rtsp stream and publishes images via MPA:
You need to build
voxl-mpa-tools
package from this branch and install it on VOXL2. The python scripts will get installed to/usr/share/modalai/voxl-mpa-tools/
, you will need at leastpympa.py
which provides wrappers for python bindings for the mpa functions.libpympa.so
will be installed to/usr/lib
which contains the C side of the bindings.Since you don't need opencv, you can just extract the mpa publishing part from the example and add it to your python camera code.
Alex
-
Awesome! Will give it a try. Thanks @Alex-Kushleyev !
-
@Alex-Kushleyev , it worked. Thanks!
-
@david-moro , awesome! thanks for confirming.
Alex