Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

wearebase/dlib-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dlib-android

Purpose

  • Port dlib to Andriod platform

  • You can build it to dynamic or static library for Android. You can also build dlib's sample to Android executable file.

  • You can refer to dlib-android-app which demonstartes dlib-android features

Grab the source

$ cd ~
$ git clone --recursive https://github.com/tzutalin/dlib-android.git

Prerequisites

  • Download Android-NDK from Android website.

    After downloading, go to the directory to which you downloaded the package to extract it

    $ chmod a+x android-ndk-r10e-linux-x86_64.bin

    $ ./android-ndk-r10e-linux-x86_64.bin

    Export ANDROID_NDK_HOME in ~/.bashrc $ vim ~/.bashrc

    export ANDROID_NDK_HOME=[/to/your/path]/android-ndk-r10e

    export PATH=$PATH:$ANDROID_NDK_HOME

  • Install Android Debug Bride (ADB). You can download it via Android SDK Manager or $ sudo apt-get install android-tools-adb

  • [Optional] You can download a specific Android-OpenCV from http://opencv.org/downloads.html. Download the version and copy the folders in native SDK to dlib-android/opencv

  • Prepare a Android device for test

Build and Run

You can change the compiler architecture in dlib-android/jni/Application.mk

Build executable files and shared library, and push the executable files to Android devices.

$ cd [$dlib-android]

Run a test daemon sample on your arm devices
$ python build_push.py --test true

Copy the shared lib to your Android project
$ python build_push.py --android_project dlib-android-appliciton/dlib/src/main/jniLibs/

You can build only (Optional)

$ ndk-build -j 2

You can also try to build the libraray and Android app together using Android stduio

Please refer to dlib-anroid-app

Write JNI and build shared library for Android Java application

There are examples in jnilib_ex

There is a sample app to demonstrate the result. dlib-android-app

Do you want to contribute

If you have any improvement or you've found any bug, send a pull request with the code

###Notes:

You can also try to build the libraray and Android app together using Android stduio

Future task

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published