Long Exposure Simulation Script

Started by garry23, June 18, 2016, 08:53:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garry23

This thread is superseded by https://www.magiclantern.fm/forum/index.php?topic=25731.0

In the spirit of learning & sharing, I offer the latest version of my LE Script: https://gist.github.com/pigeonhill/c16b49d1f5da899b1d03a98c737e371f

All this script does is exploit ML FRSP and Timelapse to allow the user to simulate a longer exposure than is possible in a single image capture.

To create the LE effect all one needs to do is post process the captured 'bracket' set. I personally do this in LR using LR/Enfuse - adjust the Enfuse sliders to your taste. I also sometimes use Photoshop.

The script provides feedback on the number of images that will be taken, so you can use this feedback to set the script to a specific number of captures, eg using FRSP in super resolution capture, or to eliminate people from a scene.

As to why the script was written this way, ie using timelapse and triggering FRSP this way: it was the only way I could use FRSP in Lua.

As usual I welcome feedback on the script: especially any tips to improve my scripting  ;)

Finally the usual caveat: I wrote the script for my workflow and for my 5D3.

Cheers

Garry

bakersdozen

Garry, any reason this script wouldn't work on a 70d?

Sent from my E6653 using Tapatalk

EOS M + 5D3

garry23

@bakersdozen

No, should work ok.

Let me know how it goes ;-)

BTW I was conservative with the FRSP limits and haven't revisited these to see if I can widen them. A 'job' for the Christmas break.

Cheers

Garry

Ps there is also a LE simulator in the Auto Landscape Bracketing Script, that 'just' uses the normal mechanical shutter, i.e. works with any base shutter. This script is here: https://gist.github.com/pigeonhill/e008f051681885bc6ff84de637cb1d8e

bakersdozen

Awesome Garry, this is also pegged for my Christmas break 😁

Sent from my E6653 using Tapatalk

EOS M + 5D3

garry23

@bakersdozen

Thanks to the developers, such as Alex and David etc, I've updated the script to move away from the clumsiness of using the intervalometer.

The script is here: https://gist.github.com/pigeonhill/c16b49d1f5da899b1d03a98c737e371f

NOTE: this version requires the Lua Fix, ie it won't work with the latest nightly (yet). For my 5D3 I used this build care of Daniel: https://bitbucket.org/daniel_fort/magic-lantern/downloads/magiclantern-manual_lens_info.2016Dec05.5D3113.zip

The script does what its says: using FRSP create a bracketed set of images to be used in post for LE simulation.

Cheers

Garry

PS Here is the script for anyone who wishes to scan it:

--[[
LE simulation via Bracketing, using shutterless, Full Res Silent Picture
Creates brackets for post processing a simulated LE exposure
User must set FRSP mode, ie DNG or MLV and also wheather to use Dual-ISO
Exposure Sim should be on
Should be in LV
It is best to have Canon review set to OFF
Base exposure should be between 0.25-14 secs
Version 0.8: Requires the Lua Fix
*******************************************************************************************************
*   *
* If you reference this script, please consider acknowledging me: http://photography.grayheron.net/   *
*   *
*******************************************************************************************************
--]]

FRSP_brackets = 0

function my_shoot() -- to grab an image
camera.shoot(false)
key.press(KEY.HALFSHUTTER)
    msleep(100)
    key.press(KEY.UNPRESS_HALFSHUTTER)
end

function check_bookend() -- adds an over exposed FRSP frame
if LEmenu.submenu["Bookends?"].value == "yes"
then
local iso = camera.iso.apex
local av = camera.aperture.apex
camera.iso.apex = 10
camera.aperture.apex = camera.aperture.min.apex
my_shoot()
camera.iso.apex = iso
camera.aperture.apex = av
end
end

function go() -- and run the script
menu.close()
    local LE_count = 0
if camera.shutter.value < 0.25 or camera.shutter.value > 14 then -- not fit for FRSP use
menu.set("Shoot","Silent Picture",0)
beep (3, 200 , 500)  -- display warning message
display.notify_box("Adjust your shutter time: 0.25-14 secs", 5000)
lv.resume()
else -- alright to use FRSP
menu.set("Shoot","Silent Picture",1)
msleep(LEmenu.submenu["Delay"].value * 1000)
check_bookend()
    repeat
LE_count = LE_count + 1
    my_shoot()
until LE_count == FRSP_brackets
check_bookend()
menu.set("Shoot","Silent Picture",0)
lv.resume()
beep (3, 200 , 1000)  -- display warning message
display.notify_box("Script Finished Running", 5000)
FRSP_brackets = 0
end
end

LEmenu = menu.new
{
    parent = "Shoot",
    name = "LE Simulator",
    help = "Only uses FRSP",
depends_on = DEPENDS_ON.LIVEVIEW,
    submenu =
{
{
name = "Run Script",
help = "Does what it says after pressing SET",
depends_on = DEPENDS_ON.LIVEVIEW,
select = function(this) if FRSP_brackets ~= 0 and lv.enabled then task.create(go) end
end,
},
{
name = "LE Time?",
help = "Simulated LE time in seconds",
min = 0,
max = 600,
icon_type = ICON_TYPE.BOOL,
select = function(this,delta)
this.value = this.value + delta
if this.value > this.max then
this.value = this.min
elseif this.value < this.min then
this.value = this.max
end
end,
warning = function(this)
if LEmenu.submenu["LE Time?"].value ~= 0 then
FRSP_brackets = math.ceil(LEmenu.submenu["LE Time?"].value/camera.shutter.value)
else
FRSP_brackets = 0
end
if FRSP_brackets == 0 then
return "LE bracket taking switched off"
else
return "Note: "..tostring(FRSP_brackets).." brackets will be taken"
end
end
               },
{
name = "Delay",
help = "Delays script start by stated number of secs",
min = 0,
max = 5,
icon_type = ICON_TYPE.BOOL,
select = function(this,delta)
this.value = this.value + delta
if this.value > this.max then
this.value = this.min
elseif this.value < this.min then
this.value = this.max
end
end,
},{
name = "Bookends?",
help = "Places an overexposed frame at start and end of FRSP bracket set",
choices = {"no","yes"},
}
}
}

garry23

@bakersdozen

I have changed the script as I was getting a few problems: https://gist.github.com/pigeonhill/c16b49d1f5da899b1d03a98c737e371f

The 'only' thing is that now the script needs to have Canon review set to OFF.

Looking forward to any feedback from you (or others trying the script :-))

Cheers

Garry