Eulerian¶
Auto-generated documentation for musicalgestures._eulerian module.
- Mgt-python / Modules / Musicalgestures / Eulerian
mg_eulerian¶
def mg_eulerian(
self,
mode='color',
freq_low=0.83,
freq_high=1.0,
amplification=50,
levels=4,
chroma_attenuation=1.0,
lambda_cutoff=16,
target_name=None,
overwrite=True,
) -> 'musicalgestures.MgVideo':
Applies Eulerian Video Magnification (EVM) to reveal subtle changes in a video.
EVM amplifies small temporal variations that are normally invisible. Two modes are available:
mode='color'— amplifies subtle colour changes (e.g. blood flow / pulse, breathing). Uses a Gaussian pyramid and an ideal (FFT) temporal band-pass filter. Processed in two passes so only a small down-sampled stack is held in memory.mode='motion'— amplifies subtle motion. Uses a Laplacian pyramid with a streaming IIR temporal band-pass filter and spatial-wavelength attenuation, so it runs frame-by-frame with low memory use.
Based on Wu et al., "Eulerian Video Magnification for Revealing Subtle Changes in the World" (SIGGRAPH 2012).
Arguments¶
modestr, optional - 'color' or 'motion'. Defaults to 'color'.freq_lowfloat, optional - Lower temporal cutoff in Hz. Defaults to 0.83 (~50 bpm).freq_highfloat, optional - Upper temporal cutoff in Hz. Defaults to 1.0 (~60 bpm).amplificationfloat, optional - Amplification factor (alpha). Defaults to 50.levelsint, optional - Number of spatial pyramid levels. Defaults to 4.chroma_attenuationfloat, optional - Chrominance attenuation in [0, 1] (color mode). Lower values reduce colour artefacts. Defaults to 1.0.lambda_cutofffloat, optional - Spatial wavelength cutoff for amplitude attenuation (motion mode). Defaults to 16.target_namestr, optional - Target output name. Defaults to None (input filename with the suffix "_evm").overwritebool, optional - Whether to allow overwriting or auto-increment the filename. Defaults to True.
Returns¶
MgVideo- An MgVideo pointing to the magnified output video.