Face recognition in Android without opencv - android

I wanted to develop a face recognition app in android. While searching, all i come up with is, the Opencv method, which i think is using C or C++. Can someone post the code or method for android? I am a newbie, so trying new stuff. Thanks!

OpenCV indeed uses C and C++ (and also Python), however you can try and use a java wrapper for the opencv library. Here is a nice wrapper.

If you have a newer phone/tablet, you can use the face recognition API in Android 14+. Check out Camera.Face and Camera.FaceDetectionListener
Also make sure you call: getMaxNumDetectedFaces to make sure you device supports the API.

Related

Face detection using Android camera.?

Is it possible to scan a passport image using mobile camera and save his details and later detect that person using an Android mobile camera and fetch his details ?(Face detection)
I'd suggest you to use OpenCV Recognition API.
This API can let you save face data of a person and then use it to match with the new face data that you can get.
There are two ways to go about it
Use OpenCV for Android
Use JavaCV
OpenCV for Android is more fully supported than JavaCV. Follow Google's instructions to install Eclipse, the Android SDK and NDK (don't forget the NDK!)
Afterwards, follow this tutorial to install openCV. Try out the sample applications.
Alternatively, you can try using JavaCV instead of OpenCV for Android. This means you won't need to setup the Android NDK. It also means you won't need to write any C++. I didn't try this. But I suspect it is easier.
The downside is: it doesn't support everything OpenCV does.

Difference between writing OpenCV for Android(Mobile devices) and writing openCV for Desktop Application(OpenCV 2.4.3 usingC++)

I was doing face detection and recognition project.I am about to finish the application which does detection and recognition. I want to make this application portable like a one that works on Mobile devices. I am new to writing codes using OpenCV on Androids. What is the difference between OpenCV codes for Android phones and OpenCV written for Desktop application using C++ on Visual Studio like VS 2010 with Open CV 2.4.3?(What is the difference between Codes between OpenCV on Android and OpenCV for Desktop.Do they both use the same language?)
I am familiar with Android(basics) and true that Android applications are written with Java. And i read somewhere online that OpenCV native codes can be included to Android with Java Native Interface.
I am a bit confused here that can i use the code i have written using C++ Open CV for my Android Application with out modification.If not what Kind of modification do i have to make on my face detection and recognition using C++ for Desktop to make it work for Android phones?
First off, there exists an OpenCV4Android version of Android, with tutorials on how to use it.
Then, as you pointed out, you can code both in Java or C++ on Android. OpenCV4Android can be used in Java [1] or in C++ [2]. In your case, it would probably be more convenient to re-use your C++ code, using the Native Development Kit for Android. If you manage to use the NDK, you will be able to re-use your C++ code by calling it from your Android app.
Here are the few steps I would advise you to follow:
Read about the Native Development Kit
Read about the Java Native Interface
Try to create a sample Android app using C++ (You might find this quickstart tutorial useful)
Try to integrate OpenCV to your sample [2]
Include your existing C++ code in your sample
I hope it will help.
I used OpenCV on Android using both Java and C++. From my experience, I can suggest to use Native C++ code for image processing application. C++ codes are more efficient and can give more identical result as compared to Java code.
Although OpenCV has the Java version also, but in the back-end, it is using Native code for running Java.
The speed of execution in Native code will be much high as compared to Java code.

Cannot implement SURF in Android using JavaCV

I am trying to develop a simple Android app that will get the current frame from the camera on the phone using PreviewCallback. Then perform SURF feature detection and extraction using the ObjectFinder provided in the JavaCV project. However I keep getting an Exception. The same program works on my PC.
This is probably due to SURF being a patented algorithm and this is causing issues.
Thus can somebody provide me an alternative for this in JavaCV. Any help would be appreciated. Thank you.
Your assumptions are correct. SURF/SIFT being a patented one, it has been removed from the latest opencv SDK. As an alternative you can try to use the androidobjectrecognition methods used in the same. You can checkout its source from: https://code.google.com/p/androidobjectrecognition/source/checkout
I tried use ObjectFinder too. But after unsuccessful attempts I found this code. After little corrective it work for me in android.
Basil is right, but there are many new features to find images (freak, orb, brisk...).

Include OpenCV in android application package

I need to work on detecting edges from an Image, I'm using Canny algorithm for that.
Since OpenCV for android is available 2.4.2 while i'm trying to run examples it says.
"OpenCV Manager is not installed, please try to install it." after install it from the market it is working fine.
But if i want the user's to install my application so that they don't have to install another .apk for using my application.
-> How to use openCV without without asking for another application i.e. manger should be pre installed.?
-> is there any way i can use Canny algorithm for edge detection without OpenCV any good angorithm tutorials for implementing in in android.?
You might find information about this on the OpenCV webpage. This said, this is deprecated and OpenCV advises not to do this in production. The manager actually allows the user to download the OpenCV library once for all. Then, your application will be much smaller!
About not using OpenCV, you can try FastCV (as Aaron suggested), but it seems overkill for your application (and it requires you to be familiar with NDK development). With OpenCV, in the other hand, you can code either in java (by the way, have a look at JavaCV) or using the NDK.
Finally, if you only need a Canny Edge detector and don't want to use a library, you can try to write it yourself. The related page on Wikipedia should be enough for this (I could do it a few years ago as an exercise).
Have you looked into Qualcomm's FastCV? It offers some of the more common image processing algorithms offered in libraries like OpenCV. They also have a pretty cool augmented reality API called Vuforia.
Fair warning, the support documentation isn't that great and it requires that you are familiar with NDK development.
https://developer.qualcomm.com/mobile-development/mobile-technologies/computer-vision-fastcv

Min3d and Andar

I would like to load a model using Min3d and Andar but since i am new to Android and Java i am asking you if you have an example or something how to do this. I searched all over the internet and didn't found nothing.Please help me.
What i personally believe is that if one is targeting Android, one can use FLARToolkit. It's written using Adobe Flex. Flex applications can be run on Android's AIR. If you are particular about using Java only, try NyARToolkit

Categories

Resources