Camera 2 takes multiple images in one capture session

Is it possible to take multiple images in one "cameraDevice.createCaptureSession" with different focusing distances, I am trying to do manual autofocus.

I know I can just use multiple capture sessions and wait for focus to move before capturing the image, but can this be done in a single capture session?

+3


source to share


1 answer


You definitely want to use one CameraCaptureSession

to issue multiple capture requests. Capture sessions are not easy to create, you should really only create a new one when the set of possible output has changed Surface

.

The structure is for accessing CameraDevice

and opening one CameraCaptureSession

, which is your actual interface to control the camera. You tell the session to initiate grips with .capture()

, .captureBurst()

, .setRepeatingRequest()

and .setRepeatingBurst()

, handing each of them appropriately designed CaptureRequest

s.



Each one CaptureRequest

you give CameraCaptureSession

out can have any set of camera control options you want (as long as your device supports them), like the different focal lengths you want. When they are issued through a session, they enter the pipeline and the results should appear in the same order in which you request.

+6


source







All Articles