Created
November 26, 2019 06:25
-
-
Save Lavanyagaur22/0d00e6fafe59c5f74d9e85fd28fc0daf to your computer and use it in GitHub Desktop.
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
val mediaImage = image?.image | |
val imageRotation = ImageRotation.getFromValue(rotationDegrees) | |
val visionImage = FritzVisionImage.fromMediaImage(mediaImage, imageRotation) | |
/* Get the FritzVisionStyleResult by running the predictor on the vision image. | |
*/ | |
val styleResult = predictor?.predict(visionImage) | |
/* Perform UI operations accordingly. | |
*/ | |
runOnUiThread { | |
Log.d(TAG, "UI thread") | |
val bitmap = styleResult?.toBitmap() | |
image_view.setImageBitmap(bitmap) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment