Author Topic: Custom HDR sequence?  (Read 7159 times)

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Custom HDR sequence?
« Reply #25 on: January 28, 2016, 09:04:28 PM »
If you want to add a delay, just call msleep() before calling camera.shoot(). The wait parameter to camera.shoot() means to wait no longer than this for the camera to be ready to shoot, but it will go ahead and take the picture as soon as the camera is ready.

Also, there's a bug with the should_af parameter. The fix should be available soon.

dbalex

  • New to the forum
  • *
  • Posts: 15
Re: Custom HDR sequence?
« Reply #26 on: January 28, 2016, 10:32:50 PM »
thanks msleep work like a charm, exactly what I needed. Now I understand a bit better, thanks guys! I added three beeps to tell me when the sequence starts :)

I just noticed now but it seems like the aperture settings is not correctly adjusted while running the sequence. At the 4th camera shot it's supposed to set it to f16 but it seems to set it to f22. Any idea why it's not adjusting to the correct aperture?

menu.new
{
  name = "Run Bracket",
  select = function() task.create(run_bracket) end,
  depends_on = DEPENDS_ON.M_MODE,
}

run_bracket = function()
  camera.aperture.value = 4.0
  camera.shutter.value = 1.0
  beep(3)
  msleep(6000)
  camera.shoot()
 
  camera.shutter.value = 1/4
  camera.shoot()
 
  camera.shutter.value = 1/32
  camera.shoot()
 
  camera.aperture.value = 16.0
  camera.shutter.value = 1/16
  camera.shoot()

  camera.shutter.value = 1/125
  camera.shoot()

  camera.shutter.value = 1/1000
  camera.shoot()
 
  camera.shutter.value = 1/8000
  camera.shoot()

end

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Custom HDR sequence?
« Reply #27 on: January 29, 2016, 01:11:33 AM »
Yeah the conversion from f number to Canon raw units is wrong. I think I must have found it somewhere in ML code, then never tested it or sanity checked it. It's currently implemented as:
x * 8 + 8

The correct formula is:
log2(x) * 16 + 8

dbalex

  • New to the forum
  • *
  • Posts: 15
Re: Custom HDR sequence?
« Reply #28 on: January 29, 2016, 10:48:32 AM »
log2(16) * 16 + 8= 72, right ?  Because that's not working as well, a bit weird because f4 written as 4.0 works even if it's 40

Anything else that I'm missing?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Custom HDR sequence?
« Reply #29 on: January 29, 2016, 01:26:59 PM »
That formula is to convert it to a Canon raw value, so you'd need to use
Code: [Select]
camera.aperture.raw = 72

There will be a fix soon. There may also be a separate rounding issue (Canon firmware will only accept certain values).

dbalex

  • New to the forum
  • *
  • Posts: 15
Re: Custom HDR sequence?
« Reply #30 on: January 29, 2016, 07:54:50 PM »
Ok perfect, works great now! thanks for all the help!

dbalex

  • New to the forum
  • *
  • Posts: 15
Re: Custom HDR sequence?
« Reply #31 on: December 05, 2016, 09:08:58 PM »
Any news on a fix for this issue?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12290
  • Emergencies only
Re: Custom HDR sequence?
« Reply #32 on: December 06, 2016, 11:01:50 PM »
What issue?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Custom HDR sequence?
« Reply #33 on: December 07, 2016, 06:02:42 PM »
I'm pretty sure it was fixed in the first lua_fix that has already been merged (didn't check the commit history). That was a long time ago.

adamfilip

  • New to the forum
  • *
  • Posts: 2
Re: Custom HDR sequence?
« Reply #34 on: June 01, 2019, 03:01:06 PM »
This is awesome. didnt realize ML could do this.

If you dont specifiy the Aperture value and only set the Shutter duration.
will it use current camera settings if set in manual mode.. so if i have the camera set to F22 it will not change that i assume