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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL SDK and Software
  3. How to import OpenCV in Python3?

How to import OpenCV in Python3?

Scheduled Pinned Locked Moved Unsolved VOXL SDK and Software
11 Posts 4 Posters 3.6k Views 3 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.
  • modaltbM Offline
    modaltbM Offline
    modaltb
    ModalAI Team
    wrote on last edited by
    #2

    Hi @Alex123 ,

    The opencv-3-4-6 project above isn't a python3 package installation rather for c++, for example:

    https://gitlab.com/voxl-public/other/voxl-opencv-3-4-6/-/blob/master/examples/april-tag-detect/april-tag-detect.cpp

    Are you requirements Python3.6.9 and OpenCV 3.X? (let me know specifics if possible).

    If so, do you requirements allow you to run your program in a Docker container on VOXL?

    Thanks!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alex123
      Contributor
      wrote on last edited by
      #3

      Yes, I have to run my program using Python3.6.9 and OpenCV 4.X.
      And it wouldn't allow running a program on Docker container on VOXL.

      1 Reply Last reply
      0
      • Chad SweetC Offline
        Chad SweetC Offline
        Chad Sweet
        ModalAI Team
        wrote on last edited by
        #4

        The easiest path is to use an Ubuntu Docker container on VOXL. https://docs.modalai.com/docker-on-voxl/

        Otherwise you will have to build the python bindings for OpenCV. We have never tried this, but it looks well documented here: https://docs.opencv.org/master/da/d49/tutorial_py_bindings_basics.html

        A 1 Reply Last reply
        0
        • A Offline
          A Offline
          Alex123
          Contributor
          wrote on last edited by
          #5

          @Chad-Sweet
          If I'll use an Ubuntu Docker container on VOXL, can you provide documentation or steps using which I can build OpenCV4.x on Python 3.6.9?

          Or a pre-build file of OpenCV4.x for Python3.6.9?

          Thanks!

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Alex123
            Contributor
            wrote on last edited by
            #6

            How can I use OpenCV4.x with Python3.6.9 using Ubuntu Docker container on VOXL?

            1 Reply Last reply
            0
            • Chad SweetC Offline
              Chad SweetC Offline
              Chad Sweet
              ModalAI Team
              wrote on last edited by
              #7

              You can use apt to install, follow any normal Ubuntu instructions

              1 Reply Last reply
              0
              • Chad SweetC Chad Sweet

                The easiest path is to use an Ubuntu Docker container on VOXL. https://docs.modalai.com/docker-on-voxl/

                Otherwise you will have to build the python bindings for OpenCV. We have never tried this, but it looks well documented here: https://docs.opencv.org/master/da/d49/tutorial_py_bindings_basics.html

                A Offline
                A Offline
                Alex123
                Contributor
                wrote on last edited by
                #8

                @Chad-Sweet
                I'm using the Ubuntu Docker container on VOXL.
                OpenCV4 in Python3 is working.

                But I'm facing issues while mounting sdcard on it.
                I'm referring to this link.

                I'm using the below command to mount sdcard.
                docker run -v /mnt/sdcard:/root/yoctohome/:rw -w /root/ roskinetic-xenial:opencv

                How can I mount a sdcard on the Ubuntu Docker container on VOXL?

                tomT 1 Reply Last reply
                0
                • A Alex123

                  @Chad-Sweet
                  I'm using the Ubuntu Docker container on VOXL.
                  OpenCV4 in Python3 is working.

                  But I'm facing issues while mounting sdcard on it.
                  I'm referring to this link.

                  I'm using the below command to mount sdcard.
                  docker run -v /mnt/sdcard:/root/yoctohome/:rw -w /root/ roskinetic-xenial:opencv

                  How can I mount a sdcard on the Ubuntu Docker container on VOXL?

                  tomT Offline
                  tomT Offline
                  tom
                  admin
                  wrote on last edited by
                  #9

                  @Alex123 You should be able to mount the sdcard directory using the following param
                  docker run -v /sdcard:/sdcard

                  A 1 Reply Last reply
                  1
                  • tomT tom

                    @Alex123 You should be able to mount the sdcard directory using the following param
                    docker run -v /sdcard:/sdcard

                    A Offline
                    A Offline
                    Alex123
                    Contributor
                    wrote on last edited by
                    #10

                    @tom
                    I've tried docker run -v /sdcard:/sdcard, but not working. It's not showing sdcard directory.

                    1 Reply Last reply
                    0
                    • tomT Offline
                      tomT Offline
                      tom
                      admin
                      wrote on last edited by
                      #11

                      @Alex123 here is the exact command I tested with on a VOXL.

                      docker run -it --rm --privileged --net=host --name roskinetic -v /home/root:/root/yoctohome/:rw -v /sdcard:/sdcard -w /root/ roskinetic-xenial:v1.0 /bin/bash

                      Can you try this?

                      1 Reply Last reply
                      0

                      Reading along? Create a free ModalAI Forum account to join in.

                      With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.

                      Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.

                      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