DirectShow Sample Application: Motion Detection for Intelligent
Video Recording
The MotionDetection sample appliaction shows how to use the
MV Motion
Detection filter. The MV Recording Filter is
controlled by the motion detection filter through a boolean
MontiVision I/O pin connection. MV Recording records the video only
as long as motion is detected within the video. The recorded video
is compressed using MV MJPEG Compressor and
written to an AVI file.
This and other sample applications can be found in the MV
Development Kit installation directory.
Filter Graph Summary
The following filter configuration is used to recognize motion
inside a live video stream and to record this part of the video to
an AVI file. The boolean Record output I/O pin of the
MV Motion
Detection filter starts and stops the recording on the MV Recording filter
through the recording filters boolean Control I/O input
pin.
This filter configuration is used to playback the video files
recorded using the above configuration.
The Application
This sample application uses a MontiVision Smart Control to load and
control the filter configuration and to display the live video
stream. It uses the MV
VideoSourceComboBox, MV VideoSizeComboBox
and MV
SelectInputComboBox controls to select and configure the
video source.
A special feature of this sample is the usage of the the Smart
Controls IMVSCLog interface. Log
messages are sent by the MontiVision Smart Control through the
IMVSmartControlEvents:LogMessage event.
This application monitors the log events in a special logging
window.
The motion detection algorithm is controlled by the
Threshold and Minimum Luminance Difference
sliders.
|