VM namespace

Symbols grouped by the VM namespace.

Symbols in this namespace: 5

SymbolKindCategoryDescription
VM.COLORCommandVideo magnification statementsEulerian color magnification on an image stack/video. It amplifies subtle chromatic variations in the temporal band lowHz..highHz and returns a new stack.
VM.LAPLACECommandVideo magnification statementsEulerian motion magnification using the Laplacian-pyramid path of EulerianVideoMagnifier. VM.MOTION is an alias with the same implementation.
VM.MAX_LEVELSFunctionOpenCV / media functionsReturns the maximum pyramid level count usable by EulerianVideoMagnifier for an image/stack or for width,height.
VM.MOTIONCommandVideo magnification statementsFriendly alias of VM.LAPLACE for motion magnification.
VM.RIESZCommandVideo magnification statementsEulerian phase/motion magnification using the Riesz-pyramid path. phaseThreshold is expressed as a percentage of pi in the underlying tested class. The 8th parameter is accepted as chromAttenuation/reserved for compatibility with VM.MOTION examples; the current Riesz path works on luminance and merges original chroma back.

VM.COLOR

STATEMENTVMBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Video magnification statements   Namespace: VM

VM.COLOR stack, amplification, lowHz, highHz [, fps [, levels [, chromAttenuation [, grayscale]]]] AS dst

Eulerian color magnification on an image stack/video. It amplifies subtle chromatic variations in the temporal band lowHz..highHz and returns a new stack.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
levelsNumber of pyramid levels used by the optical-flow algorithm.
chromAttenuationOptional parameter. If omitted, the command uses its internal default.
grayscaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

IO.LOAD "input.avi" AS vid
fps = CV.FPS(vid)
VM.COLOR vid, 30.0, 0.7, 2.0, fps, 4, 0.1 AS vmColor
IO.WRITE_VIDEO vmColor, "vm_color.avi", fps

VM.LAPLACE

STATEMENTVMBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Video magnification statements   Namespace: VM

VM.LAPLACE stack, amplification, lowHz, highHz [, fps [, levels [, wavelength [, chromAttenuation [, grayscale]]]]] AS dst

Eulerian motion magnification using the Laplacian-pyramid path of EulerianVideoMagnifier. VM.MOTION is an alias with the same implementation.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
levelsNumber of pyramid levels used by the optical-flow algorithm.
wavelengthOptional parameter. If omitted, the command uses its internal default.
chromAttenuationOptional parameter. If omitted, the command uses its internal default.
grayscaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

IO.LOAD "input.avi" AS vid
fps = CV.FPS(vid)
VM.LAPLACE vid, 15.0, 0.4, 1.5, fps, 4, 16.0, 0.1 AS vmMotion
IO.WRITE_VIDEO vmMotion, "vm_motion.avi", fps

VM.MAX_LEVELS

FUNCTIONVMBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: VM

VM.MAX_LEVELS(mediaOrWidth [, height])

Returns the maximum pyramid level count usable by EulerianVideoMagnifier for an image/stack or for width,height.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
heightOptional parameter. If omitted, the command uses its internal default.

Minimal example

maxL = VM.MAX_LEVELS(vid)
PRINT "max levels="; maxL

VM.MOTION

STATEMENTVMBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Video magnification statements   Namespace: VM

VM.MOTION stack, amplification, lowHz, highHz [, fps [, levels [, wavelength [, chromAttenuation [, grayscale]]]]] AS dst

Friendly alias of VM.LAPLACE for motion magnification.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
levelsNumber of pyramid levels used by the optical-flow algorithm.
wavelengthOptional parameter. If omitted, the command uses its internal default.
chromAttenuationOptional parameter. If omitted, the command uses its internal default.
grayscaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VM.MOTION vid, 12.0, 0.5, 2.0, CV.FPS(vid), 4, 16.0 AS motionOut

VM.RIESZ

STATEMENTVMBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Video magnification statements   Namespace: VM

VM.RIESZ stack, amplification, lowHz, highHz [, fps [, levels [, phaseThreshold [, chromAttenuation [, grayscale]]]]] AS dst

Eulerian phase/motion magnification using the Riesz-pyramid path. phaseThreshold is expressed as a percentage of pi in the underlying tested class. The 8th parameter is accepted as chromAttenuation/reserved for compatibility with VM.MOTION examples; the current Riesz path works on luminance and merges original chroma back.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
levelsNumber of pyramid levels used by the optical-flow algorithm.
phaseThresholdOptional parameter. If omitted, the command uses its internal default.
chromAttenuationOptional parameter. If omitted, the command uses its internal default.
grayscaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VM.RIESZ vid, 15.0, 0.4, 1.5, CV.FPS(vid), 4, 16.0, 0.1 AS rieszOut