MV Optical Flow DirectShow Filter

The MontiVision OpticalFlow filter is used to find optical flow withhin a video stream. The filter uses a block matching algorithm to find moved blocks in the current image. The I/O output pin signals if the number of moved block oversteps an adjustable threshold. For example you can control the MV Recording filter to record a video stream only if there is motion within a scene.

This MontiVision DirectShow Filter is used in combination with the MontiVision Smart Control in the DirFinder Sample Application.

 

File: OpticalFlow.ax
CLSID: CLSID_MVOpticalFlow

 

Supported Interfaces

IMVOpticalFlow

IMVOpticalFlow2

IMVFilterData

IMVFilterInfo

IMVAbout

 

Supported COM Events

The filter supports following events through the IMVFilterEvents interface. Look at the filter events page for more information.

Event

Value

Description
MV_ALGORITHM_START_EVENT

0

A filter starts processing a video frame or sample.
MV_ALGORITHM_END_EVENT

1

A filter finishes processing a video frame or sample.

 

Supported I/O Pins

I/O Pin Corresponding method Discription
Motion Out
[BOOL]
IMVOpticalFlow::get_MotionDetection Returns the currently state of the motion detection flag. The flag is TRUE, if the last image contains an adjustable minimum motion to the previous image.

MV Optical Flow Property Page

Implements the IMVOpticalFlow configuration interface.

MontiVision Optical Flow DirectShow Filter Property Page

 

use previous velocity field Enables the continous storing of the motion vectors.
copy image Copy the input image to the output image.
segmentation Enables the segmentation mode from the filter. The output image contains all moved blocks.
draw vectors Draws the motion vectors into the output image.
colour Select a color for the motion vectors.
threshold Percentage blocks that must have a motion vector to set the I/O output pin to TRUE. 
post-roll Image count after the last detected motion for the motion detection output flag is set to "motion detected".
Block/Shift Size The block/shift size sets the size of a block for the matching algorithm and the shift value for motion detection. Both values have the same size and the image size must be perfectly divisible by the block and shift size.
Max Range Spezifies a range around the block. Withhin this range the filter search for the moved block. Kindly note that a greater range decrease the performance.