摄像机2拍摄多张图像在一个捕获会话 [英] Camera2 taking multiple images in one capture session

查看:1042
本文介绍了摄像机2拍摄多张图像在一个捕获会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能采取多张图像于一体的具有不同焦距cameraDevice.createCaptureSession',我试着做一些手工自动对焦。

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?

推荐答案

您的绝对的想使用一个 CameraCaptureSession 发出多个捕获请求。捕捉会话不会轻易创建,您应该只有真正被创建时,一系列可能的输出表面 S变为一个新的。

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 Surfaces has changed.

该框架旨在帮助访问 CameraDevice ,并开辟一个 CameraCaptureSession ,这是你的实际的界面来控制摄像机。你告诉会话使用启动捕获 .capture() .captureBurst() .setRepeatingRequest() .setRepeatingBurst()通过将每一个设计合理的 CaptureRequest 秒。

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 CaptureRequests.

每个的 CaptureRequest 就是你的问题到 CameraCaptureSession 可以拥有任何你想要的相机控制参数集(只要你的设备支持他们),如您所期望的不同焦距。当通过会议印发的,他们进入一个管道,结果应以相同的顺序基本上是脱颖而出,成为您的要求。

Each of the CaptureRequests 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.

这篇关于摄像机2拍摄多张图像在一个捕获会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