Android中手动控制ISO

Android中手动控制ISO

本文介绍了如何在Camera2,Android中手动控制ISO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是android的新手,正在尝试找出新的camera2效果.我不知道如何在相机预览中手动控制iso.任何帮助将不胜感激.

I am new in android and trying to figure out new camera2 effects. I have no idea how to control iso in camera preview manually.Any help will be appreciated.

谢谢.

推荐答案

您必须像这样首先设置previewbuilder:

You have to set previewbuilder first like this:

mPreviewBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_FULL);

而不是

Range<Integer> range2 = characteristics.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE);
                    int max1 = range2.getUpper();//10000
                    int min1 = range2.getLower();//100
                    int iso = ((progress * (max1 - min1)) / 100 + min1);
                    mPreviewBuilder.set(CaptureRequest.SENSOR_SENSITIVITY, iso);

progressonProgressChanged(SeekBar seekBar, int progress, boolean user)覆盖方法中的seekBar的变量

progress is a variable for seekBar from onProgressChanged(SeekBar seekBar, int progress, boolean user) override method

这篇关于如何在Camera2,Android中手动控制ISO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 17:39