Created
February 22, 2018 07:30
-
-
Save ashwin-sp/49c512927a3b6a652f33edcdef49b9e6 to your computer and use it in GitHub Desktop.
This file contains 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 onImageAvailable(reader: ImageReader?) { | |
lateinit var bitmap: Bitmap | |
reader?.acquireNextImage().use | |
{ | |
image -> bitmap = imagePreprocessor?.preprocessImage(image)!! | |
} | |
runOnUiThread | |
{ | |
imageView.setImageBitmap(bitmap) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment