Closed zaykl closed 7 years ago
facepp进行过init和config吗?
试了下, 暂时这种方式是可行的, bitmap还要经过一些处理, 建议你们加个示例吧. 昨天我也在qq群反馈了
BitmapFactory.Options OPTION_RGBA8888 = new BitmapFactory.Options();
OPTION_RGBA8888.inPreferredConfig = Bitmap.Config.ARGB_8888;
OPTION_RGBA8888.inDither = false;
OPTION_RGBA8888.inMutable = true;
OPTION_RGBA8888.inPremultiplied = false;
Bitmap bitmap = BitmapFactory.decodeFile(pathName, OPTION_RGBA8888);
byte[] imageData1 = ConUtil.getGrayscale(bitmap);
Facepp.Face[] faces = facepp.detect(imageData1, bitmap.getWidth(), bitmap.getHeight(), Facepp.IMAGEMODE_GRAY);
图片处理的demo后面会有的,注意下传入检测图片的数据要和设置的图片模式要吻合