intA
intA

Reputation: 497

FaceDetector error exist in btk_FaceFinder_putDCR

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

Answers (4)

Rahil Ali
Rahil Ali

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

Deepanshu
Deepanshu

Reputation: 209

After a lot of searching, You should put your images in drawable-nodpi folder.

Upvotes: 3

pprados
pprados

Reputation: 1127

The width of the image MUST be even.

Upvotes: 12

door
door

Reputation: 11

Bitmap bitmap565 = bmp.copy(Bitmap.Config.RGB_565, true);

Upvotes: 1

Related Questions