|
The Grouplab MotionDetector uses a camera to detect motion in
its field of view by differencing successive video frames. The control shows the
differenced image.
With this control, the
programmer can:
- adjust the sensitivity of the threshold that determines
when motion has actually occurred
- adjust the timing of successive snapshots
- get notified of every report or only when a motion has
occurred that is higher than the threshold
Implemented Interfaces
The usual ones automatically supplied with ActiveX Controls
made in Visual Basic
Dependencies
Requires separate installation of:
- VB Runtime
- GLAB Core
- Glab Camera
Notes of things to be fixed before the official release
This is just a quick and dirty implementation. I would like
to put in a 'sleep' duration, where it recognizes if any activity has occurred
in, say, the last 15 minutes.
|
|
Properties
| Property |
Access |
Description |
| Enabled as Boolean |
Let, Get By Value |
A standard ActiveX Property.
Enables user actions over the control |
| ReadingInterval as Integer |
Let, Get By Value |
The time between readings, in 1000s of a
second. Has the same length restrictions as timers. |
| Sensitivity as Integer |
Let, Get By Value |
A number between 1 and 100 that
determines the sensitivity of the motion detector before a MotionDetected
event is raised. See Notes below. |
Methods
| Signature |
Description |
| InitializeObject () As Boolean |
Must be run before any other methods are
called. This establishes a link to the camera, and sets things going. Returns True if successful, otherwise False |
Events
| Signature |
Description |
| Clicked |
Triggered when a user clicks on the
image. |
| MotionDetected (Reading As Integer) |
Triggered when a reading is obtained that
is higher than the sensitivity indicated in the Sensitivity property |
| NewReading (Reading as Integer) |
Triggered whenever a new reading is taken |
Notes
This control works by creating an image that is the
difference between two successive images taken from a camera, and by calculating
a difference value based on the average intensity of that differenced image (see
GLAB Core for details). This difference is then reported as a number between 0
(no difference) and 100 (maximum difference). While this gives an estimate of
motion in a room, it is just that: an estimate.
In practice, a value of 0 is rare: background noise usually produces a value of at least
1. A person
sitting more or less still in front of the camera generates readings
between 2-6. Very large motions close to the camera gives results between
10-20. Extremely large scene changes will produce higher values. Exact numbers can be affected by lighting and camera quality.
The best way
to determine what reading will provide a good sensitivity level in the
Sensitivity property is to use the sample program (which
shows the readings) to find the setting that works best within your
environment.
Samples
See sample projects included with the release.
|