Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 888
hello Avatar asked May 30 '14 03:05

hello


2 Answers

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.

like image 77
j.c Avatar answered Sep 24 '22 17:09

j.c


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

like image 27
Eunchul Jeon Avatar answered Sep 21 '22 17:09

Eunchul Jeon