Custom HDR sequence?

Started by dbalex, January 17, 2016, 10:49:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dmilligan

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

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

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

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

That formula is to convert it to a Canon raw value, so you'd need to use

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

Ok perfect, works great now! thanks for all the help!

dbalex

Any news on a fix for this issue?

a1ex


dmilligan

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

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