| Home | | | Quick start | | | Cookbook | | | All symbols | | | Analytical index | | | Namespaces | | | Syntax | | | Statements | | | CX | | | Frequency | | | Functions | | | Examples | | | Examples by command |
This page is generated automatically from the interpreter command set. Commands are grouped by practical domain so the list remains readable as the language grows.
CV.OPERATION src, parameters AS dst. ROI parameters use x, y, w, h, where w and h are width and height.DIM name(size1 [, size2 ...])
Declares a zero-based one or multi-dimensional array. Variable names are case-insensitive, so DIM v(10) and later V refer to the same variable. Compact literals are also supported: v = [1,2,3] and A = [[1,2],[3,4]].
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
size2 | Optional parameter. If omitted, the command uses its internal default. |
v = [10, 20, 30]
A = [[1, 2], [3, 4]]
PRINT v[1], A[1,0]PRINT expr1 [; expr2 ...] [, exprN ...]
Writes the provided values to the log output.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
expr2 | Optional parameter. If omitted, the command uses its internal default. |
exprN | Optional parameter. If omitted, the command uses its internal default. |
PRINT "Width="; CV.WIDTH(img); " Height="; CV.HEIGHT(img)ASSERT condition [, message]
Stops the script with a clear error if condition is false. Useful for diagnostic and regression scripts.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
message | Optional parameter. If omitted, the command uses its internal default. |
ASSERT CV.WIDTH(img) = 64, "Unexpected image width"DEBUG.EXPR_CACHE_RESET_STATS
Resets the expression-cache diagnostic counters without clearing the cached expression tree.
DEBUG.EXPR_CACHE_RESET_STATSIO.CAMERA_GET cameraIndex, property AS value
Reads an OpenCV VideoCapture property and assigns the numeric value.
IO.CAMERA_GET 0, FPS AS fps
PRINT fpsIO.CAMERA_PROPS [cameraIndex] AS table
Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAMERA_PROPS 0 AS props
PRINT ARRAY.DIMSIZE(props, 0)IO.CAMERA_RELEASE [cameraIndex]
Releases an opened camera handle. Use this when a script has finished acquiring frames.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAMERA_RELEASE 0IO.CAMERA_SET cameraIndex, property, value
Sets an OpenCV VideoCapture property. Property can be a friendly name such as FPS, WIDTH, HEIGHT, EXPOSURE or GAIN, quoted or bare.
IO.CAMERA_SET 0, WIDTH, 1280
IO.CAMERA_SET 0, HEIGHT, 720
IO.CAMERA_SET 0, FPS, 30IO.CAPTURE_FRAME [cameraIndex] AS img
Captures one BGR frame from a camera. The camera is opened lazily and kept open for following captures until IO.CAMERA_RELEASE is called.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
cameraIndex | Optional parameter. If omitted, the command uses its internal default. |
IO.CAPTURE_FRAME 0 AS frame
GUI.SHOW frameIO.LOAD pathExpr AS variable // images, OT RAW, FITS, TIFF stacks, video
Loads an image, a FITS image/stack, a TIFF/TIFF stack, or a video; videos, multipage TIFF files and multi-HDU FITS files become in-memory stacks.
IO.LOAD pathExpr AS variable // images, OT RAW, FITS, TIFF stacks, videoIO.LOAD_WITH_META path AS image
Loads an image/stack and applies the optional path.cvbmeta sidecar when present.
IO.LOAD_WITH_META "out.png" AS img2IO.SAVE media, path
Saves a single image to common image formats, or saves a stack to multipage TIFF when the target extension is .tif/.tiff.
IO.SAVEIO.SAVE_WITH_META media, path
Saves an image or stack and writes a path.cvbmeta sidecar containing ROI state and user metadata.
IO.SAVE_WITH_META img, "out.png"IO.TRY_LOAD path AS image
Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.
IO.TRY_LOAD "input.png" AS img
IF NOT CV.IS_VALID(img) THEN
PRINT "Load failed: "; IO.LAST_ERROR()
EXIT
ENDIFIO.TRY_LOAD_WITH_META path AS image
Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().
IO.TRY_LOAD_WITH_META "out.png" AS img2
ASSERT CV.IS_VALID(img2), IO.LAST_ERROR()IO.WRITE_VIDEO stack, path [, fps]
Writes a stack as an AVI/MJPG video.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
fps | Optional parameter. If omitted, the command uses its internal default. |
IO.WRITE_VIDEOTIME.DELAY_MS milliseconds
Pauses script execution for the requested number of milliseconds while keeping STOP responsive.
TIME.DELAY_MSTIME.TIMER_RESET name
Creates or resets a named monotonic timer inside the current script runtime.
TIME.TIMER_RESETCV.CANVAS width, height [, channels [, background]] AS dst
Creates a new 8-bit canvas image with 1 to 4 channels and a constant background value.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
channels | Number of channels to create or process. |
background | Initial canvas background value. |
CV.CANVAS width, height [, channels [, background]] AS dstCV.CHANNEL src, index AS dst
Extracts one channel as a single-channel image or stack.
CV.CHANNEL src, index AS dstCV.CLONE src AS dst
Duplicates the image or stack object.
CV.CLONE src AS dstCV.COLOR src, mode AS dst
Converts between common color spaces such as BGR, HSV, Lab, and gray.
CV.COLOR src, mode AS dstCV.CONVERT src, depth [, alpha [, beta]] AS dst
Converts OpenCV depth with optional scale and offset. Depth tokens include 8U, 16U, 32F, 64F and SAME.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
alpha | Multiplicative scale factor. |
beta | Additive offset after scaling. |
CV.CONVERT img, "32F", 1.0 / 255.0 AS fCV.GRAY src AS dst
Converts to grayscale; on stacks it operates frame-by-frame.
CV.GRAY src AS dstCV.INVERT src AS dst
Inverts pixel intensity; on stacks it operates frame-by-frame.
CV.INVERT src AS dstCV.MERGE ch0, ch1 [, ch2 [, ch3]] AS dst
Merges one to four single-channel images/stacks into a multi-channel result.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
ch2 | Optional parameter. If omitted, the command uses its internal default. |
ch3 | Optional parameter. If omitted, the command uses its internal default. |
CV.MERGE ch0, ch1 [, ch2 [, ch3]] AS dstCV.SCALE_ABS src [, alpha [, beta]] AS dst
Applies OpenCV convertScaleAbs, useful for visualizing gradients and signed/float maps.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
alpha | Multiplicative scale factor. |
beta | Additive offset after scaling. |
CV.SCALE_ABS grad, 2.0 AS visCV.TO32F src [, scale [, beta]] AS dst
Converts to 32-bit float using optional scale and offset.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
beta | Additive offset after scaling. |
CV.TO32F img, 1.0 / 255.0 AS fCV.TO8U src [, alpha [, beta]] AS dst
Converts to 8-bit unsigned using optional alpha and beta.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
alpha | Multiplicative scale factor. |
beta | Additive offset after scaling. |
CV.TO8U f, 255.0 AS u8CV.BILATERAL src [, d [, sigmaColor [, sigmaSpace]]] AS dst
Applies bilateral edge-preserving smoothing frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
d | Bilateral filter neighborhood diameter. |
sigmaColor | Bilateral filter sigma in color/intensity space. |
sigmaSpace | Bilateral filter sigma in coordinate space. |
CV.BILATERAL img, 9, 75, 75 AS denCV.BLUR src [, radius] AS dst
Applies a simple blur frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
CV.BLUR src [, radius] AS dstCV.CLAHE src [, clipLimit [, tiles]] AS dst
Applies contrast-limited adaptive histogram equalization. On color images it works on the L channel in Lab.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
clipLimit | CLAHE contrast clipping limit. |
tiles | CLAHE tile grid size; one value creates a square grid. |
CV.CLAHE src [, clipLimit [, tiles]] AS dstCV.EQUALIZE src AS dst
Equalizes the histogram frame-by-frame.
CV.EQUALIZE src AS dstCV.FILTER2D src, kernelText [, scale [, delta]] AS dst
Applies a custom 2D convolution kernel. Kernel rows are separated by semicolons; values by spaces or commas.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
delta | Optional parameter. If omitted, the command uses its internal default. |
CV.FILTER2D img, "0 -1 0; -1 5 -1; 0 -1 0" AS sharpCV.GAMMA src, CV.GAMMA AS dst
Applies gamma correction frame-by-frame.
CV.GAMMA src, CV.GAMMA AS dstCV.GAUSSIAN src [, radius] AS dst
Applies a Gaussian blur frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
CV.GAUSSIAN src [, radius] AS dstCV.INPAINT src, mask [, radius [, method]] AS dst
Fills/restores masked pixels using OpenCV inpainting. method can be TELEA or NS; the source must be 8-bit single-channel or BGR.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
method | OpenCV method selector accepted by the command. |
CV.INPAINT damaged, mask, 3, TELEA AS repairedCV.MEDIAN src [, radius] AS dst
Applies a median filter frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
CV.MEDIAN src [, radius] AS dstCV.NLMEANS src [, h [, templateWindow [, searchWindow]]] AS dst
Applies OpenCV fast non-local means denoising. Output is 8-bit grayscale/BGR.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
h | Optional output height, or ROI height when part of x,y,w,h. |
templateWindow | Non-local-means template patch size. |
searchWindow | Non-local-means search window size. |
CV.NLMEANS img, 10, 7, 21 AS denCV.UNSHARP src [, amount [, radius]] AS dst
Applies unsharp masking using a Gaussian blur and weighted recombination.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
amount | Strength of the effect. |
radius | Kernel radius or neighborhood radius used by the filter. |
CV.UNSHARP img, 0.8, 2 AS sharpCV.ADAPTIVE_THRESHOLD src [, blockSize [, c]] AS dst
Applies an adaptive threshold frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
blockSize | Local analysis window size used by the algorithm. |
c | Optional parameter. If omitted, the command uses its internal default. |
CV.ADAPTIVE_THRESHOLD src [, blockSize [, c]] AS dstCV.CIRCLE_MASK width, height, cx, cy, radius [, value] AS dst
Creates a single-channel circular mask.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.CIRCLE_MASK 80, 60, 40, 30, 12 AS maskCV.COMPARE src, op, value AS dst
Creates a mask by comparing pixels with a scalar value. Operators: >, >=, <, <=, ==, !=.
CV.COMPARE img, ">", 128 AS maskCV.FILL_HOLES mask AS dst
Fills internal holes of a binary mask derived from non-zero pixels.
CV.FILL_HOLES mask AS filledCV.INRANGE src, low, high AS dst
Segments pixels whose values fall inside a scalar range; the range is applied to all channels.
CV.INRANGE src, low, high AS dstCV.INRANGE_COLOR src, low0, low1, low2, high0, high1, high2 AS dst
Creates a 3-channel scalar range mask, useful after HSV/Lab conversion.
CV.COLOR img, "BGR2HSV" AS hsv
CV.INRANGE_COLOR hsv, 20, 60, 60, 40, 255, 255 AS maskCV.KEEP_LARGEST mask AS dst
Keeps only the largest connected foreground component of a binary mask.
CV.KEEP_LARGEST mask AS mainObjCV.OTSU src AS dst
Computes an automatic Otsu threshold on the grayscale source.
CV.OTSU src AS dstCV.RECT_MASK width, height, x, y, w, h [, value] AS dst
Creates a single-channel rectangular mask. Legacy command equivalent to MASK.RECT with explicit coordinates.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.RECT_MASK 80, 60, 10, 12, 20, 15 AS maskCV.THRESHOLD src, CV.THRESHOLD AS dst
Applies a fixed threshold frame-by-frame.
CV.THRESHOLD src, CV.THRESHOLD AS dstCV.WATERSHED src, markers AS labels[, colored]
Runs marker-based watershed. markers must have the same size as src and contain positive labels for seed regions; zero means unknown. labels is CV_32S; colored is an optional visualization.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
colored | Optional parameter. If omitted, the command uses its internal default. |
CV.WATERSHED img, markers AS labels, colored
GUI.SHOW colored, "watershed"CV.WATERSHED_AUTO src [, blurRadius [, distThreshold [, invert]]] AS labels[, colored]
Automatically builds watershed markers using Otsu thresholding, morphology, distance transform and connected components. distThreshold is typically 0.30..0.60; invert=TRUE is useful for dark objects on bright background.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
blurRadius | Optional parameter. If omitted, the command uses its internal default. |
distThreshold | Optional parameter. If omitted, the command uses its internal default. |
invert | Optional parameter. If omitted, the command uses its internal default. |
colored | Optional parameter. If omitted, the command uses its internal default. |
CV.WATERSHED_AUTO img, 1, 0.40 AS labels, colored
GUI.SHOW colored, "auto watershed"CV.BLACKHAT src [, radius [, shape [, iterations]]] AS dst
Computes the black-hat transform frame-by-frame with selectable kernel shape.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.BLACKHAT gray, 4, RECT, 1 AS blackhatMapCV.DILATE src [, radius [, shape [, iterations]]] AS dst
Applies morphological dilation frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.DILATE mask, 2, CROSS, 1 AS dilatedCV.DISTANCE src [, distanceType [, maskSize]] AS dst
Computes the distance transform of a binary mask derived from non-zero pixels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
distanceType | Distance-transform metric selector. |
maskSize | Distance-transform mask size. |
CV.DISTANCE src [, distanceType [, maskSize]] AS dstCV.DISTANCE_TRANSFORM mask [, distanceType [, maskSize [, normalize]]] AS dst
Computes a distance transform from a binary/non-zero mask. distanceType can be L1, L2 or C; maskSize can be 0, 3 or 5. normalize=TRUE scales the map to 0..255 as 32F.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
distanceType | Distance-transform metric selector. |
maskSize | Distance-transform mask size. |
normalize | Optional parameter. If omitted, the command uses its internal default. |
CV.DISTANCE_TRANSFORM mask, L2, 5, TRUE AS distMapCV.ERODE src [, radius [, shape [, iterations]]] AS dst
Applies morphological erosion frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.ERODE mask, 2, RECT, 1 AS erodedCV.MORPH_CLOSE src [, radius [, shape [, iterations]]] AS dst
Applies morphological closing frame-by-frame with selectable kernel shape.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.MORPH_CLOSE mask, 3, RECT, 1 AS closedCV.MORPH_EX src, operation, kernelType, width, height [, iterations] AS dst
Applies a selectable morphological operation. operation: OPEN, CLOSE, GRADIENT, TOPHAT, BLACKHAT, ERODE, DILATE. kernelType: ELLIPSE, RECT, CROSS.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
iterations | Number of repeated passes applied by the operation. |
CV.MORPH_EX mask, CLOSE, RECT, 15, 5, 1 AS closedHorizontalCV.MORPH_GRADIENT src [, radius [, shape [, iterations]]] AS dst
Computes a morphological gradient frame-by-frame with selectable kernel shape.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.MORPH_GRADIENT mask, 2, CROSS, 1 AS gradCV.MORPH_OPEN src [, radius [, shape [, iterations]]] AS dst
Applies morphological opening frame-by-frame with selectable kernel shape.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.MORPH_OPEN mask, 2, ELLIPSE, 1 AS openedCV.TOPHAT src [, radius [, shape [, iterations]]] AS dst
Computes the top-hat transform frame-by-frame with selectable kernel shape.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
radius | Kernel radius or neighborhood radius used by the filter. |
shape | Optional parameter. If omitted, the command uses its internal default. |
iterations | Number of repeated passes applied by the operation. |
CV.TOPHAT gray, 4, ELLIPSE, 1 AS tophatMapCV.ABSDIFF left, right AS dst
Computes the absolute difference between two images or stacks.
CV.ABSDIFF left, right AS dstCV.ADD left, right AS dst
Adds two images or stacks. A single image can be broadcast across a stack.
CV.ADD left, right AS dstCV.ADDS src, scalar AS dst
Adds a scalar value to every pixel.
CV.ADDS src, scalar AS dstCV.BITAND left, right AS dst
Computes the bitwise AND of two images or stacks. A single-channel mask can be broadcast to match a multi-channel image when size and depth already match.
CV.BITAND left, right AS dstCV.BITNOT src AS dst
Computes the bitwise NOT of the source image or stack.
CV.BITNOT src AS dstCV.BITOR left, right AS dst
Computes the bitwise OR of two images or stacks. A single-channel operand can be broadcast to match a multi-channel image when size and depth already match.
CV.BITOR left, right AS dstCV.BITXOR left, right AS dst
Computes the bitwise XOR of two images or stacks. A single-channel operand can be broadcast to match a multi-channel image when size and depth already match.
CV.BITXOR left, right AS dstCV.DIV left, right AS dst
Performs pixel-wise division between two images or stacks.
CV.DIV left, right AS dstCV.DIVS src, scalar AS dst
Divides every pixel/channel of an image or stack by a non-zero scalar. This is clearer than CV.MULS src, 1/scalar.
CV.DIVS img, 2.0 AS halfCV.MAXIMUM left, right AS dst
Computes the per-pixel maximum of two images or stacks.
CV.MAXIMUM left, right AS dstCV.MINIMUM left, right AS dst
Computes the per-pixel minimum of two images or stacks.
CV.MINIMUM left, right AS dstCV.MUL left, right AS dst
Performs pixel-wise multiplication between two images or stacks.
CV.MUL left, right AS dstCV.MULS src, scalar AS dst
Multiplies every pixel by a scalar value.
CV.MULS src, scalar AS dstCV.NORMALIZE src [, newMin [, newMax]] AS dst
Normalizes the source range into a target range using OpenCV NORM_MINMAX.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
newMin | Output minimum used by normalization. |
newMax | Output maximum used by normalization. |
CV.NORMALIZE src [, newMin [, newMax]] AS dstCV.SUB name([param1 [, param2 ...]])
Starts a named subroutine block. The block is skipped during normal flow and executed only by CALL.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
param1 | First algorithm-specific tuning parameter. |
param2 | Second algorithm-specific tuning parameter. |
CV.SUBCV.SUBS src, scalar AS dst
Subtracts a scalar from every pixel/channel of an image or stack. This is clearer than CV.ADDS src, -scalar.
CV.SUBS img, 25 AS darkerCV.CROP src, x, y, w, h AS dst
Crops a ROI from the image or from all frames in the stack.
CV.CROP src, x, y, w, h AS dstCV.CROP_RECT src, rect AS dst
Crops a half-open RECT geometry from an image or from every frame in a stack. rect can be returned by RECT.CREATE, RECT.FROM_TEXT, RECT.CLIP, RECT.INTERSECT or ROI.RECT.
r = RECT.CREATE(10, 20, 30, 40)
CV.CROP_RECT img, r AS patchCV.FLIP src, mode AS dst
Flips an image or every stack frame. Modes: H/X horizontal, V/Y vertical, BOTH/XY both axes, or numeric OpenCV flipCode -1/0/1.
CV.FLIP img, "H" AS flippedCV.PAD src, top, bottom, left, right [, value] AS dst
Adds a constant border around an image or every stack frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.PAD img, 10, 10, 20, 20, 0 AS paddedCV.PASTE base, patch, x, y AS dst
Pastes a patch image or patch stack into a base image/stack at x,y. Partial out-of-bounds pastes are clipped; single images broadcast across stacks.
CV.PASTE base, patch, 10, 20 AS outCV.PASTE_RECT base, patch, rect AS dst
Pastes a patch into a destination RECT. The patch is resized to RECT.W/H when needed, then clipped to the base image bounds. Works frame-by-frame on compatible stacks.
r = RECT.CREATE(10, 20, 30, 40)
CV.PASTE_RECT base, patch, r AS outCV.REMAP src, flow AS dst OR CV.REMAP src, flowX, flowY AS dst
Warps an image or stack using optical-flow displacement maps. It accepts either a 2-channel FLOW map or separate flowX/flowY maps. When used with a stack and a sequential FARNEBACK flow stack that has one fewer frame, the first frame is copied unchanged and the remaining frames are remapped with the corresponding flow maps.
CV.REMAP src, flow AS dst OR CV.REMAP src, flowX, flowY AS dstCV.RESIZE src, w, h AS dst
Resizes the image or all frames in the stack.
CV.RESIZE src, w, h AS dstCV.ROTATE src, angle [, scale [, borderValue]] AS dst
Rotates around the image center using affine interpolation and a constant border value.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
borderValue | Constant value used to fill pixels outside the source image after a transform. |
CV.ROTATE img, 12.5, 1.0, 0 AS rotCV.ROTATE90 src, code AS dst
Rotates by exact right angles without interpolation. Codes: 90/CW, 180, 270/CCW.
CV.ROTATE90 img, 90 AS rotCV.TRANSLATE src, dx, dy [, borderValue] AS dst
Translates image content by dx,dy pixels using a constant border value.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
borderValue | Constant value used to fill pixels outside the source image after a transform. |
CV.TRANSLATE img, 4, -2 AS shiftedCV.WARP_AFFINE src, a00, a01, a02, a10, a11, a12 [, w [, h [, borderValue]]] AS dst
Applies a 2x3 affine transform matrix with optional output size and constant border value.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
w | Optional output width, or ROI width when part of x,y,w,h. |
h | Optional output height, or ROI height when part of x,y,w,h. |
borderValue | Constant value used to fill pixels outside the source image after a transform. |
CV.WARP_AFFINE img, 1, 0, 8, 0, 1, 4 AS shiftedCV.WARP_HOMOGRAPHY src, H [, w [, h [, borderValue]]] AS dst
Applies a 3x3 homography stored in a ScriptArray. This is the array-based companion of CV.WARP_PERSPECTIVE and works frame-by-frame on stacks.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
w | Optional output width, or ROI width when part of x,y,w,h. |
h | Optional output height, or ROI height when part of x,y,w,h. |
borderValue | Constant value used to fill pixels outside the source image after a transform. |
CV.FIND_HOMOGRAPHY kpA, kpB, matches, 3.0 AS H, inliers
CV.WARP_HOMOGRAPHY imgB, H AS alignedCV.WARP_PERSPECTIVE src, a00, a01, a02, a10, a11, a12, a20, a21, a22 [, w [, h [, borderValue]]] AS dst
Applies a 3x3 homography/perspective transform matrix with optional output size and constant border value. On stacks it operates frame-by-frame.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
w | Optional output width, or ROI width when part of x,y,w,h. |
h | Optional output height, or ROI height when part of x,y,w,h. |
borderValue | Constant value used to fill pixels outside the source image after a transform. |
CV.WARP_PERSPECTIVE img, 1, 0.15, -18, 0.05, 1, -8, 0.0006, 0.0009, 1, 320, 240, 0 AS warpedCV.POWER_SPECTRUM src [, logScale] AS dst
Computes a centered power spectrum map from the grayscale source, normalized to 0..255 as 32F.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
logScale | When true, applies logarithmic visualization scaling to spectral magnitude/power. |
CV.POWER_SPECTRUM img, TRUE AS powCV.ADJUST_COLOR src, brightness, contrastPercent, hueShift, saturationPercent AS dst
Applies brightness/contrast in BGR and hue/saturation in HSV; useful with GUI trackbars in live webcam demos.
CV.ADJUST_COLOR frame, brightness, contrast, hue, saturation AS tunedCV.BG_SUBTRACT stack, method [, history [, varThreshold]] AS dst
Applies MOG2 or KNN background subtraction to a video/stack and returns an 8-bit foreground-mask stack. method can be "MOG2" or "KNN".
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
history | Optional parameter. If omitted, the command uses its internal default. |
varThreshold | Optional parameter. If omitted, the command uses its internal default. |
IO.LOAD "input.avi" AS st
CV.BG_SUBTRACT st, "MOG2", 80, 16 AS fgCV.CAMSHIFT src, roi [, hBins [, sBins [, maxIter [, epsilon]]]] AS rects[, preview]
Tracks the ROI color model with HSV backprojection and OpenCV CamShift, returning both the bounding rect and rotated box geometry in the N x 11 rects table. The optional preview draws rect and rotated box.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
hBins | Optional parameter. If omitted, the command uses its internal default. |
sBins | Optional parameter. If omitted, the command uses its internal default. |
maxIter | Optional parameter. If omitted, the command uses its internal default. |
epsilon | Optional parameter. If omitted, the command uses its internal default. |
preview | Optional parameter. If omitted, the command uses its internal default. |
CV.CAMSHIFT st, rect, 30, 32, 20, 1.0 AS rects, previewCV.CANNY src, low, high AS dst
Runs Canny edge detection frame-by-frame.
CV.CANNY src, low, high AS dstCV.CONNECTED_COMPONENTS src [, connectivity] AS dst
Labels foreground connected components in a binary mask derived from non-zero pixels.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
connectivity | Connected-component connectivity, normally 4 or 8. |
CV.CONNECTED_COMPONENTS src [, connectivity] AS dstCV.CONTOURS mask [, mode [, approx]] AS points, info
Extracts contours as numeric arrays. points columns: contourId, pointIndex, x, y. info columns: contourId, area, perimeter, x, y, w, h, pointCount. Modes: EXTERNAL, ALL/LIST, TREE, CCOMP. Approximation: SIMPLE or NONE.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
approx | Optional parameter. If omitted, the command uses its internal default. |
CV.CONTOURS mask, EXTERNAL, SIMPLE AS contourPts, contourInfo
PRINT ARRAY.DIMSIZE(contourInfo, 0)CV.CORNER_SUBPIX src, points [, winSize [, maxIter [, epsilon]]] AS refinedPoints
Refines an Nx2 or Nx>=2 point array with OpenCV cornerSubPix and returns a refined Nx2 array.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
winSize | Optical-flow averaging window size; larger values are smoother and less local. |
maxIter | Optional parameter. If omitted, the command uses its internal default. |
epsilon | Optional parameter. If omitted, the command uses its internal default. |
CV.GOOD_FEATURES_POINTS img, 80, 0.01, 10 AS pts
CV.CORNER_SUBPIX img, pts, 5, 40, 0.001 AS refinedCV.DETECT_OBJECTS src, cascadeFile [, scaleFactor [, minNeighbors [, minSizeW [, minSizeH]]]] AS rects[, preview]
Runs an OpenCV Haar/LBP cascade over an image or stack. rects columns: frameIndex, detectionIndex, x, y, w, h, score, classId. A sentinel row frameIndex=-1 means no detections. The optional preview draws rectangles.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
scaleFactor | Optional parameter. If omitted, the command uses its internal default. |
minNeighbors | Optional parameter. If omitted, the command uses its internal default. |
minSizeW | Optional parameter. If omitted, the command uses its internal default. |
minSizeH | Optional parameter. If omitted, the command uses its internal default. |
preview | Optional parameter. If omitted, the command uses its internal default. |
CV.DETECT_OBJECTS img, "haarcascade_frontalface_default.xml", 1.1, 4 AS faces, previewCV.DRAW_FLOW_ARROWS src, flow [, step [, scale [, minMag [, b [, g [, r [, thickness]]]]]]] AS dst
Draws optical-flow vectors as arrows over an image. The flow input must be generated by CV.FARNEBACK mode FLOW. Color uses OpenCV B,G,R order.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
step | Optional parameter. If omitted, the command uses its internal default. |
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
minMag | Optional parameter. If omitted, the command uses its internal default. |
b | Optional parameter. If omitted, the command uses its internal default. |
g | Optional parameter. If omitted, the command uses its internal default. |
r | Optional parameter. If omitted, the command uses its internal default. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
CV.DRAW_FLOW_ARROWS frame, flow, 24, 4.0, 0.6, 0, 255, 255, 1 AS arrowsCV.DRAW_MATCHES img1, kp1, img2, kp2, desc1, desc2 [, maxDistance] AS dst
Matches ORB descriptors with a Hamming BFMatcher and draws the selected matches between two images. Kept for compatibility; use CV.MATCH_ORB + CV.DRAW_MATCHES_DATA when the match list must be reused.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
maxDistance | Optional parameter. If omitted, the command uses its internal default. |
CV.DRAW_MATCHES imgA, kpA, imgB, kpB, descA, descB, 64 AS matchesPreviewCV.DRAW_MATCHES_DATA img1, kp1, img2, kp2, matches [, maxDraw] AS dst
Draws matches from a numeric matches/inliers array, useful after CV.FIND_HOMOGRAPHY RANSAC filtering.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
maxDraw | Optional parameter. If omitted, the command uses its internal default. |
CV.DRAW_MATCHES_DATA imgA, kpA, imgB, kpB, inliers, 100 AS inlierPreviewCV.EDGES src AS dst
Computes an edge map frame-by-frame.
CV.EDGES src AS dstCV.FARNEBACK stack [, mode [, pyrScale [, levels [, winsize [, iterations [, polyN [, polySigma]]]]]]] AS dst OR CV.FARNEBACK prev, next [, mode [, pyrScale [, levels [, winsize [, iterations [, polyN [, polySigma]]]]]]] AS dst (robust defaults: pyrScale=0.5, levels=5, winsize=25, iterations=5, polyN=7, polySigma=1.5)
Computes dense Farneback optical flow either between consecutive frames of a stack or between two images/two stacks, returning raw flow, magnitude, angle, or a color visualization. Uses robust defaults and the Gaussian Farneback window for more stable video results.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
mode | Mode selector; accepted values are described in the command text. |
pyrScale | Farneback pyramid scale between image levels. |
levels | Number of pyramid levels used by the optical-flow algorithm. |
winsize | Optical-flow averaging window size; larger values are smoother and less local. |
iterations | Number of repeated passes applied by the operation. |
polyN | Farneback polynomial neighborhood size. |
polySigma | Farneback Gaussian smoothing sigma for polynomial expansion. |
CV.FARNEBACK stack [, mode [, pyrScale [, levels [, winsize [, iterations [, polyN [, polySigma]]]]]]] AS dst OR CV.FARNEBACK prev, next [, mode [, pyrScale [, levels [, winsize [, iterations [, polyN [, polySigma]]]]]]] AS dst (robust defaults: pyrScale=0.5, levels=5, winsize=25, iterations=5, polyN=7, polySigma=1.5)CV.FIND_HOMOGRAPHY kp1, kp2, matches [, ransacThreshold] AS H, inliers
Estimates a 3x3 homography with RANSAC. H maps image-2/keypoints-2 coordinates onto image-1/keypoints-1 coordinates. inliers columns are queryIdx, trainIdx, distance, sourceMatchIndex.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
ransacThreshold | Optional parameter. If omitted, the command uses its internal default. |
CV.FIND_HOMOGRAPHY kpA, kpB, matches, 3.0 AS H, inliersCV.FLOW_COLOR flow [, border] AS dst
Converts a 2-channel CV.FARNEBACK FLOW map to a BGR color visualization: hue is direction and brightness is motion magnitude.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
border | Optional parameter. If omitted, the command uses its internal default. |
CV.FARNEBACK prevGray, gray, "FLOW" AS flow
CV.FLOW_COLOR flow AS flowColorCV.GOOD_FEATURES src [, maxCorners [, quality [, minDistance [, value]]]] AS dst
Draws Shi-Tomasi goodFeaturesToTrack points over an 8-bit BGR diagnostic image.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
maxCorners | Maximum number of features/corners to keep. |
quality | Relative quality threshold used by feature selection. |
minDistance | Minimum distance between accepted features. |
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.GOOD_FEATURES img, 100, 0.01, 8 AS ptsCV.GOOD_FEATURES_POINTS src [, maxCorners [, quality [, minDistance]]] AS points
Returns Shi-Tomasi corner coordinates as an Nx2 numeric array: x,y. This is the data-producing companion of CV.GOOD_FEATURES.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
maxCorners | Maximum number of features/corners to keep. |
quality | Relative quality threshold used by feature selection. |
minDistance | Minimum distance between accepted features. |
CV.GOOD_FEATURES_POINTS img, 100, 0.01, 10 AS ptsCV.HARRIS src [, blockSize [, ksize [, k]]] AS dst
Computes a normalized Harris corner response map.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
blockSize | Local analysis window size used by the algorithm. |
ksize | Derivative/kernel aperture size. |
k | Algorithm coefficient, for example the Harris detector free parameter. |
CV.HARRIS img, 2, 3, 0.04 AS cornersCV.HIST_BACKPROJECT src, roi [, hBins [, sBins]] AS dst
Builds an HSV hue/saturation histogram from the ROI on the first frame, then returns a probability/backprojection map for the image or every frame of the stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
hBins | Optional parameter. If omitted, the command uses its internal default. |
sBins | Optional parameter. If omitted, the command uses its internal default. |
rect = RECT.CREATE(70, 60, 80, 80)
CV.HIST_BACKPROJECT img, rect, 30, 32 AS prob
GUI.SHOW prob, "backprojection"CV.HOG_DETECT_PEOPLE src [, hitThreshold [, scale [, finalThreshold]]] AS rects[, preview]
Runs OpenCV HOG people detection over an image or stack. rects columns: frameIndex, detectionIndex, x, y, w, h, score, classId. A sentinel row frameIndex=-1 means no detections. The optional preview draws rectangles.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
hitThreshold | Optional parameter. If omitted, the command uses its internal default. |
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
finalThreshold | Optional parameter. If omitted, the command uses its internal default. |
preview | Optional parameter. If omitted, the command uses its internal default. |
CV.HOG_DETECT_PEOPLE frame, 0.0, 1.05, 2.0 AS people, previewCV.HOUGH_CIRCLES src [, dp [, minDist [, param1 [, param2 [, minRadius [, maxRadius [, value]]]]]]] AS dst
Detects circular structures with HoughCircles and draws the result over a diagnostic image.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
dp | Inverse accumulator resolution ratio used by HoughCircles. |
minDist | Minimum distance between detected circle centers. |
param1 | First algorithm-specific tuning parameter. |
param2 | Second algorithm-specific tuning parameter. |
minRadius | Minimum circle radius to detect. |
maxRadius | Maximum circle radius to detect; zero may let OpenCV choose automatically. |
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.HOUGH_CIRCLES img, 1.2, 20, 100, 30, 5, 80 AS circlesCV.HOUGH_LINES src [, rho [, thetaDeg [, threshold [, value]]]] AS dst
Detects Hough lines from a Canny edge map and draws them over a diagnostic image.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
rho | Hough-line distance resolution in pixels. |
thetaDeg | Hough-line angular resolution in degrees. |
threshold | Detection or segmentation threshold used by the command. |
value | Scalar value written, drawn, or used as foreground/background according to the command. |
CV.HOUGH_LINES img, 1, 1, 50 AS linesCV.KMEANS src, k AS quantized
Quantizes an image or each frame of a stack with k-means clustering in channel space.
CV.KMEANS img, 4 AS quantizedCV.KMEANS_CENTERS src, k AS centersArray
Returns the k-means centers of the first frame as a numeric K x channels array. Channel order follows OpenCV, so color images are B,G,R.
CV.KMEANS_CENTERS img, 4 AS centersCV.LABELS_COLOR labels AS dst
Converts a label image, or a binary mask converted to connected components, into a deterministic color visualization.
CV.CONNECTED_COMPONENTS mask AS labels
CV.LABELS_COLOR labels AS colorLabelsCV.LAPLACIAN src AS dst
Computes the Laplacian frame-by-frame.
CV.LAPLACIAN src AS dstCV.MATCH_ORB desc1, desc2 [, maxDistance [, maxMatches]] AS matches
Matches two ORB descriptor matrices with Hamming distance and cross-check. Output columns are queryIdx, trainIdx, distance, matchRank.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
maxDistance | Optional parameter. If omitted, the command uses its internal default. |
maxMatches | Optional parameter. If omitted, the command uses its internal default. |
CV.MATCH_ORB descA, descB, 64, 200 AS matchesCV.MATCH_TEMPLATE src, templ [, method] AS dst
Computes an OpenCV template-matching response map. Source/template pairs may be broadcast across stacks.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
method | OpenCV method selector accepted by the command. |
CV.MATCH_TEMPLATE src, templ [, method] AS dstCV.MEANSHIFT src, roi [, hBins [, sBins [, maxIter [, epsilon]]]] AS rects[, preview]
Tracks the ROI color model with HSV backprojection and OpenCV meanShift. rects is an N x 11 table: frame,x,y,w,h,cx,cy,boxW,boxH,angle,score/iterations. The optional preview draws the tracked window.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
hBins | Optional parameter. If omitted, the command uses its internal default. |
sBins | Optional parameter. If omitted, the command uses its internal default. |
maxIter | Optional parameter. If omitted, the command uses its internal default. |
epsilon | Optional parameter. If omitted, the command uses its internal default. |
preview | Optional parameter. If omitted, the command uses its internal default. |
CV.MEANSHIFT st, rect, 30, 32, 20, 1.0 AS rects, previewCV.ORB_DETECT src, nfeatures AS keypoints, descriptors
Detects ORB keypoints on the first frame. keypoints is an Nx7 array: x,y,size,angle,response,octave,class_id; descriptors is a CV_8U matrix.
CV.ORB_DETECT img, 800 AS kp, descCV.QR_DETECT src AS text
Detects and decodes the first QR code payload found in an image or stack. Returns an empty string if no QR code is decoded.
CV.QR_DETECT img AS qrText
IF qrText <> "" THEN
PRINT "QR=" + qrText
ENDIFCV.SCHARR src [, dx [, dy]] AS dst
Computes Scharr gradients. Without dx/dy it returns a combined gradient image.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
dx | Derivative order or X displacement, depending on the command. |
dy | Derivative order or Y displacement, depending on the command. |
CV.SCHARR img AS gradCV.SOBEL src AS dst
Computes the Sobel gradient frame-by-frame.
CV.SOBEL src AS dstCV.DRAW_BBOX src, mask [, value [, thickness]] AS dst
Draws the bounding box of the largest mask contour over the source image or stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
CV.DRAW_BBOX img, mask, 255, 2 AS boxedCV.DRAW_CONTOURS src, mask [, value [, thickness]] AS dst
Draws external contours extracted from a binary mask over the source image or stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
CV.DRAW_CONTOURS img, mask, 255, 1 AS overlayDRAW.CIRCLE src, cx, cy, radius [, value [, thickness]] AS dst
Draws or fills a circle over an image or stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
DRAW.CIRCLE src, cx, cy, radius [, value [, thickness]] AS dstDRAW.LINE src, x1, y1, x2, y2 [, value [, thickness]] AS dst
Draws a line over an image or over every frame of a stack and returns the modified media.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
DRAW.LINE src, x1, y1, x2, y2 [, value [, thickness]] AS dstDRAW.RECT src, x, y, w, h [, value [, thickness]] AS dst
Draws or fills a rectangle over an image or stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
DRAW.RECT src, x, y, w, h [, value [, thickness]] AS dstDRAW.TEXT src, x, y, text [, value [, scale [, thickness]]] AS dst
Draws text using an OpenCV Hershey font over an image or stack.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
value | Scalar value written, drawn, or used as foreground/background according to the command. |
scale | Multiplicative scale factor; for geometric transforms it may mean image scale around the center. |
thickness | Optional parameter. If omitted, the command uses its internal default. |
DRAW.TEXT src, x, y, text [, value [, scale [, thickness]]] AS dstCV.SET_PIXEL src, x, y, value [, channel [, frame]] AS dst
Returns a copy where one pixel sample has been written. channel=-1 writes all channels; frame=-1 writes all frames.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
channel | Zero-based channel index; some commands accept -1 for grayscale/all channels. |
frame | Zero-based frame index; some stack commands accept -1 for all frames. |
CV.SET_PIXEL img, 10, 10, 255 AS marked
CV.SET_PIXEL img, 10, 10, 128, 1 AS greenOnlyCV.SET_PIXEL3 src, x, y, v0, v1, v2 [, frame] AS dst
Returns a copy where channels 0..2 of one pixel have been written. OpenCV color order is B,G,R.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
frame | Zero-based frame index; some stack commands accept -1 for all frames. |
CV.SET_PIXEL3 colorImg, 20, 20, 0, 0, 255 AS redPixelCV.SET_PIXEL4 src, x, y, v0, v1, v2, v3 [, frame] AS dst
Returns a copy where channels 0..3 of one pixel have been written. OpenCV color order is B,G,R,A.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
frame | Zero-based frame index; some stack commands accept -1 for all frames. |
CV.SET_PIXEL4 rgbaImg, 20, 20, 0, 0, 255, 255 AS redPixelPLOT.BAR valuesText, width, height AS dst
Creates a bar-chart image from newline-separated numeric values.
PLOT.BAR valuesText, width, height AS dstPLOT.XY pointsText, width, height AS dst
Creates a chart image from newline-separated X,Y numeric pairs.
PLOT.XY pointsText, width, height AS dstPLOT.Y valuesText, width, height AS dst
Creates a chart image from newline-separated numeric Y values.
PLOT.Y valuesText, width, height AS dstSTACK.ABSDIFF_PREV stack AS dst
Builds a stack of absolute differences between consecutive frames. Output frames = input frames - 1.
STACK.ABSDIFF_PREV st AS motionSTACK.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.
STACK.APPEND st, img AS st2STACK.AVERAGE stack AS dst
Reduces a stack to a single average image.
STACK.AVERAGE st AS avgSTACK.DELETE stack, index AS dst
Removes one zero-based frame and returns a new stack. The command refuses to produce an empty stack.
STACK.DELETE st, 10 AS st2STACK.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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
image3 | Optional parameter. If omitted, the command uses its internal default. |
STACK.FROM_IMAGES img0, img1, img2 AS stSTACK.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.
STACK.INSERT st, 0, firstFrame AS st2STACK.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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
method | OpenCV method selector accepted by the command. |
STACK.INTERPOLATE st, 2, "LINEAR" AS slow
STACK.INTERPOLATE st, 4, "NEAREST" AS steppedSTACK.MAX_IMAGE stack AS dst
Reduces a stack to a per-pixel temporal maximum image.
STACK.MAX_IMAGE st AS mxSTACK.MEDIAN stack AS dst
Reduces a stack to a robust per-pixel median image.
STACK.MEDIAN st AS medSTACK.MIN_IMAGE stack AS dst
Reduces a stack to a per-pixel temporal minimum image.
STACK.MIN_IMAGE st AS mnSTACK.RANGE stack, first, count AS dst
Extracts a sub-stack starting at zero-based frame index first and containing up to count frames.
STACK.RANGE st, 10, 50 AS clipSTACK.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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
method | OpenCV method selector accepted by the command. |
STACK.RESAMPLE_FPS st, 25.0, "LINEAR" AS st25STACK.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.
STACK.SET_FPS st, 10.0 AS st10STACK.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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
method | OpenCV method selector accepted by the command. |
referenceIndex | Optional parameter. If omitted, the command uses its internal default. |
maxFeatures | Optional parameter. If omitted, the command uses its internal default. |
ransacThreshold | Optional parameter. If omitted, the command uses its internal default. |
borderValue | Constant value used to fill pixels outside the source image after a transform. |
transforms | Optional parameter. If omitted, the command uses its internal default. |
STACK.STABILIZE st, TRANSLATION AS stab
STACK.STABILIZE st, AFFINE, 0, 800, 3.0 AS stab, trSTACK.STDDEV_IMAGE stack AS dst
Reduces a stack to a 32/64-bit standard-deviation image that maps temporal variability per pixel.
STACK.STDDEV_IMAGE st AS sigmaSTACK.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.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
method | OpenCV method selector accepted by the command. |
STACK.TEMPORAL_FILTER st, 2, "MEAN" AS denoised
STACK.TEMPORAL_FILTER st, 1, "MEDIAN" AS despeckledCV.PALETTE src, paletteFile AS dst OR CV.PALETTE var, paletteFile
Applies a .map RGB palette to a grayscale image/stack and returns a BGR color visualization. If paletteFile is not an absolute path, ./sys/palette is searched; the .map extension is optional.
img = CV.DESKTOP_IMAGE()
CV.PALETTE img, "thermal.map" AS colorImg
GUI.SHOW colorImgCV.SHOW imageOrStack [, title]
Compatibility alias of SHOW.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
title | Optional GUI/DataPlot window title. |
CV.SHOWDEMO.HELLO [name]
Library: DemoStats user library 2.0.0 Prints a greeting from the DLL.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
name | Optional parameter. If omitted, the command uses its internal default. |
DEMO.HELLODEMO.TYPES
Library: DemoStats user library 2.0.0 Prints the SDK data types supported by this demo library.
DEMO.TYPESSERIAL.HELLO [name]
Library: Serial user library 1.0.0 Prints a greeting from the DLL.
Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.
| Parameter | Meaning |
|---|---|
name | Optional parameter. If omitted, the command uses its internal default. |
SERIAL.HELLO