Reputation: 497
I am trying to detect a face from a camera picture.
But it always ends up in the following error:
ERROR: Return 0 faces because error exists in btk_FaceFinder_putDCR.
My code:
FaceDetector fd = new FaceDetector(bmp.getWidth(), bmp.getHeight(), 1);
Face[] faces = new Face[1];
int nrOfFaces = fd.findFaces(bitmap565, faces);
The only problem I see with that code is, that I dont know the Bitmap Config and I dont know ho to convert a Bitmap to the Config.RGB_565 format.
Can anyone help?
Upvotes: 4
Views: 1994
Reputation: 965
As per the documentation of http://developers.android.com if the image width is not even then this exception occur.
For further detail check this link:
http://developer.android.com/reference/android/media/FaceDetector.html
Upvotes: 1
Reputation: 209
After a lot of searching, You should put your images in drawable-nodpi folder.
Upvotes: 3