daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest May 24th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private fun faceDetect(image: Bitmap) {
  2.         val firebaseImage = FirebaseVisionImage.fromBitmap(image)
  3.         val detector = FirebaseVision.getInstance().getVisionFaceDetector(firebaseOptions)
  4.  
  5.         detector.detectInImage(firebaseImage)
  6.                 .addOnSuccessListener {
  7.                     processFaces(it)
  8.                 }.addOnFailureListener {
  9.                     it.printStackTrace()
  10.                     Toast.makeText(this, "Something bad happended. Cry in a corner.", Toast.LENGTH_SHORT).show()
  11.                 }
  12.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top