uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

Using clandmark in Android app with native c++ #85

Open ithmz opened 6 years ago

ithmz commented 6 years ago

I want to use clandmark lib in my Android app but using native c++; Should I include all the .h and .cpp files in the libclandmark folder? Is the RapidXML is necessary? I have my own face detector so I don't need the OpenCV haar cascade, how do I remove them?

Thank you

uricamic commented 6 years ago

Hi @tsangz189,

yep RapidXML is necessary, as models are stored in XML files. OpenCV is not needed at all, it is used just in examples. I think you might get inspired in the CMakeLists.txt files, there you see what header and source files are needed where.

I am not very familiar with Android app development. But if it supports native c++, you might even use the CLandmark in the form of dynamically linked precompiled library?

ithmz commented 6 years ago

When built successfully, I have two static lib (libclandmark & libflandmark). Should I import both of them?

uricamic commented 6 years ago

Yep, both are required. You can also build them dynamically, just change BUILD_SHARED_LIBS CMake settings.

ithmz commented 6 years ago

I tried to build the lib using android ndk. An error apprears: 'clandmark::CDAGMaxSumSolver' must explicitly initialize the base class 'clandmark::CMaxSumSolver' which does not have a default constructor?

uricamic commented 6 years ago

Hmm, looks like some construct are not supported by the compiler anymore... I will try to look at this over weekend.

In the meanwhile, you might try to write a simple workaround for now, by creating that empty constructor which is missing.

ithmz commented 6 years ago

Yes, it's very weird. I can build and run using Cmake, but with ndk-build of Android, it shows that error. Thank you for your time