how can i set the camera function that anti-shake(image Stabilizer) at android

落爺英雄遲暮 提交于 2020-01-13 02:54:09

问题


I've made a Camera App.

I want to add the functionality of anti-shake.

But I could not find the setting for anti-shake(image Stabilizer).

Plz Help me!!


回答1:


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 doesn't provide a direct API to manage image stabilization, but you may try:

  1. 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)
  2. 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"
  3. if you are really boring you may try reading the accelerometer data and decide to shot when the device looks steady.

Good luck.




回答2:


If you want to develop software image stabilizer, OpenCV is helpful library for you. Following is the one of the way to stabilize the image using Feature.

  1. At first, you should extract feature from image using feature extractor like SIFT, SURF algorithm. In my case, FAST+ORB algorithm is best. If you want more information, See this paper
  2. After you get the features in images, you should find matching features with images.there are several matcher but Bruteforce matcher is not bad. If Bruteforce is slow in your system, you should use a algorithm like KD-Tree.
  3. Last, you should get geometric transformation matrix which is minimize error of transformed points. You can use RANSAC algorithm in this process.

You can develop all this process using OpenCV and I already developed it in mobile devices. See this repository



来源:https://stackoverflow.com/questions/23946467/how-can-i-set-the-camera-function-that-anti-shakeimage-stabilizer-at-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!