Face recognition using OpenCV in android?

。_饼干妹妹 提交于 2019-11-30 07:31:05
Telmo

You can always use JavaCV that is a kind of wrapper for the native OpenCV functions:

See: Face Recognition on Android

In order to get everything working you have to extract some .so files to your libs folder in the project:

Follow the instructions on this page

  1. Go to File > New > Folder, select your project as parent folder, type "libs/armeabi" as Folder name, and click Finish.

  2. Copy javacpp.jar and javacv.jar into the newly created "libs" folder.

  3. Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.6.1-android-arm.jar, and ffmpeg-2.0.1-android-arm.jar directly into the newly created "libs/armeabi" folder, without creating any of the subdirectories found in the JAR files.

  4. Navigate to Project > Properties > Java Build Path > Libraries and click "Add JARs...".

  5. select both javacpp.jar and javacv.jar from the newly created "libs" folder.

Source: https://code.google.com/p/javacv/

Include javacpp and javacv in your libs folder: https://code.google.com/p/javacv/

Find the required jars in javacpp after download and extract the required SO files (yes, you can open the jar with WinRAR)

Compile and build the code experimented in: Face Recognition on Android

And here you go! It worked for me, so I'm sure it will work for you!

In Library OpenCV.vers. for Android go to folder "samples". Sample Face-Detection for you=)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!