Last active
August 9, 2022 11:14
-
-
Save magdamiu/b9caca8de54648307d8051a55e999cde to your computer and use it in GitHub Desktop.
Setup FPS for ImageAnalysis
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
fun applyFrameRateOnImageAnalysis(): ImageAnalysis { | |
val imageAnalysisBuilder = ImageAnalysis.Builder() | |
val camera2InterOp = Camera2Interop.Extender(imageAnalysisBuilder) | |
camera2InterOp.setCaptureRequestOption( | |
CaptureRequest.CONTROL_AE_MODE, | |
CaptureRequest.CONTROL_AE_MODE_OFF | |
) | |
camera2InterOp.setCaptureRequestOption( | |
CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, | |
Range(60, 60) | |
) | |
return imageAnalysisBuilder.build() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am interested to use the
setCaptureRequestOption
feature however struggling to integrate it. Do you have a minimal working example for CameraX?