Skip to content

Instantly share code, notes, and snippets.

@pigeonhill
pigeonhill / SGFB.lua
Last active April 24, 2019 20:42
Simple Get Focus Brackets (ML)
--[[
Get Focus Brackets
This is a Lua 'simple script' to capture 'perfect' focus brackets from the current focus position to a defocus blur defined infinity, as defined by the ML CoC.
I wrote it to cover Multi-Image, Deep Field photography needs.
There is no menu: just run the script from the ML Scripts menu.
The UI is simple, but functional: just follow the on screen instructions. The script pauses to allow you to decide if you wish to complete, ie in case
there are too many brackets. During the pause you can refocus, change aperture and focal length, ie to change the number of brackets.
Also, during the pause the SET key can be used, ie for ETTRing. A half shutter will take the brackets, any other key, other than SET, will terminate the script.
The number of estimated brackets is the minimum you will get. The actual number may slightly be larger. That is the estimate assumes perfectly touching brackets, something that the Canon
lens conrol can't achieve. The scripts trys to account for differences between
@pigeonhill
pigeonhill / Get Focus Bracket.lua
Last active May 31, 2019 17:35
Get Focus Bracket (ML)
--[[
Get Focus Brackets
This is a Lua 'simple script' to capture 'perfect' focus brackets from the current focus position to a defocus blur defined infinity.
I wrote it to cover auto capture, Multi-Image, Deep Field photography needs.
This version includes a modified split thin lens model, which better matches the real world.
There is no menu: just run the script from the ML Scripts menu.
The UI is simple, but functional: just follow the on screen instructions. The script pauses to allow you to decide if you wish to complete, ie in case
there are too many brackets. During the pause you can refocus, change aperture and focal length, ie to change the number of brackets.
During the pause the SET key can be used, ie for ETTRing. A long half shutter will take the brackets, any other key, including a half shutter press, but other than SET, will terminate the script.
@pigeonhill
pigeonhill / LBS.lua
Last active June 12, 2023 16:15
LBS (CHDK)
--[[
Landscape Bracketing Script (LBS)
Capture 'perfect' focus brackets, with focus overlap defined in terms of defocus (CHDK) Circle of Confusion blur
Focus bracketing strategies are: current position to blur-defined infinity (X2INF); min camera focus to blur-defined infinity (Min2INF); H/x to infinity (H/x2INF);...
and Min focus to current focus position (Min2X).
Overlap, ie bracket to bracket, is definded in terms of the defocus (CoC) blur, eg CoC/2 means focus brackets 'touch' at a CHDK defocus blur of CoC/2.
@pigeonhill
pigeonhill / CyclerB.lua
Last active May 12, 2019 06:04
Button version of Cycler
--[[
Cycler B(utton version)
[PLAY] = A hijacked button that (repeatedly pressing) allows you to cycle through various options that this button can do: change ML state to the next one, use [PlAY] normally, shoot a bookmark image
Straight after [PLAY]
[Half_Shutter_Press] = reverse state change cycle direction (black = to the right, red = anitclocto the left)
[MENU] = select/run option
[anykey] other than [PLAY] or [MENU] when cycling = normal action plus resets cycle and show the ML state you are in
Options and ML states are shown in RHS of the ML top bar
@pigeonhill
pigeonhill / Cycler.lua
Last active March 24, 2019 07:36
Simple ML script to cycle through different ML menu states
--[[
Cycler
[PLAY]+[Anykey, eg half shutter press] = null/reset [PLAY]
[PLAY]+{various button_delays}+[PLAY] = additional functionality as displayed in top bar
Note: functionally is temporally enhanced after pressing [PLAY], by waiting to see additional options appear then pressing [PLAY] to select
Version 0.42
Garry George March 2019
@pigeonhill
pigeonhill / lbs.lua
Last active March 2, 2019 08:24
CHDK Landscape Bracketing
--[[
@title Landscape Bracketing
'Perfect' focus brackets from near to blur defined 'infinity': overlap defined at a fraction of camera's CoC
Plus option of two additional exposure brackets at each focus step, at 1Ev, 2Ev or 3Ev using -/+ or -/-- or +/++ logic
More info at https://chdk.wikia.com/wiki/Landscape_Focus_Bracketing_:_perfect_near_to_far_focus_brackets
Camera should be in manual focus mode and M mode
Release 1.9985
Tested on a G7X & G1X
(c) Garry George
@chdk_version 1.5
@pigeonhill
pigeonhill / DoF Bar.lua
Last active February 10, 2020 21:52
DoF Bar
-- DoF Bar
-- Version 1.672
-- Released Feb 2020
-- Garry George - http://photography.grayheron.net/
--[[
DOF Bar User Guide
DoF Bar is principally targeted at those that wish to obtain 'tack sharp' images from infinity to a near-field point of interest, eg landscape and cityscape photographers; either from a single image or through focus bracketing.
It can, however, also be useful to those who simply wish to know more about their depth of field (DoF).
@pigeonhill
pigeonhill / 4m.lua
Created May 12, 2018 13:50
EOSM script 4 (ND)
--Neutral Density Script (NDS) Release 0.9M
--[[
********************************************************************************************
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 PLAY keys (Green text)
Toggle between these changes with the UP key.
@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 / 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.