Magic Lantern Forum

Using Magic Lantern => General Help Q&A => Topic started by: reisew on May 03, 2013, 06:54:15 PM

Title: 7d stack focus
Post by: reisew on May 03, 2013, 06:54:15 PM
Hi guys,
nice job you are doing!
Is there a way to speed up stack focus operation ? some specific settings ?
And/or is a PicoC script possible to make pictures from current focus point for example next 10 focus steps ?
thanks,
reisew
Title: Re: 7d stack focus
Post by: Francis on May 04, 2013, 06:45:41 PM
You definitely can script that.
Title: Re: 7d stack focus
Post by: reisew on May 05, 2013, 10:52:52 AM
ok, I'll give it a try.
What websites do you suggest to get familiary with the PicoC ?
thanks,
reisew
Title: Re: 7d stack focus
Post by: jbuy41 on May 05, 2013, 09:31:15 PM
Have a 550.  Please let me know if you have any luck.  Don't know scripting but willing to try.

Always have had problems with stack focus. 
Title: Re: 7d stack focus
Post by: Francis on May 06, 2013, 05:55:10 PM
Read about loops in C and read the API thread on the script writing board. For what you want you really only need 1 'for' loop. Look at the sample scripts.

/*
@title Focus stack
*/

wait_pic(); //wait for you to press the shutter to start

for (int i = 0; i < 10; i++) //repeat the stuff in brackets below 10 times
{

focus(1); //moves focus 1 step. can also be a negative
takepic(); //takes a pic duh
//sleep(.5); //wait .5s before starting the loop over

}


You would have to be in Liveview with autofocus enabled to use this.

There is also
focus_setup(int stepsize, int delay, int wait);  // see Focus -> Focus Settings menu
to set all those specific settings in the script if you like. You would call it by adding focus_setup(1,2,3); for example, before the loop.

You might have a problem with the script trying to run faster than the camera can take the pics and move focus. If that is the case and you are missing shots then remove the // in front of the '//sleep...' to give it some more time to clear buffer and move focus.

Scripts are not going to really speed up the picture taking part of the process, just maybe the setup.
Title: Re: 7d stack focus
Post by: reisew on May 19, 2013, 04:23:25 PM
Hi Francis,
thanks for the post and sorry for delay, but I was too busy the last weeks.

Do you know if I will damage my lens, if I move focus to the end and than start the script which for example move 10 steps forward (what than is mechanically impossible) ?

Or is the lens electronic or camera electronic/software avoiding that ?
Title: Re: 7d stack focus
Post by: reisew on May 19, 2013, 05:52:56 PM
I need to wait anyway until the 7d release supports scripts ...
Or are the current nightly builds supporting 7d ? filename sounds like not ...  :-\