android的camera2 API的所有自动参数是什么 [英] What are all the automatic parameters of android's camera2 API
问题描述
我正在使用 Android camera2 API 开发一个相机应用程序,我需要相机始终具有相同的配置,例如对焦、白平衡、曝光等.
I'm developing a camera app using the Android camera2 API, And I need the camera to have always the same configuration, like focus, white balance, exposure, etc.
我已经禁用了 AF、AE 和 AWB,但它似乎仍然会自动设置白平衡.我想知道是否还有其他一些我应该禁用的自动配置.
I already disabled AF, AE and AWB, but it still seems to automatically set the white balance. I was wondering if is there some other automatic configuration I should disable.
我在 Google 上没有找到类似的内容.
I didn't find anything like it on Google.
推荐答案
我刚刚遇到了同样的问题......在我的情况下,结果证明我正在使用的模板中有一个函数,它重置了控件模式为自动.
i just ran into the same issue... In my case it turned out, that there was a function in the template i was using, which reset the control mode to automatic.
protected void updatePreview() {
if(null == cameraDevice) {
Log.e(TAG, "updatePreview error, return");
}
captureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_AUTO);
try {
cameraCaptureSessions.setRepeatingRequest(captureRequestBuilder.build(), null, mBackgroundHandler);
} catch (CameraAccessException e) {
e.printStackTrace();
}
}
这篇关于android的camera2 API的所有自动参数是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!