Android bitmap Face Cropper

Overview

AndroidFaceCropper

Android bitmap Face Cropper

Link to sample apk and jar

##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.

You might also like...
A robust native library loader for Android.
A robust native library loader for Android.

ReLinker A robust native library loader for Android. More information can be found in our blog post Min SDK: 9 JavaDoc Overview The Android PackageMan

A lightning fast, transactional, file-based FIFO for Android and Java.

Tape by Square, Inc. Tape is a collection of queue-related classes for Android and Java. QueueFile is a lightning-fast, transactional, file-based FIFO

Joda-Time library with Android specialization

joda-time-android This library is a version of Joda-Time built with Android in mind. Why Joda-Time? Android has built-in date and time handling - why

a SharedPreferences replacement for Android with multiprocess support
a SharedPreferences replacement for Android with multiprocess support

DEPRECATED - no longer actively maintained Tray - a SharedPreferences replacement for Android If you have read the documentation of the SharedPreferen

OpenKeychain is an OpenPGP implementation for Android.
OpenKeychain is an OpenPGP implementation for Android.

OpenKeychain (for Android) OpenKeychain is an OpenPGP implementation for Android. For a more detailed description and installation instructions go to

UPnP/DLNA library for Java and Android

Cling EOL: This project is no longer actively maintained, code may be outdated. If you are interested in maintaining and developing this project, comm

WebSocket & WAMP in Java for Android and Java 8

Autobahn|Java Client library providing WAMP on Java 8 (Netty) and Android, plus (secure) WebSocket for Android. Autobahn|Java is a subproject of the A

:iphone: [Android Library] Get device information in a super easy way.
:iphone: [Android Library] Get device information in a super easy way.

EasyDeviceInfo Android library to get device information in a super easy way. The library is built for simplicity and approachability. It not only eli

Collection of source codes, utilities, templates and snippets for Android development.

Android Templates and Utilities [DEPRECATED] Android Templates and Utilities are deprecated. I started with this project in 2012. Android ecosystem ha

Comments
  • Unable to import via Gradle Wrapper

    Unable to import via Gradle Wrapper

    Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html

    Please read below process output to find out more:

    11:55:29.791 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252]

    A fatal error has been detected by the Java Runtime Environment:

    EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefd7c23cd, pid=5380, tid=9004

    JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)

    Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode windows-amd64 compressed oops)

    Problematic frame:

    C [WS2_32.dll+0x23cd]

    Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

    An error report file with more information is saved as:

    C:\Users\AZ.gradle\daemon\1.12\hs_err_pid5380.log

    If you would like to submit a bug report, please visit:

    http://bugreport.sun.com/bugreport/crash.jsp

    The crash happened outside the Java Virtual Machine in native code.

    See problematic frame for where to report the bug.

    Consult IDE log for more details (Help | Show Log)

    opened by AizazZaidee 1
  • Return a

    Return a "complete" transformation key.

    Using a transformation key with the current FaceCropper config, allows us to properlly use Picasso's cache.

    To support this, I had to add a getSizeMode() method to FaceCropper. The enum was already public, so a getter makes sense.

    Also asked for a RGB_565 bitmap in Picasso's RequestCreator, so we don't have to convert it later, causing extra GC.

    opened by sergio91pt 1
Owner
Lafosca
Hi there. We make beautiful mobile apps.
Lafosca
Android library which makes it easy to handle the different obstacles while calling an API (Web Service) in Android App.

API Calling Flow API Calling Flow is a Android library which can help you to simplify handling different conditions while calling an API (Web Service)

Rohit Surwase 19 Nov 9, 2021
Gesture detector framework for multitouch handling on Android, based on Android's ScaleGestureDetector

Android Gesture Detectors Framework Introduction Since I was amazed Android has a ScaleGestureDetector since API level 8 but (still) no such thing as

null 1.1k Nov 30, 2022
Use Android as Rubber Ducky against another Android device

Use Android as Rubber Ducky against another Android device

null 1.4k Jan 9, 2023
Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Shahid Iqbal 4 Nov 29, 2022
A util for setting status bar style on Android App.

StatusBarUtil A util for setting status bar style on Android App. It can work above API 19(KitKat 4.4). 中文版点我 Sample Download StatusBarUtil-Demo Chang

Jaeger 8.8k Jan 6, 2023
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Jake Wharton 9.8k Dec 30, 2022
Java implementation of a Disk-based LRU cache which specifically targets Android compatibility.

Disk LRU Cache A cache that uses a bounded amount of space on a filesystem. Each cache entry has a string key and a fixed number of values. Each key m

Jake Wharton 5.7k Dec 31, 2022
a simple cache for android and java

ASimpleCache ASimpleCache 是一个为android制定的 轻量级的 开源缓存框架。轻量到只有一个java文件(由十几个类精简而来)。 1、它可以缓存什么东西? 普通的字符串、JsonObject、JsonArray、Bitmap、Drawable、序列化的java对象,和 b

Michael Yang 3.7k Dec 14, 2022
gRPC and protocol buffers for Android, Kotlin, and Java.

Wire “A man got to have a code!” - Omar Little See the project website for documentation and APIs. As our teams and programs grow, the variety and vol

Square 3.9k Dec 31, 2022
✔️ Secure, simple key-value storage for Android

Hawk 2.0 Secure, simple key-value storage for android Important Note This version has no backward compatibility with Hawk 1+ versions. If you still wa

Orhan Obut 3.9k Dec 20, 2022