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_sizexkernel_size) to an image or videoframe.
Arguments¶
motion_framenp.array(uint8) - Input motion image.filtertypestr - 'Regular' turns all values belowthreshto 0. 'Binary' turns all values belowthreshto 0, abovethreshto 1. 'Blob' removes individual pixels with erosion method.threshfloat - A number in the range of 0 to 1. Eliminates pixel values less than given threshold.kernel_sizeint - Size of structuring element.
Returns¶
np.array(uint8)- The filtered frame.