Last active
November 30, 2020 11:34
-
-
Save yektasarioglu/663b47417bc30cafd5accea63c03f02b to your computer and use it in GitHub Desktop.
Getting MLFrame
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
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
initializeAnalyzer() | |
binding?.selectImageButton?.setOnClickListener { askImageFromUser() } | |
binding?.analyzeButton?.setOnClickListener { | |
analyze(getMLFrame(selectedImageBitmap ?: return@setOnClickListener)) | |
} | |
} | |
private fun getMLFrame(bitmap: Bitmap) : MLFrame { | |
// Create an MLFrame object using the bitmap, which is the image data in bitmap format. | |
return MLFrame.fromBitmap(bitmap) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment