dlib-face-recognition-android icon indicating copy to clipboard operation
dlib-face-recognition-android copied to clipboard

Building for armeabi-v7a

Open blackmenthor opened this issue 8 years ago • 5 comments

Hi Gaurav! cool projects u did right there, helped me on my work. but, i can't get it to work with different ABI version.

my Application.mk is here NDK_TOOLCHAIN_VERSION := clang APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 #APP_ABI := arm64-v8a APP_CPPFLAGS := -std=c++11 -frtti -fexceptions APP_PLATFORM := android-14 APP_STL := gnustl_static APP_CFLAGS+=-DDLIB_NO_GUI_SUPPORT=on #APP_CFLAGS+=-DDLIB_PNG_SUPPORT=off #APP_CFLAGS+=-DDLIB_JPEG_SUPPORT=on #APP_CFLAGS+=-DDLIB_JPEG_STATIC=on

produces the error no member named 'round' in namespace 'std'

and i figured, the workaround is to change APP_STL to c++_static or c++_shared

but it produces another error in

dlib-face-recognition-android-master/third_party/opencv/jni/../libs/armeabi-v7a/libopencv_imgcodecs.a(loadsave.cpp.o):loadsave.cpp:function std::vector<unsigned char, std::allocator >::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator > >, unsigned int, unsigned char const&): error: undefined reference to 'std::__throw_length_error(char const*)'

do u have any idea? or this is an issue with DLIB's code?

blackmenthor avatar Mar 10 '18 06:03 blackmenthor

I think this is an opencv issue with c++11.

The problem is dlib 19 uses c++11 features but the opencv library can't compile with c++11.

So don't use c++11. 'std::round' is a c++11 feature so you have to figure out a workaround

So don't change APP_STL but try to make small changes or write your own functions for say 'std::round' in dlib files.

let me know if there is any problem

gv22ga avatar Mar 10 '18 13:03 gv22ga

Hi Gaurav,

Thanks for the answer, i found another problem. When i add more than one person in the database, the recognition became more prone to error.

Let's say there's person A and B in the database, when i detect person A, the dialog says two people found, A and B at the same time.

Have u ever experienced this? thanks

blackmenthor avatar Mar 12 '18 12:03 blackmenthor

Hi Angga,

You are right. It is recognizing multiple people.

It used to work correctly before. I will look into this when I get time.

gv22ga avatar Mar 12 '18 16:03 gv22ga

See if changing the threshold in this line do any good https://github.com/gv22ga/dlib-face-recognition-android/blob/4bd0319ccce2277fca3df4387c7ca340a7b2e498/jni/jni_recognition/recognizer.h#L181

gv22ga avatar Mar 12 '18 17:03 gv22ga

Using android-ndk-r16b will solve all the Issues.

Ratnadeep22 avatar Oct 31 '18 04:10 Ratnadeep22