The large number of parameters indicates that this command is highly
configurable. Let's see what these parameters mean:
a,b
Number of columns and rows the picture is divided into. By dividing the
picture into cells, motion can be detected in a particular image part (see
variables i, j, k, l, m). A fine grid enables the camera to detect the motion
of small objects, but the camera will also react more slowly to move-
ments.
c
Color component observed.
0 = U channel (chroma, green-blue) in the YUV-color model
1 = Y channel (luma) in the YUV-color model
2 = V channel (chroma, red-green) in the YUV-color model
3 = R channel (red) in the RGB color model
4 = G channel (green) in the RGB color model
5 = B channel (blue) in the RGB color model
d
Timeout in milliseconds. After the specified time, the next uBasic
command will be executed even if no motion is detected.
Time interval (msec) between frames compared. Increase this value to
e
detect slow movements.
Threshold value. If a change in at least one cell is larger than this
f
threshold value, an event is fired.
Grid display on the screen.
g
0 = no cell grid is drawn
1 = cell grid is drawn
Return variable. Contains the number of cells where motion was detected.
h
Masking mode
i
0 = nothing masked
1 = everything inside of (j,k,l,m)
2 = everything outside of (j,k,l,m)
j,k
First column and row of mask
l,m
Last column and row of mask
n
Shutter mode
0 = leave shooting to script
1 = immediate shoot without focusing (fastest shooting option)
9 = don't release shutter on immediate shoot (leave that to script)
Under Lua, n = 0 should always be used. Lua scripts are fast enough and
don't require this work-around for the slow uBasic interpreter.
o
Sub-sampling. Analyze only every o-th pixel. Higher values improve speed
but reduce accuracy.
Delay in milliseconds before triggering starts. Should be zero for lightning
p
photography. Otherwise, allow some delay for calibration.
5.7 Example scripts
165