[英]Android FaceDetector always returns number of detected faces equals 0
Android 4.2, Windows emulator with Intel acceleration. Android 4.2,具有Intel加速功能的Windows模拟器。
I using this code and with different pictures always no face detection: 我使用此代码,对于不同的图片始终没有人脸检测:
BitmapFactory.Options BitmapFactoryOptionsbfo = new BitmapFactory.Options();
BitmapFactoryOptionsbfo.inPreferredConfig = Bitmap.Config.RGB_565;
myBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.face5, BitmapFactoryOptionsbfo);
imageWidth = myBitmap.getWidth();
imageHeight = myBitmap.getHeight();
myFace = new FaceDetector.Face[numberOfFace];
myFaceDetect = new FaceDetector(imageWidth, imageHeight, numberOfFace);
numberOfFaceDetected = myFaceDetect.findFaces(myBitmap, myFace);
What problem is it? 怎么了
This example did the same as you did: 该示例与您所做的相同:
http://trivedihardik.wordpress.com/2011/09/13/android-face-detection-example/ http://trivedihardik.wordpress.com/2011/09/13/android-face-detection-example/
Another link to try: 另一个尝试的链接:
http://www.developer.com/ws/android/programming/face-detection-with-android-apis.html http://www.developer.com/ws/android/programming/face-detection-with-android-apis.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.