I'm currently using android.hardware.camera2 module to detect a face.
I revise my own code withe the reference
https://github.com/googlesamples/android-Camera2Basic
and
Android camera2 face recognition
However, I had the same problem as the link above. In my case, when I run the code with Galaxy S4, android 5.0 it seems to work properly (Face detection works properly) but when I run the same code with Galaxy S6, android 5.1, faces are not recognized as above link said.
How can I solve this problem? or, Is there a simple tutorial concerning face detection with camera2?
Related
I know this question has been asked before but its been a long time. Asking this question again to gather any new hacks/thoughts/approaches.
I need to access both front and back camera simultaneously.
So far I have tried implementations using android camera API (Dual Camera- by Jens) and camera2 API. Both implementations work fine on devices having hardware support(Dual Image Signal Processors) for dual camera feature.I have tested and both implementations works fine on HTC one M8(Snapdragon 801) & Xiaomi Mi4(Snapdragon 801).
Both implementations fails on Samsung s6 even though it's hardware capable (Exynos 7420 has dual ISP). Also, the default camera app on S6 supports dual camera mode.
Any ideas/advice on this ?
Thanks in advance.
Update:18/11/2015 --> Tried using the Samsung Galaxy Camera SDK but still no luck.
I had to implement the exact same thing in a previous project. I know the struggle, and I know how much code you have to write to make this work. Especially with Google providing TWO camera apis (camera and camera2).
Even though I got it working on some devices (like HTC M8) which basically had two Image Signal Processor (necessary to access both cameras at the same time), I had trouble with the Samsung devices that had this feature implemented in their native camera application.
Then I turned around and found out that Samsung provides different special APIs for its "very special" OS. What that means, is that for every special feature that Samsung has (like the finger print sensor, the S-pen, and soooo on), they provide a API for the developers to work with.
I found the SCamera API on their site here . They also provide very good documentation and it is ok to implement.
The question you need to ask yourself: is it really worth it to integrate yet another camera API in your app to make this work on Samsung devices as well? Take in consideration that the proportion of Samsung devices is really high.
My advice? Try and implement it in a different project and see how that goes. If you get it to work in a decent amount of time and it's not very complicated, then integrate it in your main project.
I hope this helps you. Have a great day and good luck!
I am using openCV 2.4.11 for face-detection purpose and have problem with the camera on my target. The code works perfectly on tablet android-4.4.2 and phone android-5.1.1, but when ever I try to execute the same code on the smart watches android-4.4.2 it doesn't work. It shows a warning saying that "it seems that your device does not support camera (or it is locked).Application will be closed"
None of the existing Android Wear devices have a camera and the message you are receiving is very descriptive of the issue.
I'm trying to develop a face recognition system for Android, and I opted to use Android 4 as it has the built in face detection API. I'm using a Samsung nexus s and despite being as up to date as possible and a really new model phone the .getMaxNumDetectedFaces() method returns 0.
Am I doing something wrong or can this phone actually just not detect faces?
I thought the face detection would be included in the Android software and not the phone specific software.
There are two different face detection APIs in Android. FaceDetectorListener which depends on getMaxNumDetectedFaces() is hardware dependent so it might not be enabled on phones even if they run the latest version of Android. FaceDetector on the other hand runs in software and is supported since Android 1 so you might try that. Another option is to install OpenCV for Android.
See also, the answers on this question: Android face detection MaxNumDetectedFaces
I have an emulator running 4.1 Android. Virtual device is set up so that it has camera emulated by the web cam. This part works fine.
However Camera.Parameters.getMaxNumDetectedFaces() always returns 0, meaning that face detection is not supported (though it works fine on static images).
Is there anything that can be done in order to enable live face detection on Android emulator? I am talking about the face detection that came with API level 14, not third party libraries.
Thanks, Viktor.
No. Unfortunately, the API 14 face detection requires hardware support.
I try to develop detection the face on the tablet Asus TF201. However, the application shuts down when I start face detection.
is there any possibility this tablet does not to support face detection ?
Thanks
FaceDetection is a software feature, so it should be supported on your Asus tablet. Have a look in the logs, you should be able to find there the source of the application crash.