Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lafosca/AndroidFaceCropper
Android bitmap Face Cropper
https://github.com/lafosca/AndroidFaceCropper
Last synced: 11 days ago
JSON representation
Android bitmap Face Cropper
- Host: GitHub
- URL: https://github.com/lafosca/AndroidFaceCropper
- Owner: lafosca
- License: apache-2.0
- Created: 2014-03-28T18:22:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-31T14:30:57.000Z (over 10 years ago)
- Last Synced: 2024-08-02T09:29:06.142Z (3 months ago)
- Language: Java
- Size: 1.37 MB
- Stars: 448
- Watchers: 37
- Forks: 94
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - AndroidFaceCropper - Android bitmap Face Cropper (etc)
- awesome - AndroidFaceCropper - Android bitmap Face Cropper (etc)
README
AndroidFaceCropper
==================Android bitmap Face Cropper
[Link to sample apk and jar](https://github.com/lafosca/AndroidFaceCropper/releases/tag/1.1)
##Usage
To crop faces automatically, you have to instantiate an object of `FaceCropper` class in that way:FaceCropper mFaceCropper = new FaceCropper();
mFaceCropper.getCroppedImage(source);
`getCroppedImage` method supports `int` argument as a drawable resource, or directly a `Bitmap`.##Configuration
There are 4 important methods to configure its behavior:`setMaxFaces(int faces)`, to adjust the maximum number of faces to be recognized.
`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.