RunPager VS	Video Camera Security System
		Testing Notes
		(c) Copyright 1999 RunPager Software Engineering

----------------------------------------------------------------
Please Select Edit Menu Word Wrap
----------------------------------------------------------------

TESTING THE SETUP

	- 1) Test the Pager and Phone Numbers from the "Setup Phone Numbers" form.

	- 2) Test the Camera Operation from the "Setup Video Camera" form.

	- 3) Return to the "Main" form and press "Start Supervision".  After the camera begins to snap pictures initiate some motion in the camera's visual path.  That should cause a trap and capture the motion detected pictures.  Stop the application and review the pictures.  Shell the "Session Detail" and you will find the threshold values that caused the trip.  Adjust the threshold and sensitivity levels accordingly.  Raising the threshold level requires a greater number of pixels to change in order to cause a trip.  Raising the sensitivity level requires a greater change in the pixels in order for them to be counted as having changed. 

	- 4) Setup the action enables for audio, pager, phone and camera on the "Setup Video Camera" form and retest the system.  

	- 5) Read through the remainder of these notes to fine tune your camera's settings and read the Instruction Manual for further information.

OPTIMIZING SPEED, LIGHT, AND CAMERA SETUP

	- You can run a test of your setup using the "Test Camera Trap" button on the "Video Capture Event" form.  This test will load your camera's software into memory and test four pictures against an initial picture bitmap then shell the results of the threshold and sensitivity comparison to notepad.  You can also test your setup from the main form by pressing the "Start Supervision" button as follows.

	- When you run the application you should be able to get a frame rate of 90 to 180 snapshots per minute.  This rate range seems to be fast enough for most motion detection situations, but that is up to you.  You may be able to get 300 plus frames per minute or 5 or more frames per second.  You can adjust the frame rate from the "Main" form by changing the "Timer Interval Delay", the time delay between camera snaps.  If you cannot get 90 frames per minute there are some checks to make.    

	- CHECK YOUR CAMERA DOCUMENTATION FOR PROPER CAMERA SETUP.

	1) These cameras require some light to operate.  If there is an inadequate amount of light the camera's software may spend a lot of time trying to adjust the camera.  You should supply an adequate amount of light, a small lamp may be enough.  Then, turn off the automatic brightness and contrast controls in your camera's software.

	2) Set the bitmap sampling rate to a higher value.  This will cause less picture bitmap bytes to be compared and speed up the frame rate. 

	3) Use a smaller picture.  For the Connectix Color QuickCam use the one quarter size picture, 160 x 120 pixels.  The picture bitmap size output from your camera cannot exceed 65,500 bytes of information.

	4) Use 8 or 16 bit color mode rather than 24 bit.  Eight bit or 256 color or grayscale mode is only one byte per pixel.  For 160 x 120 byte picture that is 19200 bytes.  For sixteen bit, hi-color mode the same bitmap is 38,400 bytes, twice the size of the eight bit.  For twenty-four bit, true-color mode the same bitmap is 57,600 bytes, three times the size of the eight bit. 

	5) Use uncompressed bitmap output if available.  The software runs faster because it does'nt have to decompress it.

	6) Set your display adapter to the same color mode, (8, 16, or 24 bit), as the camera so the software does'nt have to convert the output.

	- Connectix Color QuickCam Software, I have found that older versions of Connectix Color QuickCam Software run about 1/3 faster frame rates than current version updater software.  The Microsoft VidCap32 executable runs faster than both QuickCam versions and with less anamolies.

THE THRESHOLD AND SENSITIVITY SETTINGS

	- Pixel refers to the term picture element.  Each picture is comprised of a great number of these picture elements.  A matrix of these pixels that makeup a picture is called a picture bitmap.  The picture element holds the color code for the pixel, a number 1, 2 or 3 bytes in length depending on the display color mode 8, 16, or 24 bits.

	- The threshold setting is that percentage of sampled pixel comparisons that have changed sufficent to cause a trip.  For instance, a 10% setting will cause the program to trip if 10% of the sampled pixels have changed by the sensitivity percentage amount.  Raising the threshold level requires a greater number of pixels to change in order to cause a trip.

	- The sensitivity setting is that percentage of the average amount the sampled pixels each change.  For instance, a 10% setting of the sensitivity will cause the pixel to be counted as changed if it changed by 10%.  With the camera and lighting setup complete run the camera test from the "Setup Video Camera Capture" form.  Set the sensitivity level just above the level norm reported for the four pictures snapped.  Run the test again.  If the sensitivity level reported is 0 then the sensitivity setting is complete.  Raising the sensitivity level requires a greater change in the pixels in order for them to be counted as having changed.

TOTAL DARKNESS SETTING

	- After you have the camera setup and working properly you will need to test it for a loss of light in case you lose the light source like a bulb burning out.  You probably don't want a false trip in the middle of the night.  Set the "Total Darkness" to the highest setting, 98% then start the program and turn off the light souce.  The application should cause a trip.  You can then shell the "Session Detail" records to notepad and see what threshold level caused the trap.  Set the total darkness threshold to some level below this, then, any threshold above that setting will not cause a trip.  If on the other hand you want a loss of light to cause a trip then set the total darkness setting to 98%.

BEWARE OF CHANGING LIGHT SOURCES

	- To avoid false trips setup a single light source to illuminate the monitored area. Setup your camera to avoid secondary light sources such as a passing car's headlights or the sun light being altered by moving clouds shining through a window into the camera's visual path.