Ask Your Question

Revision history [back]

Using OpenCV on MbedOS

I would like to use OpenCV 4.3.0 on an MbedOS application. The most convenient way I think this could be done would be to natively compile the source code with Mbed-CLI. However, it's not straightforward to do this as the source code on Github in opencv/modules is structured very differently from how the code is supposed to be run. Attempting to use this source directly, I ran into errors such as a missing "opencv_modules.hpp" file and a missing "cvconfig.h" file, and manually adding those files resulted in more errors. The advice I'm looking for is how to build OpenCV from source using Mbed-CLI or Mbed Studio.

I also tried following the cross-compile instructions ( However, I'm not sure how the resulting binaries and static libraries can be used with Mbed-CLI in my project. Advice on that would also be appreciated.

I tried googling this and apparently it's not a very common use case as there are few relevant hits. If anyone has one, an end-to-end tutorial on installing OpenCV on MbedOS would be appreciated. Thanks.