Created
June 16, 2019 11:32
-
-
Save aligkts/8b35d857b5f5d3b30f75c74e6a9cfd4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun runDetector(bitmap: Bitmap) { | |
val image = FirebaseVisionImage.fromBitmap(bitmap) | |
val options = FirebaseVisionFaceDetectorOptions.Builder() | |
.build() | |
val detector = FirebaseVision.getInstance() | |
.getVisionFaceDetector(options) | |
detector.detectInImage(image) | |
.addOnSuccessListener { faces -> | |
processFaceResult(faces) | |
}.addOnFailureListener { | |
it.printStackTrace() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment