GithubHelp home page GithubHelp logo

yindongqing / android-clm-tracker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ndepalma/android-clm-tracker

0.0 1.0 0.0 702 KB

Real time, native, deformable face tracking for Android. This is a proof of concept.

License: Other

Makefile 0.53% C++ 93.40% Java 6.08%

android-clm-tracker's Introduction

android-clm-tracker

Inspired by the performance of native OpenCV code for android, this sample is a straight forward port of OpenCV's face detector sample combined with Kyle McDonald's maintained C++ FaceTracker code that was originally proposed by Jason Saragih.

It is available free for non-commercial use, and may be redistributed under these conditions. Please see license.md for complete details. For commercial use, request a quote.

Getting it running

These instructions have been tested on Ubuntu 12.04 Linux. I suspect it will work on other architectures. Modify as necessary.

  1. Ensure that you have installed what is needed to do OpenCV development on Android. Instructions are here. You should only need address the sections under the heading Manual environment setup for Android development and Native development in C++.
    • Note: I have had success with the Android SDK 2.0 when you are installing the SDK from android-manager.
  2. Clone this repository by running git clone git://github.com/ndepalma/android-clm-tracker.git.
  3. Import the OpenCV library into your eclipse workspace.
    • You'll find basic instructions here.
    • See the section under the head Import OpenCV library and samples to the Eclipse
  4. Import the project into eclipse by right clicking in the package explorer and selecting Import
    • Accept the default settings and project name.
  5. Setup the compilation environment
    • Modify the file jni/Android.mk. Change the line include /home/nd/and_cv/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk to point to your OpenCV makefile in the Android OpenCV.
    • Modify the file jni/Application.mk. Change the line APP_CPPFLAGS := -frtti -fexceptions -I/home/nd/projects/android-clm-tracker/jni/include/ to point to the absolute path of your android-clm-tracker jni/include directory.
    • Right click on the project properties and set up the project to be dependent in the C++ build on the OpenCV Library you imported in Step 3. In the file project.properties, it should contain a line that looks something like: android.library.reference.1=../OpenCV Library - 2.4.9 after this step is completed successfully.
  6. Build the .so file by changing to the directory of your android-clm-tracker and running ndk-build -B.
  7. Install OpenCV apk to your phone. From this website, find the apk in the OpenCV SDK and install it using: <Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.9_Manager_2.18_armv7a-neon.apk
  8. Clean and rebuild your eclipse project. There shouldn't be any errors at this point.
  9. Deploy to an attached phone.

Errata:

  • Some people have had trouble building the APK. If this is the case, go to your project android build properties and uncheck "Is library". You'll know it because you'll think to yourself "This must refer to OpenCV being a library. Geez, this is a big misunderstanding!"
  • If it keeps asking you to install OpenCV Manager and you have - make sure your tablet has the NEON extensions. Find your tablet online and look up the processor. Android apparently lets you install native libraries that aren't for your processor. So make sure that when you install OpenCV and you build your jni (in the android.mk), you are targetting the right processor for your tablet. I have assumed an ARM processor with the NEON (ARMs SIMD Co-processor) extensions.

Major credit for this project goes primarily to Jason Saragih for the original algorithm and code, Kyle McDonald for maintaining the C++ code and mediating the different FaceTracker spin-off projects, and to the OpenCV team who originally ported OpenCV to Android. This project is meant to be a proof of concept and, as such, can be extended to your project as needed.

android-clm-tracker was forked and modified from the original c++ source at Kyle McDonald's FaceTracker github.

android-clm-tracker's People

Contributors

ndepalma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.