Input Test¶
Auto-generated documentation for musicalgestures._input_test module.
- Mgt-python / Modules / Musicalgestures / Input Test
Error¶
Base class for exceptions in this module.
InputError¶
Exception raised for errors in the input.
Arguments¶
Errorstr - Explanation of the error.
See also¶
mg_input_test¶
def mg_input_test(
filename,
array,
fps,
filtertype,
thresh,
starttime,
endtime,
blur,
skip,
frames,
):
Gives feedback to user if initialization from input went wrong.
Arguments¶
filenamestr - Path to the input video file.arraynp.ndarray, optional - Generates an MgVideo object from a video array. Defauts to None.fpsfloat, optional - The frequency at which consecutive images from the video array are captured or displayed. Defauts to None.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.starttimeint/float - Trims the video from this start time (s).endtimeint/float - Trims the video until this end time (s).blurstr - 'Average' to apply a 10px * 10px blurring filter, 'None' otherwise.skipint - Every n frames to discard.skip=0keeps all frames,skip=1skips every other frame.framesint - Specify a fixed target number of frames to extract from the video.
Raises¶
InputError- If the types or options are wrong in the input.