Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autofocus() callback #46

Closed
jeffersonlicet opened this issue Jun 26, 2017 · 8 comments
Closed

autofocus() callback #46

jeffersonlicet opened this issue Jun 26, 2017 · 8 comments
Labels

Comments

@jeffersonlicet
Copy link

Hi, thank you very much for your time. is there any way to get the autofocus callback? seems like FocusResult is not available from getCurrentFotoapparat().autoFocus();

Thank you again.

@dmitry-zaitsev
Copy link
Member

Currently, the result of autofocus is not exposed, but we can improve that.

@jeffersonlicet
Copy link
Author

it will be awesome. Thank you.

@dmitry-zaitsev
Copy link
Member

dmitry-zaitsev commented Jul 3, 2017

Sorry for late reply, but could you please describe your use case a bit more?

Currently, we already attempt to perform autofocus when takePicture is called. So, I am evaluating the need for the actual result from autoFocus. On top of that, some devices are not always consistent with a result of the autofocus operation and might fail more often than you would normally expect them to, so handling autofocus result will get tricky pretty fast on a client side.

@jeffersonlicet
Copy link
Author

Using OpenCV to process a frame, but first it need to ensure the camera is focused , then I process the frame with a specific algorithm. Thank you. It also can be used performing face recognition (to draw rectangles etc)

@dmitry-zaitsev
Copy link
Member

OK, that makes sense. I will try to provide the solution until the end of this week.

If you are relying on frame processing you should also update to 1.0.4, which would noticeably improve the performance.

As for face detection - we just started working on a module for Fotoapparat which would do face detection without relying on Google Play Services: https://github.com/Fotoapparat/FaceDetector

@dmitry-zaitsev
Copy link
Member

The feature is in master. You can expect it in the new release which will happen until the end of the week.

@jeffersonlicet
Copy link
Author

Thank you very much.

@omarDG
Copy link

omarDG commented Oct 22, 2020

Hi,

Where to find the documentation related to the focus callback? I'm unable to find it.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants