Skip to content

Instantly share code, notes, and snippets.

@muhwyndhamhp
Created April 8, 2022 06:07
Show Gist options
  • Save muhwyndhamhp/1b0f4dd83b314881fa8647f7a6f9f047 to your computer and use it in GitHub Desktop.
Save muhwyndhamhp/1b0f4dd83b314881fa8647f7a6f9f047 to your computer and use it in GitHub Desktop.
val image = InputImage.fromByteArray(
bitmap?.bitmapToNV21ByteArray()!!,
bitmap!!.width,
bitmap!!.height,
screenOrientation,
InputImage.IMAGE_FORMAT_NV21
)
faceDetector.process(image).addOnSuccessListener { image ->
// Continue processing here,
// including Cropping image from BoundingBox (which available inside `image` Object above)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment