臉 - the face detection functions on android
TRANSCRIPT
![Page 1: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/1.jpg)
The Face Detection Functions on Android PRADA - Android Dev at PicCollage
![Page 2: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/2.jpg)
PicCollage
![Page 3: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/3.jpg)
Why FaceDetection is important?
![Page 4: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/4.jpg)
Snapchat Snow
Because it’s funny
![Page 5: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/5.jpg)
![Page 6: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/6.jpg)
Never Alone
https://play.google.com/store/apps/details?id=com.cardinalblue.android.neveralone
![Page 7: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/7.jpg)
PicCollage
Before After
![Page 8: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/8.jpg)
How to implement it on Android?
![Page 9: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/9.jpg)
Assumption only discuss client-side calculation.
![Page 10: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/10.jpg)
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
![Page 11: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/11.jpg)
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
![Page 12: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/12.jpg)
Google Mobile Vision SDK
![Page 13: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/13.jpg)
Landmark
http://android-developers.blogspot.tw/2015/08/face-detection-in-google-play-services.html
gms.vision.face.Face List<Landmark>getLandmarks()
![Page 14: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/14.jpg)
Smile Mode
gms.vision.face.Face float getIsLeftEyeOpenProbability() float getIsRightEyeOpenProbability() float getIsSmilingProbability()
![Page 15: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/15.jpg)
Face Rotationgms.vision.face.Face float getEulerY() float getEulerZ()
![Page 16: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/16.jpg)
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
![Page 17: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/17.jpg)
Open CV
![Page 18: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/18.jpg)
You lost one man
![Page 19: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/19.jpg)
Nobody Blink
![Page 20: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/20.jpg)
?
![Page 21: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/21.jpg)
OpenCV for Android
![Page 22: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/22.jpg)
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
![Page 23: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/23.jpg)
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 🌟 🌟 🌟🌟 🌟🌟🌟
![Page 24: 臉 - The Face Detection Functions on Android](https://reader034.vdocuments.net/reader034/viewer/2022052405/58a19e071a28ab97118b6ff1/html5/thumbnails/24.jpg)
Thanks