【开源】AndroidFaceCropper

AndroidFaceCropper

 

使用说明:

实例话FaceCropper

1
2
FaceCropper mFaceCropper = new FaceCropper();
mFaceCropper.getCroppedImage(source);

其中getCroppedImage方法的参数可以是资源文件的int类型也可以是一个Bitmap

参数设置

主要有4个

setMaxFaces(int faces), 可以识别的最大人脸数.

setFaceMinSize(int faceMinSize), in pixels.

setFaceMarginPx(int faceMarginPx), in pixels, and for each side.

setEyeDistanceFactorMargin(float eyeDistanceFactorMargin), as a multiplier of the distance between the detected face eyes.

setDebug(boolean debug), to enable painting red circles over detected faces.

getFullDebugImage(Bitmap bitmap), to obtain a non-cropped image as the original, but with the detected faces painted, and the cropped area painted in green.

posted on 2015-04-15 09:35  wasdchenhao  阅读(196)  评论(0)    收藏  举报

导航