GithubHelp home page GithubHelp logo

hfesg / evmhr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cookiedseu/evmhr

0.0 1.0 0.0 141 KB

欧拉视频放大算法安卓(Android)端APP

License: MIT License

Java 55.18% Makefile 1.61% C++ 43.22%

evmhr's Introduction

EVMHR

Introduction

EVMHR is an Android app for detecting human heart rate by analysing the video of face taken from the front camera of the phone, it is based on the theory of Eulerian Video Magnification raised by Wu, H.-Y., et al in 2012. And the implementation of the core function is provided by Weizhou Pan in his blog article: Eulerian Video Magnification.

Here is a simple demo:

Please hold your phone steadily and make your face fill the screen, and try to use this app at a place with good lighting condition.

How to use

Android Studio

Android Studio 2.2 is recommended.

This project contains a large amount of C++ code, so we use NDK to build the native library, which will be called by android with JNI(Java Native Interface). Android Studio 2.2 provides a good compiling compatibility with C++ code, but we are not sure about the success of compilation in previous version of Android Studio.

FFmpeg

The video recorded from a phone camera was compressed by the system, while OpenCV cannot read the video codec used by Android, which will typically be avc or h.264. So we use a compiled version of FFmpeg: ffmpeg-android-java to convert the video to MJPEG format.

To use this library, make sure to have the following line in your app's build.gradle:

dependencies {
	...
	compile 'com.writingminds:FFmpegAndroid:0.3.2'
	...
}

OpenCV

This project is based on OpenCV4Android 3.1.0, you can download it from here. We only need the native folder, so copy it into \src\main\cpp.

NDK

We use NDK 12, just download it from the manager in Android Studio.

Add the following lines to your app's build.gradle:

externalNativeBuild {
	ndkBuild {
		path file("src\\main\\cpp\\Android.mk")
	}
}

If you add your own .cpp files, don't forget to add them into LOCAL_SRC_FILES

If you want to change the native interface function in C++, make sure you follow the naming rule:

Java_ + PackageName + ClassName + InterfaceName

and use InterfaceName in your java code.

License

MIT License

evmhr's People

Contributors

cookiedseu avatar

Watchers

James Cloos 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.