Hi everyone,
For my project I need to implement part of the functions available on openMVG on android. My goal is to cross compile the whole library to android using standalone Toolchains. I've read through some of the issues and I am aware that there is already a rep for this purpose. However, i've found it very frustrating to actually make it work and documentation is a bit scarce. I have little experience with cross compilation and after 3 days trying to cross compile i haven't succeed yet.
Is there anyone familiar with this project that knows how to do this? I feel that my lack of experience is really delaying me while this should not take all this time.
As you see before I tried to ping some people that have used OpenMVG on android app before (#1326) but they did not provided any answer.
See here the thread of people that succeeded to use OpenMVG on iPhone
Personally i would've helped happily (within my abilities) if the author of #1326 had any specific questions i could answer.
Nevertheless, cross-compiling is not an Android specific issue, albeit it certainly makes it a bit more tricky. OpenMVG is cmake-based, that makes the whole process much less stressful.
For quite a long time, libraries had to adopt (and still do) a certain habit of providing a cmake toolchain descriptor designed specifically for android builds, having all the variables necessary for cmake to build Android binaries. You had to specify that as a cmake parameter: cmake -DCMAKE_TOOLCHAIN_FILE=<file>. This was a necessity because cmake had no knowledge of Android as a system and the different build tools it has, so you had to tell all the directives through these descriptor files.
Fortunately, it seems the guys at Kitware began to notice the ever-growing need for cmake projects to run on Android, so they decided to do the heavy lifting themselves by dealing with all the variables natively, without the need of such descriptor files. Now cmake knows what Android is when you desire to build for it, and you only need to provide the variables specific to your needs. You can read more about it here
TL;DR: The way you build for Android is the same you build for Linux. The only difference is the parameters you provide. The aformentioned link even has a cmake invocation example if you just want to experiment with it. Let me know if you hit any issues.
Hi,
I managed to cross-compile everything, including software, using Oliver001/openMVG rep.
In the end it is quite simple, despite the fact that documentation might not be that clear all the time.
Thanks
Glad it worked out!
@didi16 Would you like to help to upgrade the documentation with an Android section?
Thx @didi16 and @donlk for your messages.
@pmoulon Yes, I would be quite glad to contribute!
@didi16 I would be happy to work with you on extending the documentation toward adding an Android section. Feel free to ping me.
@pmoulon @didi16 @donlk
Hi all, good day, Im facing problem of the integration of openMVG with android studio, can you guys help me in solve this problem? Thanks.
What problem are you facing? please elaborate so we can help you.
@pmoulon
my problem is how can i integrate openMVG in android studio? Can you provide me some step to doing so? thanks
Most helpful comment
Hi,
I managed to cross-compile everything, including software, using Oliver001/openMVG rep.
In the end it is quite simple, despite the fact that documentation might not be that clear all the time.
Thanks