Filter¶
Auto-generated documentation for musicalgestures._filter module.
- Mgt-python / Modules / Musicalgestures / Filter
filter_frame¶
Applies a threshold filter and then a median filter (of kernel_size
xkernel_size
) to an image or videoframe.
Arguments¶
motion_frame
np.array(uint8) - Input motion image.filtertype
str - 'Regular' turns all values belowthresh
to 0. 'Binary' turns all values belowthresh
to 0, abovethresh
to 1. 'Blob' removes individual pixels with erosion method.thresh
float - A number in the range of 0 to 1. Eliminates pixel values less than given threshold.kernel_size
int - Size of structuring element.
Returns¶
np.array(uint8)
- The filtered frame.