user2235615
user2235615

Reputation: 1533

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).

Upvotes: 3

Views: 692

Answers (1)

Yes
Yes

Reputation: 17

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.

Upvotes: 1

Related Questions