ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Python MPA image

    Modal Pipe Architecture (MPA)
    2
    5
    64
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      l05
      last edited by

      Re: Python MPA image example

      Hi, I am working on getting frames from the camera on the VOXL2 in python. I have looked at the python example at https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/pympa-experimental/tools/python/rtsp_rx.py since I do not need to publish the frames. I cannot seem to install opencv properly, so it has GStreamer support. I have python 3.6 and GStreamer on the drone, has anyone been able to install opencv with GStreamer support for the VOXL2?

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @l05
        last edited by

        @l05 , please see the following post, you can download the voxl-opencv library with python3 bindings from here .

        https://forum.modalai.com/topic/3519/help-with-pip-installing-opencv

        This version of opencv was used for testing the pympa-experimental tools.

        The script you were looking at is setup to receive image frames from an rtsp stream - is that what your goal is? (as opposed to receiving images from a mipi camera connected to VOXL2 (via voxl-camera-server)).

        Alex

        L 1 Reply Last reply Reply Quote 0
        • L
          l05 @Alex Kushleyev
          last edited by

          @Alex-Kushleyev My end goal is to receive images via voxl-camera-server, any tips or other examples on how to start to do so?
          I've taken a look at voxl-tflite-server but still having some trouble understanding how/where the service connects to one of voxl-camera-server's pipe to receive images.

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @l05
            last edited by Alex Kushleyev

            @l05 , can you please clarify the following: do you need to receive images from camera server in a python script or a C/C++ application?

            The recommended way is to use a C/C++ application, for which we can provide some examples. Python extension via Pympa makes it easier to quickly test / prototype something, but may have additional overhead to receive / convert images.

            For example, there is a tool voxl-inspect-cam-ascii, which is installed by default with the VOXL2 SDK, which subscribes to an image and renders the image to your terminal using ASCII. It uses opencv to downscale the image. You can find the source code here : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/tools/voxl-inspect-cam-ascii.cpp . this app also shows how to publish an image (it optionally publishes the down-scaled image as well).

            You can test this app by running voxl-inspect-cam-ascii <camera_stream> in a terminal, and you should see an ASCII version of your image. The name of the camera stream you can get from voxl-portal (camera tab), for example it would be something like tracking or hires_front_color, depending on the cameras / streams that you have enabled.

            If you wanted to develop your own application, you can start by first building the voxl-mpa-tools package from source and then add your own application into the existing build structure.

            Alex

            L 1 Reply Last reply Reply Quote 0
            • L
              l05 @Alex Kushleyev
              last edited by

              @Alex-Kushleyev Sorry for the confusion. I initially wanted to receive images using a Python script for prototyping, but now I plan to develop a C/C++ background service to receive images from camera server. Thank you for your advice, I will start by adding my own application into the existing build structure of voxl-mpa-tools.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors