Reputation: 2874
Android 4.2, Windows emulator with Intel acceleration.
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?
Upvotes: 2
Views: 2253
Reputation: 1856
This example did the same as you did:
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
Upvotes: 1