Skip to content

Stabilizer Class Parameters

smoothing_radius

This parameter can be used to alter averaging window size. It basically handles the quality of stabilization at the expense of latency and sudden panning. Larger its value, less will be panning, more will be latency and vice-versa.

Data-Type: Integer

Default Value: Its default value is 25.

Usage:

You can easily pass this parameter as follows:

Stabilizer(smoothing_radius=30)

 

border_size

This parameter enables and set the value for extended border size that compensates for reduction of black borders during stabilization.

Data-Type: Integer

Default Value: Its default value is 0(no borders).

Usage:

You can easily pass this parameter as follows:

Stabilizer(border_size=10)

 

crop_n_zoom

This parameter enables cropping and zooming of frames (to original size) to reduce the black borders from being too noticeable (similar to the Stabilized, cropped and Auto-Scaled feature available in Adobe AfterEffects) during stabilization. It simply works in conjunction with the border_size parameter, i.e. when this parameter is enabled, border_size will be used for cropping border instead of extending them.

Data-Type: Boolean

Default Value: Its default value is False.

Usage:

You can easily pass this parameter as follows:

Stabilizer(border_size=10, crop_n_zoom=True)

 

border_type

This parameter can be used to change the extended border type. Valid border types are 'black', 'reflect', 'reflect_101', 'replicate' and 'wrap', learn more about it here.

Altering border_type parameter is DISABLED when crop_n_zoom is enabled!

Data-Type: String

Default Value: Its default value is 'black'.

Usage:

You can easily pass this parameter as follows:

Stabilizer(border_type='reflect')

 

logging

This parameter enables logging (if True), essential for debugging.

Data-Type: Boolean

Default Value: Its default value is False.

Usage:

Stabilizer(logging=True)