Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Feature: Tap to Focus #43

Merged
merged 5 commits into from
Jul 8, 2021
Merged

Feature: Tap to Focus #43

merged 5 commits into from
Jul 8, 2021

Conversation

alistairsykes
Copy link
Contributor

@alistairsykes alistairsykes commented Jun 16, 2021

#11

This is a complex feature to implement. Rough steps for requesting focus on camera2:

  • Cancel the previous repeating request (used for previous and image analysis)
  • Cancel any previous focus requests (have to call capture to do this)
  • Create a focus request. This is essentially a single capture request with some specific settings for the area of the sensor you want to focus on.
  • Restart the repeating request with the focus area also set

Once you complete these steps the camera will actual stay focused on that area of the sensor. Therefore it makes sense to clear that focus a period of time later (5000 millis, copied from camerax. Added ability to set to make it flexible). And resume the automatic focus.

We setup a touch listener within BarcodeView which then calls down eventually into the Camera2Source.

I will update the wiki as needed once this PR is in.


This change is Reviewable

@alistairsykes
Copy link
Contributor Author

I have written a wiki update for this, which I can send you @NickHolcombe before I publish if you like?

@alistairsykes alistairsykes requested review from robertredwood and removed request for NickHolcombe June 21, 2021 10:34
Copy link

@robertredwood robertredwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to see any obvious issues with this approach. Thanks for providing such great supporting information alongside what is definitely a complex feature. LGTM.

Reviewed 13 of 13 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @alistairsykes)

@alistairsykes alistairsykes merged commit 0f0df3c into master Jul 8, 2021
@alistairsykes alistairsykes deleted the feature/tap-to-focus branch July 8, 2021 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants