Android的人脸检测MaxNumDetectedFaces [英] Android face detection MaxNumDetectedFaces

查看:1769
本文介绍了Android的人脸检测MaxNumDetectedFaces的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我刚刚升级我的平板电脑(原华硕变压器)到Android 4.0.3版本生成使用人脸检测一个应用程序。但每次我启动它,并尝试启动人脸检测我得到的logcat这个错误:

So I just upgraded my tablet (original asus transformer) to android version 4.0.3 to build a app using face detection. But every time i launch it and try to start face detection i get this error in logcat:

E/AndroidRuntime(1755): java.lang.IllegalArgumentException: invalid face detection type=0

我在读这意味着0面能够被检测或支持的文件,但是这是否意味着我的设备不能识别脸部都还是什么我可以改变?同时它使用相机背面,将其更改为其他摄像头改变什么?我一直在尝试这样做,但我无法弄清楚如何,该项目的即时通讯试图运行可以在这里找到:

I read in the documents it means 0 faces are able to be detected or supported but does this mean my device cant detect faces at all or is it something i can change? Also its using the back camera, would changing it to the other camera change anything? I've been trying to do that but i cant figure out how, the project im trying to run can be found here:

https://docs.google.com/open?id=0B2Nu5U2Cz81qZExGQ25sWVdRd21IOExUUTZsZzFoZw

这是这太问题: 使用Android摄像头

from this SO question: Android face detector using android camera

推荐答案

您应该先调用getMaxNumDetectedFaces(),看看你的设备支持它。返回值应> 0,如果它的支持。就像我在previous问题中提到,该设备摄像头模块和驱动程序也必须支持它。

You should first call getMaxNumDetectedFaces() to see if your device supports it. The return value should be > 0 if its supported. Like I mentioned in your previous question, the device camera module and drivers have to also support it.

<一个href="http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getMaxNumDetectedFaces" rel="nofollow">http://developer.android.com/reference/android/hardware/Camera.Parameters.html#getMaxNumDetectedFaces()

这篇关于Android的人脸检测MaxNumDetectedFaces的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