Closed Bug 966829 Opened 11 years ago Closed 11 years ago

[User story] Support for continuous auto focus

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.0 S3 (6june)
tracking-b2g backlog

People

(Reporter: skasetti, Assigned: dmarcos)

References

Details

(Whiteboard: [fxos:media] [m+])

User Story

User Stories:
1. As a user, while in camera mode I want auto focus be set to continuous focus if the device is not capable of doing face tracking but is capable of continuous focus
2. As a user, while in video mode I want auto focus be set to continuous focus if the device is capable of continuous focus

Acceptance Criteria:
1. Camera mode
a) When the user is in camera mode and face tracking auto focus fails, the camera switches to continous auto focus
b) The visual indicator for continuous auto focus should show up on the screen 
c) When the continous auto focus is done, the visual indicator changes color indicating that the auto focus is done
d)The visual indicator should disapper after 1 second

2. Video recording mode
a) When the user is in the video recording mode, the camera will use continuos auto focus
b) There will not be any visual indicator for continuous auto focus

Attachments

(1 file, 3 obsolete files)

46 bytes, text/x-github-pull-request
Details | Review
No description provided.
User Story: (updated)
As I know, Mozilla engineer is working on it. Right?
Flags: needinfo?(skasetti)
Outstanding questions for Acceptance Criteria: 1a. To support this, we may need to be able to differentiate between "face detection has failed" and "haven't detected any faces YET"--from reading the API, I'm not sure this is possible. 1b/c/d. The visual indicator is only possible on JB- and KK-based builds.
Depends on: 965421
Once Gaia has information about face tracking failed or no faces detected from Gecko, it is possible to switch the focus mode from Face tracking to Continuous Auto Focus mode.
Blocks: 966764
Depends on: 971448
Youngjun/jyothi, What is the status of the this feature? Thanks Hema
Flags: needinfo?(jjoons79)
Hello Hema, You can expect a PR for continuous Autofocus by Today. Thanks
Prasad
Flags: needinfo?(jjoons79)
Assignee: nobody → gjyothiprasad
Whiteboard: [fxos:media] → [fxos:media] PR ETA 3/5
Flags: needinfo?(skasetti)
Target Milestone: --- → 1.4 S3 (14mar)
Attached file Pointer to pull request (obsolete) —
Hello Diego, This is a just work-in-progress patch to test Continuous Auto Focus (C-AF) functionality. As per the plan, C-AF is part of focus priority and we can't test stand alone C-AF feature. So, I am enabling C-AF when viewfinder is clicked. Later, I will submit patch for focus priority to schedule C-AF, touch focus and Face tracking modes. Thanks.
Attachment #8386523 - Flags: review?(dmarcos)
Whiteboard: [fxos:media] PR ETA 3/5 → [fxos:media] PR ETA 3/7
Attached file Pointer to pull request (obsolete) —
Hello Diego, I have uploaded a patch for Continuous auto Focus. In this patch I am setting C-AF as default focus mode. Once the facetracking is landed then we switch the default mode as facetracking. Please review the patch. Regards, Prasad
Attachment #8386523 - Attachment is obsolete: true
Attachment #8386523 - Flags: review?(dmarcos)
Attachment #8388046 - Flags: review?(dmarcos)
Attachment #8388046 - Flags: review?(dmarcos) → review?(dflanagan)
Attachment #8388046 - Flags: review?(wilsonpage)
Attachment #8388046 - Flags: review?(dmarcos)
Comment on attachment 8388046 [details] [review] Pointer to pull request r- for these reasons: I don't actually know what the mozCamera.onAutoFocusMoving callback does, but giving fake focus feedback with timeouts seems completely unacceptable. Also, this patch sets mozCamera.focusMode to continuous-picture, but does not modify the existing code that focuses the camera before taking a picture. The primiary benefit of having CAF on is that the user can take pictures more quickly because the camera is already focused. But if the code is still attempting to focus before taking a picture, then we don't get the benefit from the feature. Also there doesn't seem to be any code to determine whether continuous focus mode is supported. We should only turn it on as the default mode on hardware that supports it. Also: there are no tests in this PR. As a general note, I'd add that I think that doing this right is pretty hard. I also expect that there will be a lot of interaction between CAF and touch focus, so it might make sense to combine those two features in to a single pull request. Finally, we are trying to clear out the camera-dev branch and stop using it, so in the future, you should probably base your pull requests on camera-new-features.
Attachment #8388046 - Flags: review?(dflanagan) → review-
I've learned more about the onAutoFocusMoving callback, and can add to the previous comment. That callback gets a boolean argument. If true, we know that the camera is trying to refocus. If false we know that it has stopped trying to refocus. We do not know whether the focus has succeeded or not. So, when the callback is called with the argument true, then we should display a focus ring animation to indicate that the focus is changing. When the callback is called with the argument false, then we should hide the focus ring. We should not make the ring green or red because we do not know whehter the focus succeeded or failed, only that it was in transition. There should be no need to use setTimeout to respond to the onAutoFocusMoving callback.
(In reply to David Flanagan [:djf] from comment #10) > I've learned more about the onAutoFocusMoving callback, and can add to the > previous comment. That callback gets a boolean argument. If true, we know > that the camera is trying to refocus. If false we know that it has stopped > trying to refocus. We do not know whether the focus has succeeded or not. > > So, when the callback is called with the argument true, then we should > display a focus ring animation to indicate that the focus is changing. When > the callback is called with the argument false, then we should hide the > focus ring. We should not make the ring green or red because we do not know > whehter the focus succeeded or failed, only that it was in transition. > > There should be no need to use setTimeout to respond to the > onAutoFocusMoving callback. Hi David, Please check bug 966830, where I have uploaded a merged patch with this information.
Comment on attachment 8388046 [details] [review] Pointer to pull request r- Comments on GH.
Attachment #8388046 - Flags: review?(wilsonpage) → review-
Attachment #8394715 - Flags: review?(dflanagan)
Comment on attachment 8394715 [details] [review] Pull Request(Camera-new-feature) Work in progress code Clearing the review flag and setting feedback-. I've left a few comments on github. If you're taking over the focus work from Prasad, please ask Prasad to forward all of the recent emails discussing the feature. Also, note that at Mozilla we are currently assuming that the focus features will not make the deadline to be included in CS testing, and are prioritizing other features and bug fixing over focus-related work. In general, please keep in mind that I've got a very heavy work load for camera and other FirefoxOS features. If your code is marked "work in progress" please don't ask me to review it. Instead, if you'd like my feedback on a work in progress, set the feedback? flag and include a comment explaining what you have questions about or what parts of the code you'd particularly like feedback on.
Attachment #8394715 - Flags: review?(dflanagan) → feedback-
Attachment #8394715 - Flags: feedback- → feedback?(dflanagan)
As discussed with Wilson, I am changing the code , Removing the 'focus.js' from controller and moving the code in camera.js library .We have uploaded the small part of code for review and based on your feedback will progress.
Attachment #8394715 - Flags: feedback?(wilsonpage)
Comment on attachment 8394715 [details] [review] Pull Request(Camera-new-feature) Work in progress code This is a scary complex patch. I haven't spent the time to work through it properly, just a quick skim. But I'm r-'ing. This should probably be a 'feedback' request not 'review' as the patch is still a work in progress. INITIAL FEEDBACK: FocusRingView should be a direct 'sub-view' dependency of ViewfinderView, there is no reason for it to be floating around in `app` scope. This is prime unit-test territory. You (the developer, not a separate team) need to be writing unit-tests as you go, to prove to yourself and reviewers that the code is conforming to the agreed spec. I'm worried unit-testing is still an afterthought, and simply there to 'tick a box'.
Attachment #8394715 - Flags: feedback?(wilsonpage) → feedback-
Comment on attachment 8394715 [details] [review] Pull Request(Camera-new-feature) Work in progress code Wilson has offered feedback so I'm clearing the feedback request on myself.
Attachment #8394715 - Flags: feedback?(dflanagan)
Blocks: 995911
Attached file Pull Request
Attachment #8406108 - Flags: review?(wilsonpage)
This is no longer in 1.4 scope, removing meta bug tracking dependency.
No longer blocks: 966764
Whiteboard: [fxos:media] PR ETA 3/7 → [fxos:media] [m+]
Attachment #8388046 - Attachment is obsolete: true
Attachment #8388046 - Flags: review?(dmarcos)
Attachment #8394715 - Attachment is obsolete: true
Attachment #8406108 - Flags: review?(dflanagan)
Attachment #8406108 - Flags: review?(dmarcos)
Ashish, I'm not going to have time to look at this patch today. But please note that I landed bug 995432 in master to enable simple C-AF. Please look at that patch and make sure that this one is compatible with it. In particular, note the new resumeContinuousFocus() method that is needed after calling autoFocus() when in C-AF mode.
Flags: needinfo?(singhashish1887)
Target Milestone: 1.4 S3 (14mar) → ---
blocking-b2g: --- → 2.0?
Ashish is working on it. So I assigned it.
Assignee: gjyothiprasad → singhashish1887
Target Milestone: --- → 2.0 S1 (9may)
blocking-b2g: 2.0? → backlog
This is still happening in the 2.0 timeframe (just not marked blocker since it is a feature)
Youngjun, Any update? Thanks Hema
Flags: needinfo?(jjoons79)
Depends on: 966830
Flags: needinfo?(singhashish1887)
We have Updated the code for Continues Focus along with Bug 966828, 966830.
Flags: needinfo?(jjoons79)
There is no separate patch for this. This code is part of 966828 (face tracking) as well 966830 (touch focus).
Target Milestone: 2.0 S1 (9may) → 2.0 S2 (23may)
Flags: in-moztrap?(mozillamarcia.knous)
Attachment #8406108 - Flags: review?(wilsonpage)
mike, Do we have a callback to know when continuous auto focus is focusing, when it has failed or succeded?
Flags: needinfo?(mhabicher)
(In reply to Diego Marcos [:dmarcos] from comment #26) > mike, Do we have a callback to know when continuous auto focus is focusing, > when it has failed or succeded? See bug: https://bugzilla.mozilla.org/show_bug.cgi?id=965421
Diego, please review and update the status.
Flags: needinfo?(dmarcos)
Target Milestone: 2.0 S2 (23may) → 2.0 S3 (6june)
The continuous callbacks are now enabled by default on master: https://bugzilla.mozilla.org/show_bug.cgi?id=1011101
Flags: needinfo?(mhabicher)
We need to make a decision from the UX perspective if this is something we still want or not.
Flags: needinfo?(tshakespeare)
(In reply to Diego Marcos [:dmarcos] from comment #26) > > mike, Do we have a callback to know when continuous auto focus is focusing, > when it has failed or succeded? See bug 965421, which Hema linked to in comment 27. This callback only tells you whether or not the camera is focusing. To determine whether or not the camera -is- focused, you need to call .autoFocus() and get the status from its callback.
Hey guys! We (Rob, Amy, and I) reviewed the focus work that's in master so far and have came up with some feedback: 1. We noticed that when hitting the shutter button, the camera refocuses for both auto and touch. This extra focus should be eliminated if auto and touch focus are working. It doesn't make sense to re-focus when already focused and the added delay will cause frustration. 2. Assuming #1 can be done (remove extra focus), auto-focus should have an indicator when focusing. So you're holding your phone, move it around and when you pause and the camera tries to focus there should be an indicator. This will give the user feedback that focus is working as well as what is being focused on. 3. We also noticed auto-focus didn't always "resume". This was seen especially with touch-focus. Tapping on the screen would focus on the point, but when the phone was moved around auto-focus would not take over. The same seemed to be true after taking a photo; the focus point seemed to be stuck where you had tapped. Auto-focus should take over and when face-tracking is implemented, that should as well. Hopefully this is clear. Thanks Diego!
Flags: needinfo?(tshakespeare)
Thanks Tif, Rob and Amy! Diego, assigning this to you. Thanks Hema
Assignee: singhashish1887 → dmarcos
Comment on attachment 8406108 [details] [review] Pull Request This patch is obsolete. Removing review flags
Attachment #8406108 - Flags: review?(dmarcos)
Attachment #8406108 - Flags: review?(dflanagan)
Flags: needinfo?(dmarcos)
Closing this one - Continuous auto focus is on; visual feedback for C-AF is tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1019965
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: