Waterwingz (talk | contribs) m (→Script Notes) |
Tag: Visual edit |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
This script provides a complete HDR / Exposure Bracketing environment for use with CHDK. |
This script provides a complete HDR / Exposure Bracketing environment for use with CHDK. |
||
− | It combines various aspects of many existing HDR scripts and will work on any CHDK |
+ | It combines various aspects of many existing HDR scripts and will work on any CHDK equipped camera. It has no embedded keyboard presses or fixed parameter set variables that would make it specific to a particular camera. However, it is designed to run best with CHDK 1.2.0 or newer - see the bottom of this page for instructions on converting for CHDK 1.1.0. |
==Script Description== |
==Script Description== |
||
Line 12: | Line 12: | ||
The script allows the user to vary one of the three camera exposure parameters (Tv, Av, Sv) while holding the other two fixed. This results in several shots at different exposure settings, suitable for creating HDR images in your computer. |
The script allows the user to vary one of the three camera exposure parameters (Tv, Av, Sv) while holding the other two fixed. This results in several shots at different exposure settings, suitable for creating HDR images in your computer. |
||
− | Note : as many Canon P&S cameras do not have adjustable |
+ | Note : as many Canon P&S cameras do not have adjustable aperture. |
forum link > http://chdk.setepontos.com/index.php?topic=9557 |
forum link > http://chdk.setepontos.com/index.php?topic=9557 |
||
Line 18: | Line 18: | ||
==Script Operation== |
==Script Operation== |
||
⚫ | |||
− | The UltraHDR script has five parameters that can be set. These are : |
||
⚫ | |||
#Exposure Steps - this determines the number of photos taken at different exposures. |
#Exposure Steps - this determines the number of photos taken at different exposures. |
||
#<span style="line-height:20.98958396911621px;">1/2 f-stops per step - the exposure adjustment made between shots</span> |
#<span style="line-height:20.98958396911621px;">1/2 f-stops per step - the exposure adjustment made between shots</span> |
||
− | #<span style="line-height:20.98958396911621px;"> |
+ | #<span style="line-height:20.98958396911621px;">Exposure offset - allow you to shift the exposure of all shots up or down by a fixed amount.</span> |
#<span style="line-height:20.98958396911621px;">Raw - override current RAW setting (restored on script exit)</span> |
#<span style="line-height:20.98958396911621px;">Raw - override current RAW setting (restored on script exit)</span> |
||
Line 30: | Line 29: | ||
'''UltraHDR.lua''' : for CHDK v1.2.0 or greater (see note below) |
'''UltraHDR.lua''' : for CHDK v1.2.0 or greater (see note below) |
||
− | + | <syntaxhighlight lang="lua"> |
|
--[[ |
--[[ |
||
Line 119: | Line 118: | ||
restore() |
restore() |
||
print("...done") |
print("...done") |
||
− | </syntaxhighlight |
+ | </syntaxhighlight> |
Line 149: | Line 148: | ||
</syntaxhighlight> |
</syntaxhighlight> |
||
+ | [[Category:HDR]] |
||
+ | [[Category:Bracketing]] |
Revision as of 07:33, 29 July 2014
This script provides a complete HDR / Exposure Bracketing environment for use with CHDK.
It combines various aspects of many existing HDR scripts and will work on any CHDK equipped camera. It has no embedded keyboard presses or fixed parameter set variables that would make it specific to a particular camera. However, it is designed to run best with CHDK 1.2.0 or newer - see the bottom of this page for instructions on converting for CHDK 1.1.0.
Script Description
The script allows the user to vary one of the three camera exposure parameters (Tv, Av, Sv) while holding the other two fixed. This results in several shots at different exposure settings, suitable for creating HDR images in your computer.
Note : as many Canon P&S cameras do not have adjustable aperture.
forum link > http://chdk.setepontos.com/index.php?topic=9557
Script Operation
- HDR mode - choose better shutter (Tv), Iris (Av), or ISO (Sv).
- Exposure Steps - this determines the number of photos taken at different exposures.
- 1/2 f-stops per step - the exposure adjustment made between shots
- Exposure offset - allow you to shift the exposure of all shots up or down by a fixed amount.
- Raw - override current RAW setting (restored on script exit)
Lua Script
UltraHDR.lua : for CHDK v1.2.0 or greater (see note below)
--[[
@title Ultra HDR
@param m HDR Exposure Mode
@default m 0
@values m Shutter Iris ISO
@param n Exposure Steps
@default n 3
@range n 2 8
@param a 1/2 f-stops per Step
@default a 2
@range a 1 10
@param e Exposure Offset (stops)
@default e 0
@range e -4 4
@param r Raw & DNG
@default r
@values r Ignore Disable Enable
--]]
-- release AF lock & restore RAW state on exit
function restore()
if ( r>0 ) then set_raw(rawmode) end
set_aflock(0)
end
--setup
set_console_layout(1, 0, 45, 12)
rawmode=get_raw()
if( r>0 ) then set_raw(r-1) end
print("Ultra HDR started...")
-- switch to shooting mode
if ( get_mode() == false ) then
sleep(1000)
set_record(1)
while ( get_mode() == false) do
sleep(100)
end
end
sleep(100)
-- focus and take exposure
press("shoot_half")
repeat
sleep(50)
until get_shooting() == true
release("shoot_half")
repeat
sleep(50)
until get_shooting() == false
set_aflock(1)
av=get_av96()
sv=get_sv96()
tv=get_tv96()
-- configure the shots
print( "start","tv=", tv, "av=", av, "sv=", sv )
s=a*48
tv_inc=0
av_inc=0
sv_inc=0
if(m==0) then
tv=tv-n*s/2+e*96
tv_inc=s
elseif ( m==1 ) then
av=av-n*s/2+e*96
av_inc=s
elseif ( m == 2 ) then
sv=sv-n*s/2+e*96
sv_inc=s
end
--shoot
for i=1, n, 1 do
print(i, "tv=", tv, "av=", av, "sv=", sv )
set_tv96_direct(tv)
set_av96_direct(av)
set_sv96(sv)
shoot()
tv = tv + tv_inc
av = av + av_inc
sv = sv + sv_inc
end
restore()
print("...done")
Script Notes
For CHDK versions 1.1 or earlier, change the header of the script to the following :
--[[
@title Ultra HDR
@param m Mode [Tv=0,Ev=1,Sv=2]
@default m 0
@range m 0 2
@param n Exposure Steps
@default n 3
@range n 2 8
@param a 1/2 f-stops per Step
@default a 2
@range a 1 10
@param e Exposure Offset [stops]
@default e 0
@range e -4 4
@param r Raw/DNG [0=auto,1=off,2=on]
@default r
@range r 0 2
--]]