CHDK fotografowanie piorunów,błyskawic
szperając po stronach ze skryptami natknąłem się na ciekawy skrypt przydatny przy fotografowaniu piorunów
jest to modyfikacja skryptu do wykrywania ruchu
wersja MX3
(łatki na firmware aparatu)
http://mx3.ip-com.com.ua/chdk/
wersja Fingalo
http://hem.passagen.se/fsmmal/chdk2.html
najnowsza wersja Fingalo obsługuje wykrywanie ruchu (błyskawic),regulację kompresji video oraz możliwość sterowania aparatu z pilota (wykrywa podpięcie aparatu pod USB i zaczyna robić fotki,można prostego pilota samemu sobie zrobić z gniazdka usb przycisku i baterii CR2032-kuknij http://ewavr.nm.ru/chdk/remote.htm )
plus musimy mieć skrypt (który działa na tych wersjach)
do wykrywania błyskawic
http://chdk.wikia.com/wiki/Talk:Samp...n_Detection.3F
a tu drugi skrypt działający na innej zasadzie dla niektórych typów aparatów http://chdk.wikia.com/wiki/UBASIC/Sc...ng_Photography
Motion-detection Parameters
pojawił się na Wiki w końcu jakiś ciut większy opis parametrów do skryptu:
md_detect_motion a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p
md_get_cell_diff (column), (row), x
Referring to the 'md_detect_motion' command-parameters in the WIKI article, 'a' and 'b' define the number of rows and columns to split the screen into. (If values less than zero are entered or if total number of cells is greater than 1024, it defaults to 3 x 3.)
Parameter 'g' determines if the a grid showing the detected cells is displayed.
Parameters 'j,k,l,m' define a sub-area of the screen where motion-detection is restricted-to or excluded-from.
Parameter 'i' determines if the region is inclusion/exclusion or do not use regions.
You may detect motion based on changes of luminance (Y), blue – luminance (U), red – luminance (V) or individual R, G or B values.
Parameter 'c' sets that mode.
( For an example of an image split into it's YUV components, see this WIKI article. )
For non-specialised use, luminance (c = 1) will be used.
You then need to set a threshold-value (in parameter 'f') for the desired mode that will not result in triggering in 'normal' operation.
The motion-detection event may be triggered by quick or slow changes in the screen image, set a suitable value with parameter 'e'.
The greatest accuracy of movement-detection results when every pixel is sampled but a faster response (suitable for some applications) may be obtained with a larger pixel-step.
Set an appropriate value in parameter 'o'.
Set a maximum-time for a motion-detection event to occur with parameter 'd' so that after that time the script-command terminates.
Motion-detection Parameters :
columns, // input parameter. number of columns to split screen into
rows, // input parameter. number of rows to split screen into
pixel_measure_mode, // input parameter. // 1 - for Y, // 2 for U, // 3 for V, // 4 for gray, // 5 for R, - // 6 for G, // 7 for B
detection_timeout, // input parameter. number of millisecnds to abort detection. detected_cells_count will be 0 for timeout condition
measure_interval, // input parameter. number of milliseconds between comparison of two pictures
threshold, // input parameter. difference value for which procedure will trigger detection of changes draw_grid, // boolean input parameter. // true(1) to draw grid(detected sectors/cells). // false(0) - to not display grid/detected sectors
detected_cells_count, // output parameter. count of cells where pixel values differs enough to trigger motion detection // clipping. allows to exclude some region from mtion detection triggering // or use onli selected area to make motion detection // I'm not sure that following parameters are required but using them anyway
clipping_region_mode, // input parameter. // 0 no clipping regions // 1 - for excluding selected region from motion detection // 2 - use this only region to make motion detection clipping_region_column1, // input parameter. clipping_region_row1, // input parameter. // this is top-left corner of clipping region
clipping_region_column2, // input parameter. clipping_region_row2, // input parameter. // this is right bottom corner of clipping region)
function md_get_cell_diff ( col [in], // column of the cell we are requesting row [in], // row of the cell we are requesting val [out] // value of difference between measurements/comparisons)
reserved parameters clipping regions, pixel_measure_mode draw_grid
Motion Detection - wykrywanie ruchu
oryginalny skrypt działa u mnie tak ,że jak wykryje ruch strzela fotki na okrągło
przerobiłem go tak ,że można w nim definiować ile ma zrobić fotek (post w wątku)
potem zacząłem kombinować jak zrobić , żeby
jeśli wykryje ruch-robił fotkę a potem przechodził znów w tryb wykrywania
nie mogłem sobie z tym dać rady aż w końcu znalazłem podobnie działający skrypt i lekko go przerobiłem
wygląda tak:
@title motion_no_loop
@param a Columns
@default a 2
@param b Rows
@default b 2
@param c Threshold (0-255)
@default c 10
@param d compare Interval (millisecs)
@default d 80
@param e Begin Triggering Delay(secs)
@default e 0
@param f Detect Timeout (seconds)
@default f 0
@param g pix step(speed/accuracy adj)
@default g 8
@param h reg mode(0-no,1-incl,2-excl)
@default h 0
@param i 1Y,U0,V2,4gray, 5R, 6G, 7B
@default i 1
if a<1 then let a=1
if b<1 then let b=1
if c<0 then let c=0
if g<1 then let g=1
if f<1 then let f=1
let f=f*1000
let e=e*1000
:loop
let t=0
md_detect_motion a, b, i, f, d, c, 1, t, h, 2, 2, a-1, b-1, 0, g, e
if t = 0 then goto "loop"
shoot
goto "loop"
if t<1 then goto "1"
shoot
:1
end
EV bracketing skrypt -wersja 2
poprzednia wersja z jakiś dziwnych powodów nie działa zawsze poprawnie
napisałem 2 wersję-ta wygląda już na stabilną
jest tylko 1 błąd-jeśli nie zaczniemy braketingu od pozycji 0 a np "-1"-skrypt po skończeniu zresetuje korekcję do 0 ,a na ekranie dalej widać "-1"
dopiero przyciśnięcie przycisku +/- (we w korekcję ekspozycji) ustawia aparat do takiej wartości jak na ekranie-jak to obejść nie mam pojęcia
skrypt:
@title symmetry EV Braketingv2
@param a Range EV (a/3 EV)
@default a 1
@param b Step size (b/3 EV)
@default b 1
@param c Shots in 1 (b/3EV ) step
@default c 1
q=-a*32
p=b*32
if b=0 then goto "end2"
if a>6 then goto "end2"
if b>6 then goto "end2"
if c<1 then let c=1
if a=1 and b=1 then d=2*p
if b>a then goto "end2"
if a=2 and b=1 then d=4*p
if a=2 and b=2 then d=p
if a=3 and b=1 then d=6*p
if a=3 and b=2 then d=3*p
if a=3 and b=3 then d=2*p
if a=4 and b=1 then d=8*p
if a=4 and b=2 then d=4*p
if a=4 and b=3 then goto "end2"
if a=4 and b=4 then d=2*p
if a=5 and b=1 then d=10*p
if a=5 and b=2 then d=5*p
if a=5 and b=3 then goto "end2"
if a=5 and b=4 then goto "end2"
if a=5 and b=5 then d=2*p
if a=6 and b=1 then d=12*p
if a=6 and b=2 then d=6*p
if a=6 and b=3 then d=4*p
if a=6 and b=4 then d=3*p
if a=6 and b=5 then goto "end2"
if a=6 and b=6 then d=2*p
if d/p>1 then print "Total Shots",((d/p)+1)*c else print "Total Shots",((d/p)+2)*c
if c>1 then print "Make",c,"Shots in 1 Step"
for s=q to -q step p
if s=-192 then print "Shot -2 EV"
if s=-160 then print "Shot -1 2/3 EV"
if s=-128 then print "Shot -1 1/3 EV"
if s=-96 then print "Shot -1 EV"
if s=-64 then print "Shot -2/3 EV"
if s=-32 then print "Shot -1/3 EV"
if s=0 then print "Shot 0 EV"
if s=32 then print "Shot +1/3 EV"
if s=64 then print "Shot +2/3 EV"
if s=96 then print "Shot +1 EV"
if s=128 then print "Shot +1 1/3 EV"
if s=160 then print "Shot +1 2/3 EV"
if s=192 then print "Shot +2 EV"
set_prop 25 s
set_prop 26 s
for w=1 to c
shoot
next w
next s
:end
print "Reset exposure to 0"
set_prop 25 0
set_prop 26 0
end
:end2
print "Error, check parameters"
end
ta wersja robi fotki niezależnie czy aparatowi uda się złapać ostrość czy nie-poprawka na to może będzie w następnej wersji ;)
EV braketing poszerzony do 4 EV
przeczytałem na wiki ,że można zwiększyć zakres kontroli ekspozycji z "-2EV do +2 EV" jaki ma domyślnie aparat na "-4EV do +4EV"
po co komu taka rozpietość nie wiem ...no ale dodałem do skryptu ;)
+-3EV w exif-ie się pokazuje ale przy 4EV już nie
przy tak dużych zmianach żeby zobaczyć jakiś efekt trzeba podbić ISO na full- zazwyczaj, co i tak przy+3EV lub +4EV czasami nie daje efektu (w minus nie ma problemu)
@title symmetry EV Braket 5
@param a Range EV (a/3 EV)
@default a 1
@param b Step size (b/3 EV)
@default b 1
@param c Shots in 1 (b/3EV ) step
@default c 1
get_prop 25 i
q=-a*32
p=b*32
if b=0 then goto "end2"
if a>12 then goto "end2"
if b>12 then goto "end2"
if c<1 then let c=1
if a=1 and b=1 then d=2*p
if b>a then goto "end2"
if a=2 and b=1 then d=4*p
if a=2 and b=2 then d=p
if a=3 and b=1 then d=6*p
if a=3 and b=2 then d=3*p
if a=3 and b=3 then d=2*p
if a=4 and b=1 then d=8*p
if a=4 and b=2 then d=4*p
if a=4 and b=3 then goto "end2"
if a=4 and b=4 then d=2*p
if a=5 and b=1 then d=10*p
if a=5 and b=2 then d=5*p
if a=5 and b=3 then goto "end2"
if a=5 and b=4 then goto "end2"
if a=5 and b=5 then d=2*p
if a=6 and b=1 then d=12*p
if a=6 and b=2 then d=6*p
if a=6 and b=3 then d=4*p
if a=6 and b=4 then d=3*p
if a=6 and b=5 then goto "end2"
if a=6 and b=6 then d=2*p
if a=7 and b=1 then d=14*p
if a=7 and b=2 then d=7*p
if a=7 and b=3 then goto "end2"
if a=7 and b=4 then goto "end2"
if a=7 and b=5 then goto "end2"
if a=7 and b=6 then goto "end2"
if a=7 and b=7 then d=2*p
if a=8 and b=1 then d=16*p
if a=8 and b=2 then d=8*p
if a=8 and b=3 then goto "end2"
if a=8 and b=4 then d=4*p
if a=8 and b=5 then goto "end2"
if a=8 and b=6 then goto "end2"
if a=8 and b=7 then goto "end2"
if a=8 and b=8 then d=2*p
if a=9 and b=1 then d=18*p
if a=9 and b=2 then d=9*p
if a=9 and b=3 then d=6*p
if a=9 and b=4 then goto "end2"
if a=9 and b=5 then goto "end2"
if a=9 and b=6 then d=3*p
if a=9 and b=7 then goto "end2"
if a=9 and b=8 then goto "end2"
if a=9 and b=9 then d=2*p
if a=10 and b=1 then d=20*p
if a=10 and b=2 then d=10*p
if a=10 and b=3 then goto "end2"
if a=10 and b=4 then d=5*p
if a=10 and b=5 then d=4*p
if a=10 and b=6 then goto "end2"
if a=10 and b=7 then goto "end2"
if a=10 and b=8 then goto "end2"
if a=10 and b=9 then goto "end2"
if a=10 and b=10 then d=2*p
if a=11 and b=1 then d=22*p
if a=11 and b=2 then d=11*p
if a=11 and b=3 then goto "end2"
if a=11 and b=4 then goto "end2"
if a=11 and b=5 then goto "end2"
if a=11 and b=6 then goto "end2"
if a=11 and b=7 then goto "end2"
if a=11 and b=8 then goto "end2"
if a=11 and b=9 then goto "end2"
if a=11 and b=10 then goto "end2"
if a=11 and b=11 then d=2*p
if a=12 and b=1 then d=24*p
if a=12 and b=2 then d=12*p
if a=12 and b=3 then d=8*p
if a=12 and b=4 then d=6*p
if a=12 and b=5 then goto "end2"
if a=12 and b=6 then d=4*p
if a=12 and b=7 then goto "end2"
if a=12 and b=8 then d=3*p
if a=12 and b=9 then goto "end2"
if a=12 and b=10 then goto "end2"
if a=12 and b=11 then goto "end2"
if a=12 and b=12 then d=2*p
if d/p>1 then print "Total Shots",((d/p)+1)*c else print "Total Shots",((d/p)+2)*c
if c>1 then print "Make",c,"Shots in 1 Step"
for s=q to -q step p
if s=-384 then print "Shot -4 EV"
if s=-352 then print "Shot -3 2/3 EV"
if s=-320 then print "Shot -3 1/3 EV"
if s=-288 then print "Shot -3 EV"
if s=-256 then print "Shot -2 2/3 EV"
if s=-224 then print "Shot -2 1/3 EV"
if s=-192 then print "Shot -2 EV"
if s=-160 then print "Shot -1 2/3 EV"
if s=-128 then print "Shot -1 1/3 EV"
if s=-96 then print "Shot -1 EV"
if s=-64 then print "Shot -2/3 EV"
if s=-32 then print "Shot -1/3 EV"
if s=0 then print "Shot 0 EV"
if s=32 then print "Shot +1/3 EV"
if s=64 then print "Shot +2/3 EV"
if s=96 then print "Shot +1 EV"
if s=128 then print "Shot +1 1/3 EV"
if s=160 then print "Shot +1 2/3 EV"
if s=192 then print "Shot +2 EV"
if s=224 then print "Shot +2 1/3 EV"
if s=256 then print "Shot +2 2/3 EV"
if s=288 then print "Shot +3 EV"
if s=320 then print "Shot +3 1/3 EV"
if s=352 then print "Shot +3 2/3 EV"
if s=384 then print "Shot +4 EV"
set_prop 25 s
set_prop 26 s
for w=1 to c
get_prop 67 j
j=1
if j=0 then goto "end3"
shoot
next w
next s
:end
set_prop 25 i
set_prop 26 i
end
:end2
print "Error, check parameters"
end
:end3
print "focus immposible"
print "set AF FRAME from AiAF"
print "to Center or Center to"
print "AiAF-maybe it help"
end