An android library for detecting face in the image, and identify the crop area.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.bikcrum:FaceDetectionCrop-Android:1.0.2'
}
FaceDetectionCropfaceDetectionCrop = FaceDetectionCrop.initialize(MainActivity.this, selectedImage);
Bitmap bitmap = faceDetectionCrop.getDetectionGuideLines();
imageView.setImageDrawable(new BitmapDrawable(getResources(), bitmap));
Bitmap bitmap = faceDetectionCrop.getFaceCroppedBitmap();
// load it in imageview
imageView.setImageDrawable(new BitmapDrawable(getResources(), bitmap));