android的camera2 API的所有自动参数是什么 [英] What are all the automatic parameters of android's camera2 API

查看:305
本文介绍了android的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.

我已经禁用了自动对焦,自动曝光和自动白平衡,但是它仍然似乎会自动设置白平衡.我想知道是否应该禁用其他一些自动配置.

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屋!

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