IMVAdvancedOpticalFlow
IMVAdvancedOpticalFlow Interface.
The IMVAdvancedOpticalFlow interface contains methods and properties to configure the MV AdvancedOpticalFlow filter.
Methods:
| AutoReset | Automatically starts a new feature detection after a specified number of processed frames (see NumOfFrames). |
| DrawColor | Set color for drawing the direction arrow. |
| DrawOpticalFlow | Draw optical flow arrows onto video. |
| FeatureQuality | Quality level for feature selection (0.01 to 100.0). |
| GetMotion | Get the motion detection flag. |
| GetMotionDirection | Get the main direction of the motion. |
| GetMotionMagnitude | Get the main direction of the motion. |
| MinimalDistance | Minimum distance between two feature points. |
| NumOfFrames | Number of frames to be processed before a new set of features is selected (see AutoReset). |
| ResetFeatures | New feature detection. |
| Threshold | Feature point motion smaller than this threshold (in pixel) are ignored. |
| GetMotionXPosition | Get the average horizontal position of the motion. |
| GetMotionYPosition | Get the average vertical position of the motion. |
Header file: IMVAdvancedOpticalFlow.h
Interface definition language file:
IMVAdvancedOpticalFlow.idl
Typelib: MVAdvancedOpticalFlow
Interface ID: IID_IMVAdvancedOpticalFlow
Property IMVAdvancedOpticalFlow::AutoReset
Declaration: Property Get/Put AutoReset As BooleanAutomatically starts a new feature detection after a specified number of processed frames (see NumOfFrames).
C Prototype:HRESULT put_AutoReset(VARIANT_BOOL newVal);
HRESULT get_AutoReset(VARIANT_BOOL* pVal);
Property IMVAdvancedOpticalFlow::DrawColor
Declaration: Property Get/Put DrawColor As LongSet color for drawing the direction arrow.
C Prototype:HRESULT put_DrawColor(LONG newVal);
HRESULT get_DrawColor(LONG* pVal);
Property IMVAdvancedOpticalFlow::DrawOpticalFlow
Declaration: Property Get/Put DrawOpticalFlow As BooleanDraw optical flow arrows onto video.
C Prototype:HRESULT put_DrawOpticalFlow(VARIANT_BOOL newVal);
HRESULT get_DrawOpticalFlow(VARIANT_BOOL* pVal);
Property IMVAdvancedOpticalFlow::FeatureQuality
Declaration: Property Get/Put FeatureQuality As DoubleQuality level for feature selection (0.01 to 100.0).
C Prototype:HRESULT put_FeatureQuality(DOUBLE newVal);
HRESULT get_FeatureQuality(DOUBLE* pVal);
Method IMVAdvancedOpticalFlow::GetMotion
Declaration: Function GetMotion As BooleanGet the motion detection flag.
Parameter:
C Prototype:
VARIANT_BOOL *value TRUE if motion is currently detected, FALSE otherwise. HRESULT GetMotion(VARIANT_BOOL* value);
Method IMVAdvancedOpticalFlow::GetMotionDirection
Declaration: Function GetMotionDirection As DoubleGet the main direction of the motion.
Parameter:
C Prototype:
DOUBLE *value Direction of global motion in degrees (0 to 360). HRESULT GetMotionDirection(DOUBLE* value);
Method IMVAdvancedOpticalFlow::GetMotionMagnitude
Declaration: Function GetMotionMagnitude As DoubleGet the main direction of the motion.
Parameter:
C Prototype:
DOUBLE *value Magnification of global motion. HRESULT GetMotionMagnitude(DOUBLE* value);
Property IMVAdvancedOpticalFlow::MinimalDistance
Declaration: Property Get/Put MinimalDistance As LongMinimum distance between two feature points.
C Prototype:HRESULT put_MinimalDistance(LONG newVal);
HRESULT get_MinimalDistance(LONG* pVal);
Property IMVAdvancedOpticalFlow::NumOfFrames
Declaration: Property Get/Put NumOfFrames As LongNumber of frames to be processed before a new set of features is selected (see AutoReset).
C Prototype:HRESULT put_NumOfFrames(LONG newVal);
HRESULT get_NumOfFrames(LONG* pVal);
Method IMVAdvancedOpticalFlow::ResetFeatures
Declaration: Sub ResetFeaturesForce new feature point detection.
C Prototype:HRESULT ResetFeatures();
Property IMVAdvancedOpticalFlow::Threshold
Declaration: Property Get/Put Threshold As LongFeature point motion smaller than this threshold (in pixel) is ignored.
C Prototype:HRESULT put_Threshold(LONG newVal);
HRESULT get_Threshold(LONG* pVal);
Method IMVAdvancedOpticalFlow::GetMotionXPosition
Declaration: Function GetMotionXPosition As DoubleGet the average horizontal position of the motion.
Parameter:
C Prototype:
INT *value Average horizontal motion position (0 to Image Width). HRESULT GetMotionXPosition(INT* value);
Method IMVAdvancedOpticalFlow::GetMotionYPosition
Declaration: Function GetMotionYPosition As DoubleGet the average vertical position of the motion.
Parameter:C Prototype:
INT *value Average vertical motion position (0 to Image Height). HRESULT GetMotionYPosition(INT* value);