How can I set the camera function which prevents jitter (image stabilizer) on android

I made a camera application.

I want to add anti-shake functionality.

But I could not find the settings for anti-shake (image stabilizer).

Please help me!

+6
source share
2 answers

Usually the image stabilizer is a built-in function of the camera, and OIS (optical image stabilization) is a built-in hardware function; to date, indeed, several devices support them.
If the device does not have a built-in function, I think that you can not do anything.

Android does not provide a direct API for controlling image stabilization, but you can try:

  • If android.hardware.Camera.getParameters().getSupportedSceneModes(); contains the steadyphoto keyword (see here ), your device supports some stabilization (usually these are pictures when the accelerometer data indicate a β€œstable” situation)
  • check android.hardware.Camera.getParameters().flatten(); for the keyword / value "OIS" or "image stabilizer" or similar use in Parameters.set(key, value); . For Samsung Galaxy Camera you should use parameters.set("image-stabilizer", "ois");//can be "ois" or "off"
  • If you are really bored, you can try reading the accelerometer data and decide to shoot when the device looks stable.

Good luck.

+6
source

If you want to develop a software image stabilizer, OpenCV is a useful library for you. The following is an example of image stabilization using the function.

  • First you must extract the function from the image using a function extractor such as SIFT, the SURF algorithm. In my case, it is best to use the FAST + ORB algorithm. If you need more information, see this article.
  • After you get the functions in the images, you should find the corresponding functions with the images. There are a few matches, but the Bruteforce matcher is not bad. If Bruteforce is slower on your system, you should use an algorithm like KD-Tree.
  • Finally, you should get a matrix of geometric transformations that minimizes the error of the converted points. You can use the RANSAC algorithm in this process.

You can develop this whole process using OpenCV, and I have already developed it on mobile devices. See this repository

+1
source

Source: https://habr.com/ru/post/970065/


All Articles