Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Dev Drones
  3. VOXL m500 Reference Drone
  4. Python, OpenCV, MAVLink, Docker, and cameras how to use all?

Python, OpenCV, MAVLink, Docker, and cameras how to use all?

Scheduled Pinned Locked Moved VOXL m500 Reference Drone
5 Posts 5 Posters 1.4k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    Alfonso Ponce
    Contributor
    wrote on last edited by
    #1

    Hello! So I work on a ModalAI m500 developement drone. I've used Docker to run python programs along with MAVSDK. My next goal is to create a program that detects faces or AprilTags or any specified object and make the drone follow it while the object/person moves, however I don't know how to stream what the camera sees into my Pyhton program using OpenCV. Considering my program is running inside a Docker, how can I get real time images from any of the cameras on the drone, make the stream get into the Docker, make the Python program get that stream, process it and make the drone react to the processing output?

    Thank you!

    Eric KatzfeyE 1 Reply Last reply
    0
    • Daniel RyuD Offline
      Daniel RyuD Offline
      Daniel Ryu
      Regular
      wrote on last edited by
      #2

      Not Modalai, but this is what I used. When running the docker container, make sure you run it with the --device tag. This will let you add devices such as cameras you can then access with opencv. For instance, if I use the gimbal camera, I would add to the "docker run" command the "--device=/dev/video2." I would then use opencv like "cap = cv2.VideoCapture(2)" which will try to access the camera at /dev/video2. I'm uncertain whether this process will work for the other cameras, but theoretically as long as you find the correct folders where the camera devices are stored, you should be able to connect to them

      1 Reply Last reply
      0
      • A Alfonso Ponce

        Hello! So I work on a ModalAI m500 developement drone. I've used Docker to run python programs along with MAVSDK. My next goal is to create a program that detects faces or AprilTags or any specified object and make the drone follow it while the object/person moves, however I don't know how to stream what the camera sees into my Pyhton program using OpenCV. Considering my program is running inside a Docker, how can I get real time images from any of the cameras on the drone, make the stream get into the Docker, make the Python program get that stream, process it and make the drone react to the processing output?

        Thank you!

        Eric KatzfeyE Offline
        Eric KatzfeyE Offline
        Eric Katzfey
        ModalAI Team
        wrote on last edited by
        #3

        @Alfonso-Ponce If you want to use any of the standard cameras then you need to get the frames from voxl-camera-server. It is based on our "ModalAI Pipe Architecture" (MPA) that uses standard Linux pipes to move data between processes. You can make an MPA client application in your Docker and receive the frames there. You will likely need to use the "-v" flag when launching your container to remap the pipe names outside of the Docker to new names inside of the Docker (e.g. -v <pipe name>:<container pipe name>)

        J 1 Reply Last reply
        0
        • Eric KatzfeyE Eric Katzfey

          @Alfonso-Ponce If you want to use any of the standard cameras then you need to get the frames from voxl-camera-server. It is based on our "ModalAI Pipe Architecture" (MPA) that uses standard Linux pipes to move data between processes. You can make an MPA client application in your Docker and receive the frames there. You will likely need to use the "-v" flag when launching your container to remap the pipe names outside of the Docker to new names inside of the Docker (e.g. -v <pipe name>:<container pipe name>)

          J Offline
          J Offline
          jaredjohansen
          Regular
          wrote on last edited by
          #4

          @Eric-Katzfey , would you be able to share a minimal code example (preferably in python) that retrieves a single frame from the high-res camera? The minimal code would be running in a Docker container running on the VOXL.

          1 Reply Last reply
          0
          • todd45040T Offline
            todd45040T Offline
            todd45040
            wrote on last edited by
            #5

            I'm going to assume you know about the Docker examples at:
            https://gitlab.com/voxl-public/voxl-docker-images

            Will any of those help?

            -Todd

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            ModalAI
            Categories Recent Tags ModalAI.com Docs
            © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups