简体   繁体   English

android的camera2 API的所有自动参数是什么

[英]What are all the automatic parameters of android's 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.我正在使用 Android camera2 API 开发相机应用程序,并且我需要相机始终具有相同的配置,例如对焦、白平衡、曝光等。

I already disabled AF, AE and AWB, but it still seems to automatically set the white balance.我已经禁用了AF、AE和AWB,但它似乎仍然会自动设置白平衡。 I was wondering if is there some other automatic configuration I should disable.我想知道是否还有其他一些我应该禁用的自动配置。

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();
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM