ILMVStabilize Interface

This is the interface for the LEAD Video Stabilizer Filter.

Data Types:

lmvstab_enumClippingOption

typedef [v1_enum] enum lmvstab_enumClippingOption 
{ 
   lmvstab_CLIPPINGOPTIONS_OUTLINE, 
   lmvstab_CLIPPINGOPTIONS_CROP, 
   lmvstab_CLIPPINGOPTIONS_CROPANDSTRETCH 
} lmvstab_enumClippingOption; 

Describes possible cropping options.

Constant

Description

lmvstab_CLIPPINGOPTIONS_OUTLINE

Frame the resulting video with bands of the specified color. The video size remains the same as that of the original.

lmvstab_CLIPPINGOPTIONS_CROP

Crop the video. Video size is smaller than that of the original.

lmvstab_CLIPPINGOPTIONS_CROPANDSTRETCH

Crop the video but then resize it so it is the same size as the original.

lmvstab_GlobalEstimationCoefficients

typedef [v1_enum] enum lmvstab_GlobalEstimationCoefficients 
{ 
   lmvstab_GLOBALESTIMATIONCOEFFICIENTS_X_Y, 
   lmvstab_GLOBALESTIMATIONCOEFFICIENTS_X_Y_THETA 
} lmvstab_GlobalEstimationCoefficients; 

Describes the possible stabilization options.

Constant

Description

lmvstab_GLOBALESTIMATIONCOEFFICIENTS_X_Y

Fix the shaking that occurs along the x and y axes.

lmvstab_GLOBALESTIMATIONCOEFFICIENTS_X_Y_THETA

Fix the shaking that occurs along both axes as well as fix shaking from rotation.

lmvstab_GlobalEstimationQuality

typedef [v1_enum] enum lmvstab_GlobalEstimationQuality 
{ 
   lmvstab_GLOBALESTIMATIONQUALITY_1, 
   lmvstab_GLOBALESTIMATIONQUALITY_2, 
   lmvstab_GLOBALESTIMATIONQUALITY_3, 
   lmvstab_GLOBALESTIMATIONQUALITY_4 
} lmvstab_GlobalEstimationQuality; 

Describes quality options

Constant

Description

lmvstab_GLOBALESTIMATIONQUALITY_1

Highest quality but slow processing

lmvstab_GLOBALESTIMATIONQUALITY_2

More performance, lower quality

lmvstab_GLOBALESTIMATIONQUALITY_3

Slower performance, better quality

lmvstab_GLOBALESTIMATIONQUALITY_4

Fastest but worst quality

lmvstab_PathSmoothingLevel

typedef [v1_enum] enum lmvstab_PathSmoothingLevel 
{ 
   lmvstab_PATHSMOOTHINGLEVEL_1 = 4, 
   lmvstab_PATHSMOOTHINGLEVEL_2 = 8, 
   lmvstab_PATHSMOOTHINGLEVEL_3 = 12, 
   lmvstab_PATHSMOOTHINGLEVEL_4 = 16, 
   lmvstab_PATHSMOOTHINGLEVEL_5 = 24, 
   lmvstab_PATHSMOOTHINGLEVEL_6 = 32, 
   lmvstab_PATHSMOOTHINGLEVEL_7 = 64, 
   lmvstab_PATHSMOOTHINGLEVEL_8 = 128, 
   lmvstab_PATHSMOOTHINGLEVEL_COUNT = 8 
} lmvstab_PathSmoothingLevel; 

Describes the amount of path smoothing. Many factors determine which amount is best for a particular video, including:

Input video frames per second. Higher frame rates need to use higher levels (lmvstab_PATHSMOOTHINGLEVEL_8).

Whether a stationary camera was used. If so, use a higher level value (8).

Whether a moving camera was used. If so, use levels (6-4).

Whether you want to minimize the amount of clipping. If so, use the lower levels (1-4).

lmvstab_InterpolationType

