Author Topic: Focus & Exposure Bracketing  (Read 2798 times)

garry23

  • Hero Member
  • *****
  • Posts: 1314
Focus & Exposure Bracketing
« on: July 10, 2016, 10:54:00 AM »
I hope my latest post http://photography.grayheron.net/2016/07/bringing-it-all-together.html helps those that are experimenting with focus and exposure bracketing using Magic Lantern.

As usual I welcome any feedback or questions on my approach, which is targeted at the landscape photography use case.

Cheers

Garry

BBA

  • Member
  • ***
  • Posts: 125
Re: Focus & Exposure Bracketing
« Reply #1 on: July 12, 2016, 12:50:35 PM »
@garry23

I managed to try your script (I am in holidays in Switzerland but it's raining for the moment) V3 R1.4 and focused (sorry  ;)) on the main focus stacking loops (lens moves).

It appears that a number of pictures (towards infinity end) are taken at the same focus position : in other words, the lens stepping motor moves 1 step and steps bak, remaining in the same position, but pictures are still taken.

I have tried a LE stack for a first time, but IMHO, beginners need some more help on what to do in the menus (I could not really figure out exactly, so the camera started to take such a lot of pictures I had to shut it down): a display of the number of pictures to be taken is a very good improvement. I also wonder if it could be possible to press on some camera key to stop a running script.

As you are, I am very glad to be able to "play" with my camera in Lua   :) :) !!!
That's it for the moment.

More later.
See you !

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #2 on: July 12, 2016, 08:29:39 PM »
@BBA

Latest version is 1.57.

BTW what FL are you shooting at?

By definition as you stack towards infinity the movement of the lens should get greater, ie relative to the last move. So I don't understand your observation. I have never seen anything link that.

As for LE mode the script tells you how many images will be taken.

LE stacking is for LE simulation, superres or eliminating people :-)

Cheers

Garry

BBA

  • Member
  • ***
  • Posts: 125
Re: Focus & Exposure Bracketing
« Reply #3 on: July 13, 2016, 04:45:23 PM »
@garry23

FL = 35mm/24mm
The move in the opposite direction for (good) overlapping purposes

Code: [Select]
lens.focus(1,1,false) -- move one step for focus bracket overlap

can lead (as it is) to an infinite loop in the near infinity range.

Sorry, I can't keep up with the releases  ::), as I have to insert a lot of logging, but this part of the script has not changed, has it  ;)  ?

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #4 on: July 13, 2016, 06:29:42 PM »
@BBA

Sorry about the lack of release control, I script for myself, but share openly for others to use as they see fit.

Truly, there should no infinite loop problems, so I don't know what is happening in your case.

At the FL you are using the script should work fine. What option are you using and where is your initial FP?

Cheers

Garry

BBA

  • Member
  • ***
  • Posts: 125
Re: Focus & Exposure Bracketing
« Reply #5 on: July 13, 2016, 09:28:06 PM »
@garry23

I couldn't believe it myself.

First, I checked, in the menu, the number of pictures with FP2HF : there were 6 pictures to be taken.
Then I changed FP2HF with FP2INF instead, knowing that there weren't too many pictures.
I ran the script with FP2INF.


Code: [Select]
            repeat
a1=a2
b1=b2
repeat
soft_err = lens.focus(-1,1,false)
b2 = lens.dof_far
a2 = lens.dof_near
until (a2 > b1) or (soft_err == false) or (lens.focus_distance > lens.hyperfocal)
lens.focus(1,1,false) -- move one step for focus bracket overlap
take_brackets()
if keymenu.submenu["Focus bracketing?"].value == "FP2HFD"  and lens.focus_distance > lens.hyperfocal then soft_err = false end
until soft_err == false

When the focal point becomes > hyperfocal, the inner loop test is "fulfillled": so, after a one step move in the inner loop, the one step in the opposite direction immediately follows and then again and again.
Bottom line : +1 -1 = 0   The focal point doesn't move and pictures continue to be taken.

With the EF 35mm f/2 lens, some motor steps are lost erratically...
With the EF 24mm f/1.4 L lens, the stepping motor continues flawlessly : +1 -1 +1 -1....

I hope this helps.

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #6 on: July 13, 2016, 10:26:48 PM »
@BBA

Silly me !

I changed the code and only tested out FP2HFD.

The fix is easy and I'll upload tonight.

Thanks for testing and reminding me I should test things out more carefully  ;)

Cheers

Garry

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #7 on: July 13, 2016, 10:44:54 PM »

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #8 on: July 14, 2016, 07:10:41 AM »
@BBA

Just off to work and a minor tweak to ensure (sic) in FP2HFD mode the last bracket is taken at the HFD.

https://gist.github.com/pigeonhill/6620121ebe1548eb1bdaa6bea8598fac

Cheers

Garry

BBA

  • Member
  • ***
  • Posts: 125
Re: Focus & Exposure Bracketing
« Reply #9 on: July 14, 2016, 10:35:29 AM »
@garry23

Then all is well that ends well !
Take your time to check the logic carefully !

garry23

  • Hero Member
  • *****
  • Posts: 1314
Re: Focus & Exposure Bracketing
« Reply #10 on: July 14, 2016, 06:54:20 PM »
@BBA

Ah...a Shakespearean coder  :)

Yes you are right: my enthusiasm does get the better of me  :-[

BTW sometimes I think you and I are the only ones playing around with 'focus stuff' and Lua  :-\

I'm looking forward to any field feedback you may have.

Cheers

Garry