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

ModalAI Forum

  1. ModalAI Support Forum
  2. General Questions
  3. Executing custom opencv c++ code

Executing custom opencv c++ code

Scheduled Pinned Locked Moved Unsolved General Questions
2 Posts 2 Posters 628 Views
  • 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.
  • zebra meZ Offline
    zebra meZ Offline
    zebra me
    wrote on last edited by
    #1

    Hello,

    I would like to write my custom opencv c++ code and deploy in voxl but not sure how to go about doing it, such as how/where to change the code, and how to compile, and deploy?
    Possible to guide me or direct me to any reference materials to follow along?

    Thanks in advance.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi,

      You'll want to make your own project that builds a package that can be deployed to a voxl. Our projects generally follow a four-script system.

      1. install_build_deps.sh The script that install the build dependencies of a project. If you're writing an opencv process for voxl you'll probably need voxl-opencv and libmodal-pipe at the very least to get your code to work. (If you haven't already, check out our docs on our pipe architecture to see how to grab camera frames in userspace).

      2. build.sh The script that actually builds the codebase that you're using, will set up a cmake toolchain to make sure that you're building with the right architecture/gcc version and put all of the build files in a build directory for packaging.

      3. make_package.sh The script that bundles all of the built files, as well as any config/other files that your project will use into a standard debian or opkg package (opkg for voxl1 or debian for voxl2/rb5)

      All three of those scripts should be run inside of the voxl-cross docker image that we've built as our primary build environment; it has all of the toolchains that you may need baked in, as well as the correct gcc versions for our different platforms.

      1. deploy.sh This script deploys the package that you've built to voxl and installs it, oputting any binaries that you've generated in the correct location where you can run them from the command line. This script is usually run outside of the docker image since the image does not have adb installed by default, but can be run inside of the image if you're deploying over ssh instead of adb.

      Finally, Since you're building an opencv project, I'd strongly recommend that you look at our voxl-camera-calibration package. This is a very good example of how to use libmodal-pipe to get camera images, and then pass them off to opencv (in this case the calibration routines) for processing. The project also have fully flushed out versions of all of the aforementioned scripts that you can copy into your project as a good starting point.

      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