Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using OpenCV for Linux and Android



  • Hello everyone,

    I've built opencv for Linux and managed to use it to make an application on computer but i would like to run the application also on Android devices.

    So my question is, since Qt is a cross-platform framework, is it possible to run opencv applications simply on Android or should i build opencv again for android ??
    Because all i found on the internet was some sort of opencv android sdk like this one which doesn't include CMakeList file, that's why i couldn't compile it with CMake.

    Can anyone help me please or give me a helpful link for the setup ?


  • Lifetime Qt Champion

    @rami_95 I think you will have to build OpenCV for Android.
    Take a look at https://opencv.org/android/



  • @jsulm Thank you very much 😃



  • @rami_95 you may want to check Amin Ahmadi's blog regarding build OpenCV for Android yourself, and more important chcking out some examples about integrating Qt and OpenCV for such platform.



  • @Pablo-J.-Rogina Thank you very much Pablo 😃 the blog was really helpful and explained every step.
    One last problem remained .. the setup breaks at 38% when building dependencies for core. It seems that some files may have a bug but i really doubt about that.
    The errors are:

    • 'to_string' is not a member of 'std'
    • control reaches end of non-void function [Werror=return-type]

    I'll try the version of OpenCV that Amin Ahmadi recommended in the blog and hope that it works.


Log in to reply