Upload
prada-hsiung
View
658
Download
0
Embed Size (px)
Citation preview
The Face Detection Functions on Android PRADA - Android Dev at PicCollage
PicCollage
Why FaceDetection is important?
Snapchat Snow
Because it’s funny
Never Alone
https://play.google.com/store/apps/details?id=com.cardinalblue.android.neveralone
PicCollage
Before After
How to implement it on Android?
Assumption only discuss client-side calculation.
android.media.FaceDetector
http://developer.android.com/intl/zh-tw/reference/android/media/FaceDetector.html
android.media.FaceDetector.Face float getFaceDistance() void getMidPoint(PointF)
x
android.hardware.Camera.FaceDetectionListener
http://developer.android.com/intl/zh-tw/reference/android/hardware/Camera.FaceDetectionListener.html
Camera.Face PointF leftEye, rightEye, mouth Rect rect
x x
x
Google Mobile Vision SDK
Landmark
http://android-developers.blogspot.tw/2015/08/face-detection-in-google-play-services.html
gms.vision.face.Face List<Landmark>getLandmarks()
Smile Mode
gms.vision.face.Face float getIsLeftEyeOpenProbability() float getIsRightEyeOpenProbability() float getIsSmilingProbability()
Face Rotationgms.vision.face.Face float getEulerY() float getEulerZ()
It’s Beta Version
Samsung S4 didn’t work https://github.com/googlesamples/android-vision/issues/39
https://github.com/googlesamples/android-vision/issues/21Preview/Capture Resolution is bad
Open CV
You lost one man
Nobody Blink
?
OpenCV for Android
Sample CodecascadeFile = new File(cascadeDir, "lbpcascade_frontalface.xml"); nativeDetector = new DetectionBasedTracker( cascadeFile.getAbsolutePath(), 0); nativeDetector.setMinFaceSize(FACE_SIZE); MatOfRect faces = new MatOfRect(); nativeDetector.detect(PREVIEW_BUFFER, faces); Rect[] facesArray = faces.toArray();`
https://github.com/bearprada/android_camera_with_opencv_sample
Summarymedia.Face Camera.Face gms.vision.face Open CV
footprint 0MB 0MB ~85KB ~20MB💩
camera integration x 💩 o o o
customisable 🌟 🌟 🌟🌟 🌟🌟🌟
easy to use 🌟🌟🌟 🌟🌟🌟 🌟🌟 🌟
min-SDK version 1 14 💩 9 9
Information 🌟 🌟 🌟🌟 🌟🌟🌟
Thanks