在CameraX中手动对焦

时间:2019-11-07 14:16:24

标签: kotlin focus android-camera2 android-camerax

我试图将与Camera2 API相同的焦点集中在CameraX上

在Camera2中,我使用以下代码

final CaptureRequest.Builder captureBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE); 

captureBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF); 

captureBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, mLensFocusDistance);

预先感谢

0 个答案:

没有答案