Operating instructions

You should now be able to view image.bmp with a viewing application, like Gimp or
GQView.
Making an Image Mask
For its video processing, the Video Sentinel box uses an image mask to control which
parts of the input image are noticed and which parts are ignored. The image mask is just
a 640 (horizontal) by 480 (vertical) byte array that define a threshold for each pixel of the
incoming video image. If the value of the byte is 255 (maximum), then the threshold is
too large to ever be crossed and so no changes at that pixel location will ever be noticed.
If the value of the byte is 0, then even insignificant changes at that pixel location will be
noticed.
The plan, therefore, is to create an image mask file, exactly 640 * 480 bytes in size
(307,200 bytes), in which the areas of interest are set to a reasonable threshold and all
other areas are set to 255. For our cameras, we have been using threshold values of
between 35 and 40. Depending on your ambient lighting condition and how noisy your
camera is, you may require higher or lower values.
If the entire image is of interest, you should create a file in which all the bytes are set to
the same threshold value. You can create such a file by typing the following in a terminal
window:
python -c "open('mask.dat','w').write(chr(40)*640*480)"
This creates a file named "mask.dat", exactly 640*480 bytes in size, in which each byte is
set to 40.
If only parts of the input image are of interest, then a more complicated image mask must
be created. This typically involves two steps:
1) Capture an image from the camera to use as a template.
2) Manipulate the image to form an image mask.
The sentuser program (as described above) can be used to capture a gray-scale image to a
file from the camera connected to the Video Sentinel box. This image file is 640*480
bytes in size.
A number of tools can then be used to manipulate the image to form an image mask. I
like to use NIH Image for Macintosh. However, on Linux you can use Gimp.
Unfortunately, Gimp does not import gray-scale files directly so the file must first be
converted to something Gimp can understand, manipulated in Gimp, and then converted
back to a raw gray-scale file at the end.