STACK namespace

Multi-frame images, videos, temporal processing and stack measurements.

Symbols in this namespace: 21

SymbolKindCategoryDescription
STACK.ABSDIFF_PREVCommandStack / frame statementsBuilds a stack of absolute differences between consecutive frames. Output frames = input frames - 1.
STACK.APPENDCommandStack / frame statementsAppends one image or all frames from another stack to an existing stack. All frames must have the same size and OpenCV type.
STACK.AVERAGECommandStack / frame statementsReduces a stack to a single average image.
STACK.DELETECommandStack / frame statementsRemoves one zero-based frame and returns a new stack. The command refuses to produce an empty stack.
STACK.FPSFunctionStack / frame functionsFPS associated with the video stack.
STACK.FRAMEFunctionStack / frame functionsExtracts a stack frame as a single image.
STACK.FRAMESFunctionStack / frame functionsNumber of frames in the stack, or 1 for a single image.
STACK.FROM_IMAGESCommandStack / frame statementsCreates a stack directly from images generated or loaded at runtime. All frames must have the same size and OpenCV type.
STACK.INSERTCommandStack / frame statementsInserts one image, or all frames from another stack, at zero-based index. Index 0 inserts before the first frame; index STACK.FRAMES(st) appends at the end.
STACK.INTERPOLATECommandStack / frame statementsUpsamples a stack by inserting interpolated frames between each original pair. Methods: LINEAR/BLEND or NEAREST. Output FPS is source FPS multiplied by factor when source FPS is known.
STACK.MAX_IMAGECommandStack / frame statementsReduces a stack to a per-pixel temporal maximum image.
STACK.MEAN_SIGNALFunctionStack / frame functionsReturns one temporal sample per frame, computed as frame mean. mode defaults to GRAY; also supports ALL, B, G, R and A.
STACK.MEDIANCommandStack / frame statementsReduces a stack to a robust per-pixel median image.
STACK.MIN_IMAGECommandStack / frame statementsReduces a stack to a per-pixel temporal minimum image.
STACK.PIXEL_SERIESFunctionStack / frame functionsReturns the temporal series of one pixel/channel as a numeric array.
STACK.RANGECommandStack / frame statementsExtracts a sub-stack starting at zero-based frame index first and containing up to count frames.
STACK.RESAMPLE_FPSCommandStack / frame statementsResamples a stack to a requested FPS using temporal interpolation. Requires a valid source FPS greater than zero. Methods: LINEAR/BLEND or NEAREST.
STACK.SET_FPSCommandStack / frame statementsSets FPS metadata on a stack without changing pixels. Useful for synthetic/image-sequence stacks before STACK.RESAMPLE_FPS.
STACK.STABILIZECommandStack / frame statementsStabilizes all frames onto one reference frame. Methods: TRANSLATION, AFFINE, ORB_HOMOGRAPHY. A second output variable receives a transform table: frame, methodCode, quality, inliers, and 3x3 matrix coefficients.
STACK.STDDEV_IMAGECommandStack / frame statementsReduces a stack to a 32/64-bit standard-deviation image that maps temporal variability per pixel.
STACK.TEMPORAL_FILTERCommandStack / frame statementsApplies a centered temporal moving-window filter to each frame. Methods: MEAN/AVG, MEDIAN, MIN, MAX. Edges use the available clipped window.

STACK.ABSDIFF_PREV

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.ABSDIFF_PREV stack AS dst

Builds a stack of absolute differences between consecutive frames. Output frames = input frames - 1.

Minimal example

STACK.ABSDIFF_PREV st AS motion

STACK.APPEND

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.APPEND stack, image AS dst

Appends one image or all frames from another stack to an existing stack. All frames must have the same size and OpenCV type.

Minimal example

STACK.APPEND st, img AS st2

STACK.AVERAGE

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.AVERAGE stack AS dst

Reduces a stack to a single average image.

Minimal example

STACK.AVERAGE st AS avg

STACK.DELETE

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.DELETE stack, index AS dst

Removes one zero-based frame and returns a new stack. The command refuses to produce an empty stack.

Minimal example

STACK.DELETE st, 10 AS st2

STACK.FPS

FUNCTIONSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Stack / frame functions   Namespace: STACK

STACK.FPS(image)

FPS associated with the video stack.

Minimal example

value = STACK.FPS(image)

STACK.FRAME

FUNCTIONSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Stack / frame functions   Namespace: STACK

STACK.FRAME(stack,index)

Extracts a stack frame as a single image.

Minimal example

value = STACK.FRAME(stack,index)

STACK.FRAMES

FUNCTIONSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Stack / frame functions   Namespace: STACK

STACK.FRAMES(image)

Number of frames in the stack, or 1 for a single image.

Minimal example

value = STACK.FRAMES(image)

STACK.FROM_IMAGES

STATEMENTSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.FROM_IMAGES image1, image2 [, image3 ...] AS dst

Creates a stack directly from images generated or loaded at runtime. All frames must have the same size and OpenCV type.

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
image3Optional parameter. If omitted, the command uses its internal default.

Minimal example

STACK.FROM_IMAGES img0, img1, img2 AS st

