Igor Kostenko
Igor Kostenko

Reputation: 2874

Android FaceDetector always returns number of detected faces equals 0

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

Answers (1)

Related Questions