Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimal camera focus mode android java

I have android application that use the phone camera.

First the camera opened, I want to try to use "Autofocus" mode and "Macro" mode and choose by code the best focus that I get.

I would like to ask 2 things:

  1. Is there an internal parameter that give the focus score?

  2. Is there a known algorithm that gives the focus score(the algorithm should not be complex, because I do it in real time on 1080p video).

like image 526
user2235615 Avatar asked Sep 24 '26 10:09

user2235615


1 Answers

I know a bunch of links is not usually helpful, but I don't have time to go through all the pages. I figure something is better than nothing :)

This is the link for the android.hardware.camera2.params package summary. I wasn't able to find anything like what you are looking for, but that's a good place to start.

Another person had a similar question on the Android Enthusiasts SE site: Can I manually focus the camera on my Android phone?

And last, but not least: There seems to be quite a bit of relevant info at the XDA Developers forum.

Good Luck! I'm a photographer myself, so this seems like an interesting project.

like image 130
Yes Avatar answered Sep 27 '26 00:09

Yes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!