typedef [v1_enum] enum lmvstab_InterpolationType 
{ 
   lmvstab_INTERPOLATIONTYPE_NEAREST, 
   lmvstab_INTERPOLATIONTYPE_BILINEAR 
} lmvstab_InterpolationType; 

Describes possible interpolation options when shifting and rotating input frames  to get stabilized output. Two interpolation methods are available, as follows:

Constant

Description

lmvstab_INTERPOLATIONTYPE_NEAREST

Simple and fast interpolation

lmvstab_INTERPOLATIONTYPE_BILINEAR

Better quality interpolation but slower

lmvstab_APILEVEL

typedef [v1_enum] enum 
{ 
   lmvstab_APILEVEL_1 = 0, 
   lmvstab_APILEVEL_Latest = lmvstab_APILEVEL_1 
} lmvstab_APILEVEL; 

Describes possible interpolation options when shifting and rotating input frames  to get stabilized output. Two interpolation methods are available, as follows:

Constant

Description

lmvstab_APILEVEL_1

Uses the defaults from the first version of the filter.

lmvstab_APILEVEL_Latest

Uses the defaults from the latest version of the filter.

Interface Properties:

Type

Name

Description

VARIANT_BOOL

Enabled

Enables or disables video stabilization. If set to VARIANT_FALSE, the filter passes the video samples intact.

VARIANT_BOOL

AutoReconnect

If set to VARIANT_TRUE, the filter can apply changes that affect media types while the graph is running (without having to stop and manually reconnect).This includes options such as clipping.

VARIANT_BOOL

ROIEnabled

If set to VARIANT_TRUE, the filter processes only the region of interest. Otherwise, the entire frame gets processed.

The region of interest restricts the area considered when reducing shaking, but the reductions are applied to the entire frame. Limiting the filter to a portion of the video increases performance, allowing the filter to be run in real time.

LONG

ROITop

Top coordinate, in pixels, of the region of interest

LONG

ROILeft

Left coordinate, in pixels, of the region of interest

LONG

ROIBottom

Bottom coordinate, in pixels, of the region of interest

LONG

ROIRight

Right coordinate, in pixels, of the region of interest

lmvstab_GlobalEstimationCoefficients

GlobalEstimationCoefficients

Gets or sets the lmvstab_GlobalEstimationCoefficients value to be used. This describes the type of stabilization to be performed.

lmvstab_GlobalEstimationQuality

GlobalEstimationQuality

Gets or sets the lmvstab_GlobalEstimationQuality value to be used. This value describes the balance between the speed and the quality of the processing.

lmvstab_PathSmoothingLevel

PathSmoothingLevel

Gets or sets the lmvstab_PathSmoothingLevel values to be used.

OLE_COLOR

BkFillColor

Color to use to fill any empty areas resulting from processing.

LONG

LeftRightCropMargin

Left and right crop margin

LONG

TopBottomCropMargin

Top and bottom crop margin

lmvstab_InterpolationType

InterpolationType

Gets and sets the lmvstab_InterpolationType value to be used.

lmvstab_enumClippingOption

ClippingOption

Gets and sets the lmvstab_enumClippingOption value to be used.

VARIANT_BOOL CropEnabled Enables or disables video cropping. If set to VARIANT_TRUE, the filter can apply changes that affect media types while the graph is running. Cropping can be a result of clipping options.

Interface Methods:

HRESULT ResetToDefaultsEx(lmvstab_APILEVEL ApiLevel)

Parameters

lmvstab_APILEVEL ApiLevel

Description

Call this method to restore default options for all properties.

The ApiLevel determines which default values to use. Current applications should set ApiLevel to lmvstab_APILEVEL_1 = 0.

The filter might change in the future and have different properties or default behaviour. Calling this method ensures the filter will have the same default values as they were at the time you developed your application.

Returns

S_OK always.

Notes:

Currently, this filter stabilizes video in the  vertical, horizontal, and angular directions. Shake from other directions can cause unexpected results.

For best results, make sure any moving objects inside the video are smaller than 15% of the video frame size.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help