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.
Related
I'm wondering if the Sony Camera API has parts that are only supported by certain versions of Android.
I have the latest firmware (1.04) on my a6500 and running Android 7 on LineageOS (successor of CyanogenMod) for the Samsung S5 (KLTE version). This is what I get in my Play Memories app:
The shutter button works and images download to the phone. But that's it.
Additionally, when I use another app called DSLRDashboard, the settings show up and can be changed on the app, but they don't get changed or applied on the camera, and this is in full manual mode on the camera. Other modes don't work either.
What could be causing this? What would need to be added into a 3rd party ROM like LineageOS to get this working?
Really hoping that the official Sony developers that roam this site will be able to chime in.
So, a bit of a snafu on my part.
It's not enough to update just the firmware on the Sony camera. The Remote Control app installed in the camera must also be updated as well, which means hooking the camera up to WiFi and downloading the updates for that app. With that done, all the settings appear in the phone app and can the changed.
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?
I am creating an application that connects to the phone camera from native code.
This works great on my phone.
The problem is that when i try to do the same thing with android emulator, there is
no "/dev/video" to connect to (i know the camera is connected because i am able to open it
using the camera app).
Does anyone know if there is another way i can connect to the camera from native code?
/dev/video0 is, in terms of Android, an implementation detail, and not guaranteed to be present on any device or emulator.
Emulator support for camera is very limited, see for example Android webcam enable in emulator
There is no official native camera API on Android, so there's no guaranteed to work way of doing this.
For maximum compatibility, use the Java API and send the image data to native code for processing, if necessary.
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
How can I detect programmatically if a phone has a camera ?
PackageManager#hasSystemFeature(String) - pass PackageManager.FEATURE_CAMERA as the argument.
All Android compliant phones have to have a camera installed if they claim to run Android version 1.6 or higher. See http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/de//compatibility/android-1.6-cdd.pdf for the device compatiblity program.
Sadly there's no 1.5 ccd to be found anywhere. I'm however pretty sure that all currently available 1.5 devices do indeed have a camera. For tablets running 1.5 i'd not be that sure.