Is it possible to take multiple images in one 'cameraDevice.createCaptureSession' with different focus distances, I'm trying to do some manual autofocus.
I know that I can just use multiple capture sessions and wait for the focus move before capturing the picture but can it be done in a single capture session?
You definitely want to use a single CameraCaptureSession
to issue multiple capture requests. Capture Sessions are not created lightly, you should only really be creating a new one when the set of possible output Surface
s has changed.
The framework is designed to get access to a CameraDevice
and to open up a single CameraCaptureSession
, which is your actual interface to controlling the camera. You tell the Session to initiate captures using .capture()
, .captureBurst()
,.setRepeatingRequest()
, and .setRepeatingBurst()
by passing each one appropriately designed CaptureRequest
s.
Each of the CaptureRequest
s you issue to the CameraCaptureSession
can have whatever set of camera control parameters you want (as long as your device supports them), such as the different focal distances you desire. When issued through the Session, they enter a pipeline and the results should essentially emerge in the same order as you request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With