Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: xNiNELiVES on May 27, 2013, 05:47:03 AM

Title: [WONTFIX] Video Auto focus?
Post by: xNiNELiVES on May 27, 2013, 05:47:03 AM
I know this has to be possible but can you guys implement a continuous auto focus system for video?  It will make DSLRs with the new RAW video hack great cinema cameras!
Title: Re: [WONTFIX] Video Auto focus?
Post by: xNiNELiVES on May 27, 2013, 08:50:21 PM
Out of curiosity A1ex why won't you try fixing?
Title: Re: [WONTFIX] Video Auto focus?
Post by: a1ex on May 27, 2013, 08:57:01 PM
I've tried for one year or so and gave up. Too hard to get decent results.
Title: Re: [WONTFIX] Video Auto focus?
Post by: 1% on May 27, 2013, 09:05:59 PM
The way canon did it sucks too.
Title: Re: [WONTFIX] Video Auto focus?
Post by: xNiNELiVES on May 28, 2013, 05:10:03 AM
Quote from: a1ex on May 27, 2013, 08:57:01 PM
I've tried for one year or so and gave up. Too hard to get decent results.

Ok
Title: Re: [WONTFIX] Video Auto focus?
Post by: sephiroth on September 08, 2013, 06:34:07 AM
Alex and 100%,

This is my first post, though im hoping to get more involved from now.

I have a lot of programming on embedded devices experience behind me, image processing and analysis and porting to various products including cell phones and cameras (worked R&D on stuff like image stabilization, face recognition etc). Although i know little about the 7d architecture as of now im learning quickly and since im a 7d owner since 4 years I'm like most other very interested in a continuous focus feature. Since I know that ML dev team have tried and now consider this impossible, more so I dont want to labelled a troll from my first post, i will try to ask more out of curiosity rather than a pure "feature request" approach. Could you try to be more precise in what was causing you to give up implementing this, the way I picture this would work would be to ignore the physical auto focus feature and go more for an algorithm that detects if an area is in focus (this is possible) and then tries to maintain this area being in focus by using the already existing ML follow focus feature. I understand this part is a bit slow, physically, so there will be limitations to all this and definitely no close ups of course, but the type of shots when you follow focus on someone walking in a distance could perhaps work. If you could let me know what made you quit the development, and why my approach would be unfeasible then that would be awesome.

Again, thank you very much for making ML possible. I had faith in you when everyone said 7D raw is impossible because of the unique architecture and decided to wait half a year before putting it on ebay. That paid off dearly to say the least.

Cheers, 


Title: Re: [WONTFIX] Video Auto focus?
Post by: Audionut on September 09, 2013, 05:33:28 AM
Quote from: sephiroth on September 08, 2013, 06:34:07 AM
and definitely no close ups of course, but the type of shots when you follow focus on someone walking in a distance could perhaps work.

It needs to work more often then not.  Else you end up with a heap of false bug reports.
Title: Re: [WONTFIX] Video Auto focus?
Post by: sephiroth on September 09, 2013, 08:25:20 AM
Let's just put some good comments in the help section for this feature. And ignore people who cant read that.
Even if its not applicable to all type of scenes it would still be a MAJOR help for a lot of people.
Title: Re: [WONTFIX] Video Auto focus?
Post by: nanomad on September 09, 2013, 02:12:52 PM
The biggest issue is controlling the AF motor from ML. The current method won't cut it unfortunately....
Title: Re: [WONTFIX] Video Auto focus?
Post by: sephiroth on September 10, 2013, 11:48:12 AM
Thanks for reply.

What are the limitations of controlling the AF motor from ML?
Is the Bracket focus function based on the same limitations?

Since focus peaking works and bracketing works, seem like we could have a very basic (although slow) continuous AF by just using this?
Title: Re: [WONTFIX] Video Auto focus?
Post by: nanomad on September 10, 2013, 01:31:18 PM
Yes. Focus bracketing and follow focus use the same method. And I wouldn't say it is good enough for movie af
Title: Re: [WONTFIX] Video Auto focus?
Post by: a1ex on September 10, 2013, 05:54:40 PM
Quote from: sephiroth on September 10, 2013, 11:48:12 AM
Since focus peaking works

Can you tell in which direction you should focus, from focus peaking data? How? (math please, not speculation)
Title: Re: [WONTFIX] Video Auto focus?
Post by: 1% on September 10, 2013, 06:06:20 PM
There is or was a working implementation on 600D. It did not perform all that well.. come to think of it servo EF on EOSM doesn't perform that well either, it acts in a similar fashion just isn't so quick to change focus.
Title: Re: [WONTFIX] Video Auto focus?
Post by: a1ex on September 10, 2013, 11:20:37 PM
On those cameras with pink dots (650D, M) you can try to understand the meaning of those dots; they may tell you in which direction you need to focus. Once you know that, the hardest part is solved.
Title: Re: [WONTFIX] Video Auto focus?
Post by: sephiroth on September 11, 2013, 04:04:09 AM
Quote from: a1ex on September 10, 2013, 05:54:40 PM
Can you tell in which direction you should focus, from focus peaking data? How? (math please, not speculation)

There are of course no pure analytical ways to know which direction to focus, since the "blur kernel' for a given pixel is the same for both directions.
However, it would make sense to use linear quadratic estimation (a kalman filter) , or a more simple feedback system.
If this system would be stable or not in the end depends on many variables like physical constraints such as min/max focus step size, focusing speed, and much more, but since the potential payoff is great it might be worth a shot. This system would only work for tracking focus of a subject that is not changing too much frame to frame, but a walking person etc could perhaps work.
What do you guys think?