我怎么可以设置相机功能防抖(图像稳定器)的机器人机器人、防抖、图像、稳定

2023-09-07 11:01:01 作者:指缝间淡淡的烟草味╰つ

我做了一个摄像头应用程序。

I've made a Camera App.

我想补充功能防抖。

但我从来没有找到有关如何设置防抖(图像稳定器)。

but i never find about how to setting the anti-shake(image Stabilizer).

plz帮助我!

推荐答案

通常影像稳定器是一个内置的摄像头功能,而OIS(光学 - 图像 - 稳定器)是一个内置的硬件的特征;现在真的很少的设备支持他们。 如果设备没有内置的功能,我认为你不能做任何事情。

Usually Image Stabilizer is a built-in camera feature, while OIS (Optical-Image-Stabilization) is a built-in hardware feature; by now really few devices support them. If device hasn't a built-in feature, i think you cannot do anything.

Android不提供直接的API来管理防抖,但你可以尝试:

Android doesn't provide a direct API to manage image stabilization, but you may try:

如果 android.hardware.Camera.getParameters()getSupportedSceneModes(); 包含 steadyphoto 关键字(见此处),您的设备支持一种稳定的(一般拍照时,加速度计数据显示稳定的情况) 检查 android.hardware.Camera.getParameters()压扁(); 为OIS或影像稳定器的关键字/值或类似使用 Parameters.set(键,值); 。对于三星Galaxy相机,你应该使用 parameters.set(影像稳定器,OIS); //可以是OIS或关 如果你真的无聊,你可以尝试读取加速计数据,并决定出手时,该设备看起来稳定。 if android.hardware.Camera.getParameters().getSupportedSceneModes(); contains steadyphoto keyword (see here), your device supports a kind of stabilization (usually it shots when accelerometer data indicates a "stable" situation) check android.hardware.Camera.getParameters().flatten(); for a "OIS" or "image-stabilizer" keyword/values or similar to use in Parameters.set(key, value);. For the Samsung Galaxy Camera you should use parameters.set("image-stabilizer", "ois");//can be "ois" or "off" if you are really boring you may try reading the accelerometer data and decide to shot when the device looks steady.

祝你好运。