btk_FaceFinder_putDCR中存在FaceDetector错误

int*_*ntA 4 android

我试图从相机图片中检测到一张脸.

但它总是在以下错误中结束:

错误:返回0个面,因为btk_FaceFinder_putDCR中存在错误.

我的代码:

FaceDetector fd = new FaceDetector(bmp.getWidth(), bmp.getHeight(), 1);
        Face[] faces = new Face[1];
        int nrOfFaces = fd.findFaces(bitmap565, faces);
Run Code Online (Sandbox Code Playgroud)

我看到该代码唯一的问题是,我不知道Bitmap配置,我不知道如何将Bitmap转换为Config.RGB_565格式.

有人可以帮忙吗?

ppr*_*dos 12

图像的宽度必须是均匀的.