Skip to content

Instantly share code, notes, and snippets.

/**
* Compute the depth of field, accounting for diffraction.
*
* See:
* The INs and OUTs of FOCUS: An Alternative Way to Estimate Depth-of-Field and Sharpness in the Photographic Image
* by
* Harold M. Merklinger - Page 15
*
* Note the equations used in the above are referenced to the lens princpal of the lens, ie about a focal length difference
* which is important for macro work
@pigeonhill
pigeonhill / 1TOG1.lua
Last active December 5, 2017 19:18
Toggler for EOSM
--[[
No menu (complex) script, that runs in the background, to help control the camera and switch between your favorite ML/Canon states using your buttons of choice,
for example the MENU, PLAY & INFO buttons on the EOSM work well.
To use the script simply note the following sequences:
[MENU] = normal use of [MENU] if not in imode
[PLAY][PLAY] = normal use of [PLAY]
[PLAY][MENU] = enter toggler interactive imode
In imode [PLAY] and [INFO] will toggle back and forwards through your ML condition states giving you an on-screen message
In imode [MENU] will set that condition and leave interactive mode.
@pigeonhill
pigeonhill / 2FOC.lua
Last active December 23, 2017 21:25
Focus Bar
--[[
Focus Bar Script (Version 3.37)
******* ENSURE YOU CHANGE LINES 155/156 TO YOUR CAMERA *******
Menu config is saved, so once you have found your prefered set up, the script will always start in that state. Script works well with the Toggler script.
This script provides a focus bar for visualising the focus defocus field, as well as providing feedback for focus bracketing. '
The script may be switched on and off by doing a halfshutter press longer than 3 sces (the led will blink). The default at camera start up is: off.
A half shutter press of 6+ seconds will toggle the simple DoF mode into full, ie showing more info.
@pigeonhill
pigeonhill / HHFS.lua
Created March 5, 2018 21:21
Auto Hand Held Focus Stacking
--HHFS Script Release 0.8
--[[
********************************************************************************************
This script creates a two image focus stack via aperture bracketing.
The script attempts to maintain the same exposure of the closed down aperture as the base exposure, between two limits: the minimum handheld shutter and the maximum ISO.
The script 'remembers' menu settings at camera close, so you will only need to set them once: only change things as required.
The base exposure should be taken at a wide aperture.
Garry George
@pigeonhill
pigeonhill / 2m.lua
Created May 12, 2018 13:48
EOSM script 2 (Focus Bar)
--[[
Focus Bar Script (Version 1.0) - EOSM Version
Menu config is saved, so once you have found your prefered set up, the script will always start in that state. Script works well with the Toggler script.
This script provides a focus bar for visualising the focus defocus field, as well as providing feedback for focus bracketing. '
This version has been tuned for the EOSM and works with the Toggler Script.
This script switches off ML DoF display, as the script generates all DoFs, and displays them.
@pigeonhill
pigeonhill / 3m.lua
Created May 12, 2018 13:49
EOSM script 3 (Hand Held)
--Hand Held Helper Script (H3S) Release 1.05
--[[
********************************************************************************************
This script attempts to capture 'the best' bracket sequences when hand holding.
Bracketing choices are Exposure or Focus.
In Focus mode the script creates a two image focus stack via aperture bracketing, and attempts to maintain the same exposure between two limits: the minimum handheld shutter and the maximum ISO.
The exposure bracketing mode is based on ISO shifting as well as time shifting.
The general strategy being to time shift from the highlights at the lowst ISO you can, and ISO shift from the shadows from the lowest Tv you can, at ISO 100. That is try and maximise photon capture, ie for the highest DR.
Note pushing ISO too far is pointless, as once above a critical level, Canon cameras go into ISO invariant zone (varies with camera) and overall DR falls with no increase in (read) noise.
@pigeonhill
pigeonhill / 1m.lua
Last active May 24, 2018 20:52
EOSM script 1 (Toggler)
--[[
Simple (no menu, ie runs in the background) script to help control ML states to your ML favorite states using your buttons of choice,
for example the MENU, PLAY & INFO buttons on the EOSM work well.
Note this is the EOSM version
To use the script simply note the following sequences on an EOSM (but you can change these for other cameras):
3+ sec press of screen = enter toggler interactive imode
In imode [PLAY] and [MENU] will toggle back and forwards through your ML condition states giving you an on-screen message
In imode [INFO] will set that condition and leave interactive mode.
In imode pressing (most) any other key, eg [SET] (not [MENU], [INFO] or [PLAY]) will leave interactive mode and use that key as normal: but some keys don't work!'
@pigeonhill
pigeonhill / 1TOG2.lua
Last active June 24, 2018 22:37
Toggler Version B
--[[
Simple (no menu, ie runs in the background) script to help control ML states to your ML favorite states using your buttons of choice,
for example the MENU, PLAY & INFO buttons on the EOSM work well.
Note this is Version B, ie doing it a different way
To use the script simply note the following sequences on an EOSM (but you can change these for other cameras):
[MENU] = normal use of [MENU] if not in imode
[PLAY][PLAY] = normal use of [PLAY]
[PLAY][INFO] = enter toggler interactive imode
In imode [PLAY] and [MENU] will toggle back and forwards through your ML condition states giving you an on-screen message
In imode [INFO] will set that condition and leave interactive mode.
@pigeonhill
pigeonhill / h3s.lua
Last active September 14, 2018 19:51
Hand Held Helper Script
--Hand Held Helper Script (H3S) Release 1.05
--[[
********************************************************************************************
This script attempts to capture 'the best' bracket sequences when hand holding.
Bracketing choices are Exposure or Focus.
In Focus mode the script creates a two image focus stack via aperture bracketing, and attempts to maintain the same exposure between two limits: the minimum handheld shutter and the maximum ISO.
The exposure bracketing mode is based on ISO shifting as well as time shifting.
The general strategy being to time shift from the highlights at the lowst ISO you can, and ISO shift from the shadows from the lowest Tv you can, at ISO 100. That is try and maximise photon capture, ie for the highest DR.
Note pushing ISO too far is pointless, as once above a critical level, Canon cameras go into ISO invariant zone (varies with camera) and overall DR falls with no increase in (read) noise.
@pigeonhill
pigeonhill / ndb.lua
Last active September 25, 2018 23:39
--Neutral Density Script (NDS) Release 0.95
--[[
********************************************************************************************
This script creates a bracket set for post processing, allowing you to simulate an ND filter.
Also you can use the script to create brackets to 'remove people' ;-)
Change the number of brackets or the time delay (s) between brackets using the MENU and INFO keys (Green text)
Toggle between these changes with the INFO key.