STACK.INSERT

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.INSERT stack, index, imageOrStack AS dst

Inserts one image, or all frames from another stack, at zero-based index. Index 0 inserts before the first frame; index STACK.FRAMES(st) appends at the end.

Minimal example

STACK.INSERT st, 0, firstFrame AS st2

STACK.INTERPOLATE

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.INTERPOLATE stack, factor [, method] AS dst

Upsamples a stack by inserting interpolated frames between each original pair. Methods: LINEAR/BLEND or NEAREST. Output FPS is source FPS multiplied by factor when source FPS is known.

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
methodOpenCV method selector accepted by the command.

Minimal example

STACK.INTERPOLATE st, 2, "LINEAR" AS slow
STACK.INTERPOLATE st, 4, "NEAREST" AS stepped

STACK.MAX_IMAGE

STATEMENTSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.MAX_IMAGE stack AS dst

Reduces a stack to a per-pixel temporal maximum image.

Minimal example

STACK.MAX_IMAGE st AS mx

STACK.MEAN_SIGNAL

FUNCTIONSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Stack / frame functions   Namespace: STACK

STACK.MEAN_SIGNAL(stack [, mode])

Returns one temporal sample per frame, computed as frame mean. mode defaults to GRAY; also supports ALL, B, G, R and A.

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
modeMode selector; accepted values are described in the command text.

Minimal example

signal = STACK.MEAN_SIGNAL(st, "GRAY")

STACK.MEDIAN

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.MEDIAN stack AS dst

Reduces a stack to a robust per-pixel median image.

Minimal example

STACK.MEDIAN st AS med

STACK.MIN_IMAGE

STATEMENTSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.MIN_IMAGE stack AS dst

Reduces a stack to a per-pixel temporal minimum image.

Minimal example

STACK.MIN_IMAGE st AS mn

STACK.PIXEL_SERIES

FUNCTIONSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Stack / frame functions   Namespace: STACK

STACK.PIXEL_SERIES(stack, x, y [, channel])

Returns the temporal series of one pixel/channel as a numeric array.

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
channelZero-based channel index; some commands accept -1 for grayscale/all channels.

Minimal example

s = STACK.PIXEL_SERIES(st, 120, 80, 0)
p = DPLOT.CREATE("Pixel series")
DPLOT.ADDY p, "p(120,80)", s

STACK.RANGE

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.RANGE stack, first, count AS dst

Extracts a sub-stack starting at zero-based frame index first and containing up to count frames.

Minimal example

STACK.RANGE st, 10, 50 AS clip

STACK.RESAMPLE_FPS

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.RESAMPLE_FPS stack, newFps [, method] AS dst

Resamples a stack to a requested FPS using temporal interpolation. Requires a valid source FPS greater than zero. Methods: LINEAR/BLEND or NEAREST.

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
methodOpenCV method selector accepted by the command.

Minimal example

STACK.RESAMPLE_FPS st, 25.0, "LINEAR" AS st25

STACK.SET_FPS

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.SET_FPS stack, fps AS dst

Sets FPS metadata on a stack without changing pixels. Useful for synthetic/image-sequence stacks before STACK.RESAMPLE_FPS.

Minimal example

STACK.SET_FPS st, 10.0 AS st10

STACK.STABILIZE

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.STABILIZE stack [, method [, referenceIndex [, maxFeatures [, ransacThreshold [, borderValue]]]]] AS dst[, transforms]

Stabilizes all frames onto one reference frame. Methods: TRANSLATION, AFFINE, ORB_HOMOGRAPHY. A second output variable receives a transform table: frame, methodCode, quality, inliers, and 3x3 matrix coefficients.

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
methodOpenCV method selector accepted by the command.
referenceIndexOptional parameter. If omitted, the command uses its internal default.
maxFeaturesOptional parameter. If omitted, the command uses its internal default.
ransacThresholdOptional parameter. If omitted, the command uses its internal default.
borderValueConstant value used to fill pixels outside the source image after a transform.
transformsOptional parameter. If omitted, the command uses its internal default.

Minimal example

STACK.STABILIZE st, TRANSLATION AS stab
STACK.STABILIZE st, AFFINE, 0, 800, 3.0 AS stab, tr

STACK.STDDEV_IMAGE

STATEMENTSTACKBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.STDDEV_IMAGE stack AS dst

Reduces a stack to a 32/64-bit standard-deviation image that maps temporal variability per pixel.

Minimal example

STACK.STDDEV_IMAGE st AS sigma

STACK.TEMPORAL_FILTER

STATEMENTSTACKBATCH-FRIENDLYSTACK / VIDEO
Kind: Command   Category: Stack / frame statements   Namespace: STACK

STACK.TEMPORAL_FILTER stack, radius [, method] AS dst

Applies a centered temporal moving-window filter to each frame. Methods: MEAN/AVG, MEDIAN, MIN, MAX. Edges use the available clipped window.

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
methodOpenCV method selector accepted by the command.

Minimal example

STACK.TEMPORAL_FILTER st, 2, "MEAN" AS denoised
STACK.TEMPORAL_FILTER st, 1, "MEDIAN" AS despeckled