Hi
I wanted to be able to use my IXUS 850 as a meter for my old film cameras (many of which don't have meters) - it was possible using the OSD, but not ideal, so I wrote this script in LUA. Feedback much appreciated.
FEATURES
- it doesn't affect your camera settings (it resets any changes it does make, and these are minimal)
- not limited by hardware capabilities (camera shutter speed or aperture)
- Supports Spot and Centre-weighted metering
- fast startup
- attempts to minimize battery consumption
I have done my best to make it portable, but don't have any other devices to test it on; please let me know if it does or doesn't work on your model.
DESIGN NOTES
1. It uses the camera meter to get the brightness value - Aperture and Shutter Speed are calculated mathematically (Bv+Sv=Av+Tv) by the program (not using the camera's in internal routines) so it is not limited by the hardware.
2. At present, the program only alters the metering mode and zoom setting and the focusing mode. All are reset to the original settings before it exits.
3. Spot metering is done at full zoom - this means you can meter directly off a person's face when they are ten feet away. Ideal for the lazy.
4. Centre-weighted metering is done at slightly less than minimum zoom - on the Ixus850, this gives about the right field of view for a 40mm (35mm equivalent) lens, which is close to the typical lens fitted to old film cameras.
TESTING/BENCHMARK
I have tested against my Pentax K100D with both centre-weighted and spot metering, and its usually bang on or within 1/3 stop, which is within a sensible margin of error for real world photography.
ENHANCEMENTS - in priority
1. Restore settings even if you use SHUTTER to quit
2. My eyes are getting old, so I would REALLY like to make the text bigger.
3. Automatically change the shutter speed to a valid range when reading is OVER or UNDER
4. Add more speed settings No Point - mechanical shutters are not that accurate
4. remove the high speed settings above 1/8000
5. Switch f-stop intervals between 1/3,1/2 and full f stop
6. Remove ISO settings above 6400
7. Ought to disable IS to save more power
Anyway, thanks for CHDK - its absolutely fantastic.
Jon
--[[
@title Weston Meter
rem Author: daviesjpuk@gmail.com
rem Version : 1.0
rem Description : Turns your CHDK camera into a spot or centre weighted meter. Tested on SD800 IS.
@param a Film Speed
@default a 16
@param b Shutter Speed
@default b 13
@param c Mode Centre/Spot
@default c 0
@param d Meter Adjustment
@default d 0
--]]
-- standard ISO speeds - see [url=http://en.wikipedia.org/wiki/Film_speed#Film_speed_systems]Wikimedia Error[/url]
FilmSpeed = {6, 8, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100,125,160,200,250,320,400,500,640,800,1000,1250,1600,2000,2500,3000,3200,4000,5000,6400,12800,25600,51200,102400}
-- film SV [url=http://johnlind.tripod.com/science/scienceexposure.html]Photographic Science: Exposure[/url]
sv96= {90,130,161,186,226,257,288,322,353,384,418,449,480,511,545,576,607,641,672,703,737,768,798, 830, 864, 895, 925, 951, 960, 991, 1022,1056,1152, 1248, 1344, 1440}
ShutterSpeed = {"1/16000","1/8000 ","1/4000 ","1/2000 ","1/1000 ","1/500 ","1/250 ","1/125 ","1/60 ","1/30 ","1/15 ","1/8 ","1/4 ","1/2 ","1s ","2s ","4s ", "8s ", "15s ","30s ","1m ","2m ","4m ","6m "}
tv96 = {1341, 1245, 1149, 1053, 957, 861, 765, 669, 567, 471, 375, 288, 192, 96, 0, -96,-192,-288,-375,-471,-567,-663, -759, -855}
-- Fno96= {0,51,93,147,192,243,285,331,384,435,477,527,576,624,664,710,768,816,856}
maxav96={-18,30,76,125,174,222,268,313,363,414,460,507,556,605,648,692,745,797,840,884}
Fno= {"LOW ","f1 ","f1.2 ","f1.4","f1.7","f2 ","f2.4","f2.8","f3.3","f4 ","f4.8","f5.6","f6.7","f8 ","f9.5","f11 ","f13 ","f16 ","f19 ","f22 ","OVER"}
props=require("propcase")
Settings = {}
function Mode ()
if c<1 then
-- minimal zoom, centre weighted
set_zoom(1)
set_prop(props.METERING_MODE,2)
else
-- maximum zoom, point meter
set_zoom(get_zoom_steps())
set_prop(props.METERING_MODE,1)
end
end
function MeterScene()
press ("shoot_half")
sleep (1500)
release ("shoot_half")
end
function SettingsSave ()
-- Settings[1]=get_nd_filter()
Settings[2]=get_prop(props.FOCUS_MODE)
Settings[3]=get_prop(props.METERING_MODE)
--- Settings[4]=get_prop(props.WB_ADJ)
return
end
function SettingsRestore ()
-- set_nd_filter(Settings[1])
set_prop(props.FOCUS_MODE,Settings[2])
set_prop(props.METERING_MODE,Settings[3])
-- set_prop(props.WB_ADJ,Settings[4])
return
end
function SettingsMetering ()
-- nd filter OUT, Focus manual (so it doesnt hunt)
-- set_nd_filter(2)
set_prop(props.FOCUS_MODE,4)
return
end
function FnoLookup(Reading)
for i=1,table.getn(maxav96),1 do
if Reading<maxav96[i] then
return i
end
end
return table.getn(Fno) -- didn't find one - use the biggest
end
function Results ()
local av96
-- av+tv=bv+sv
av96=get_bv96()+d+sv96[a]-tv96[b]
if c==0 then
MODE="CENTRE"
else
MODE="SPOT "
end
print (string.format("ISO %6d Mode %s",FilmSpeed[a],MODE))
print (string.format(" %s %s",ShutterSpeed[b],Fno[FnoLookup(av96)]))
print ("[DISP.] help [MENU] end")
return
end
function help ()
--- 1234567890123456789012345
cls ()
print ("Film ISO [Up][Down]")
print ("Shutter [<][>]")
print ("Spot/Centre [Zoom]")
print ("Meter [SET]")
print ("End [MENU]")
wait_click ()
end
SettingsSave()
SettingsMetering()
Mode ()
MeterScene()
repeat
cls()
Results()
wait_click ()
if is_key("set") then
MeterScene()
elseif is_key("down") then
if a>1 then a=a-1 end
elseif is_key("up") then
if a<table.getn(FilmSpeed) then a=a+1 end
elseif is_key("left") then
if b>1 then b=b-1 end
elseif is_key("right") then
if b<table.getn(ShutterSpeed) then b=b+1 end
elseif is_key("zoom_in") then
if c ~= 1 then
c=1
Mode()
MeterScene()
end
elseif is_key("zoom_out") then
if c~= 0 then
c=0
Mode()
MeterScene()
end
elseif is_key("display") or is_key("print") then
help()
end
until is_key("menu")
SettingsRestore()
press ("print")