Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FaceDetector error exist in btk_FaceFinder_putDCR

Tags:

android

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?

like image 835
intA Avatar asked Dec 03 '22 06:12

intA


2 Answers

The width of the image MUST be even.

like image 99
pprados Avatar answered Jan 04 '23 12:01

pprados


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

like image 21
Deepanshu Avatar answered Jan 04 '23 14:01

Deepanshu