Last active
November 30, 2020 11:06
-
-
Save yektasarioglu/4ba7baa82a0354209289af183c0b0ebd to your computer and use it in GitHub Desktop.
Start Analyzing
This file contains hidden or 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 analyze(frame: MLFrame) { | |
// Create a task to process the result returned by the image segmentation analyzer. | |
val task: Task<MLImageSegmentation> = analyzer?.asyncAnalyseFrame(frame)!! | |
// Asynchronously process the result returned by the image segmentation analyzer. | |
task.addOnSuccessListener { | |
// Detection success. | |
Log.i(TAG, "Success - Result is $it") | |
configureAfterImage(it.foreground) | |
}.addOnFailureListener { | |
// Detection failure. | |
Log.e(TAG, "Failure - Exception is $it") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment