Created
March 30, 2021 21:42
-
-
Save pengj/00b9c29f67b10086ab773cea4e8d346d to your computer and use it in GitHub Desktop.
Image Analysis setup in CameraX
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
val imageAnalysis = ImageAnalysis.Builder() | |
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST) | |
.build() | |
.apply { | |
setAnalyzer(executor,analyzer) | |
} | |
cameraProvider.bindToLifecycle( | |
lifecycleOwner, | |
cameraSelector, | |
imageAnalysis, | |
preview | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment