| Home | | | Quick start | | | Cookbook | | | All symbols | | | Analytical index | | | Namespaces | | | Syntax | | | Statements | | | CX | | | Frequency | | | Functions | | | Examples | | | Examples by command |
OpenCV image processing, filtering, morphology, measurements and media operations.
Symbols in this namespace: 186
| Symbol | Kind | Category | Description |
|---|---|---|---|
CV.ABSDIFF | Command | Image arithmetic statements | Computes the absolute difference between two images or stacks. |
CV.ADAPTIVE_THRESHOLD | Command | Threshold and mask statements | Applies an adaptive threshold frame-by-frame. |
CV.ADD | Command | Image arithmetic statements | Adds two images or stacks. A single image can be broadcast across a stack. |
CV.ADDS | Command | Image arithmetic statements | Adds a scalar value to every pixel. |
CV.ADJUST_COLOR | Command | Analysis / flow statements | Applies brightness/contrast in BGR and hue/saturation in HSV; useful with GUI trackbars in live webcam demos. |
CV.AREA | Function | Shape and connected-component metrics | Counts foreground pixels in a binary mask; non-zero means foreground. |
CV.ASPECT_RATIO | Function | Shape and connected-component metrics | Bounding-box width/height ratio of the largest contour. |
CV.BBOX_H | Function | Shape and connected-component metrics | Height of the largest contour bounding box. |
CV.BBOX_W | Function | Shape and connected-component metrics | Width of the largest contour bounding box. |
CV.BBOX_X | Function | Shape and connected-component metrics | X coordinate of the largest contour bounding box. |
CV.BBOX_Y | Function | Shape and connected-component metrics | Y coordinate of the largest contour bounding box. |
CV.BG_SUBTRACT | Command | Analysis / flow statements | Applies MOG2 or KNN background subtraction to a video/stack and returns an 8-bit foreground-mask stack. method can be "MOG2" or "KNN". |
CV.BILATERAL | Command | Filtering / enhancement statements | Applies bilateral edge-preserving smoothing frame-by-frame. |
CV.BITAND | Command | Image arithmetic statements | 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.BITNOT | Command | Image arithmetic statements | Computes the bitwise NOT of the source image or stack. |
CV.BITOR | Command | Image arithmetic statements | 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.BITXOR | Command | Image arithmetic statements | 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.BLACKHAT | Command | Morphology statements | Computes the black-hat transform frame-by-frame with selectable kernel shape. |
CV.BLUR | Command | Filtering / enhancement statements | Applies a simple blur frame-by-frame. |
CV.CAMSHIFT | Command | Analysis / flow statements | 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. |
CV.CANNY | Command | Analysis / flow statements | Runs Canny edge detection frame-by-frame. |
CV.CANVAS | Command | Image creation / conversion statements | Creates a new 8-bit canvas image with 1 to 4 channels and a constant background value. |
CV.CC_COUNT | Function | Shape and connected-component metrics | Counts connected components in a binary mask; stacks are summed frame-by-frame. |
CV.CC_LARGEST_AREA | Function | Shape and connected-component metrics | Area in pixels of the largest connected component found across the media object. |
CV.CDF_ARRAY | Function | Image statistics | Returns a normalized cumulative distribution array from the image/stack histogram. |
CV.CENTROID_X | Function | Shape and connected-component metrics | X coordinate of the largest contour centroid. |
CV.CENTROID_Y | Function | Shape and connected-component metrics | Y coordinate of the largest contour centroid. |
CV.CHANNEL | Command | Image creation / conversion statements | Extracts one channel as a single-channel image or stack. |
CV.CHANNELS | Function | Image / stack information | Number of channels in the image or stack frames. |
CV.CIRCLE_MASK | Command | Threshold and mask statements | Creates a single-channel circular mask. |
CV.CIRCULARITY | Function | Shape and connected-component metrics | Circularity of the largest contour, computed as 4*pi*area / perimeter^2. |
CV.CLAHE | Command | Filtering / enhancement statements | Applies contrast-limited adaptive histogram equalization. On color images it works on the L channel in Lab. |
CV.CLONE | Command | Image creation / conversion statements | Duplicates the image or stack object. |
CV.COLOR | Command | Image creation / conversion statements | Converts between common color spaces such as BGR, HSV, Lab, and gray. |
CV.COMPARE | Command | Threshold and mask statements | Creates a mask by comparing pixels with a scalar value. Operators: >, >=, <, <=, ==, !=. |
CV.COMPLEX_CONJ | Command | Complex image statements | Computes the complex conjugate of a complex image by negating the imaginary channel. |
CV.COMPLEX_MAGNITUDE | Command | Complex image statements | Computes per-pixel magnitude sqrt(re^2 + im^2) from a complex image. |
CV.COMPLEX_PHASE | Command | Complex image statements | Computes per-pixel phase angle atan2(im,re), in radians, from a complex image. |
CV.CONNECTED_COMPONENTS | Command | Analysis / flow statements | Labels foreground connected components in a binary mask derived from non-zero pixels. |
CV.CONTOUR_COUNT | Function | Shape and connected-component metrics | Counts external contours in a binary mask; stacks are summed frame-by-frame. |
CV.CONTOUR_POINTS | Function | Shape and connected-component metrics | Returns an Nx2 numeric array with x,y contour coordinates from the first frame. External contours are sorted by descending area; contourIndex defaults to 0, while -1 concatenates all external contours. |
CV.CONTOURS | Command | Analysis / flow statements | 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. |
CV.CONVERT | Command | Image creation / conversion statements | Converts OpenCV depth with optional scale and offset. Depth tokens include 8U, 16U, 32F, 64F and SAME. |
CV.CORNER_SUBPIX | Command | Analysis / flow statements | Refines an Nx2 or Nx>=2 point array with OpenCV cornerSubPix and returns a refined Nx2 array. |
CV.COUNT_NONZERO | Function | Image statistics | Compatibility alias for COUNT_NONZERO / MASK.COUNT. |
CV.CROP | Command | Geometry / remap statements | Crops a ROI from the image or from all frames in the stack. |
CV.CROP_RECT | Command | Geometry / remap statements | 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. |
CV.DESKTOP_IMAGE | Function | Desktop / GUI capture functions | Returns a single image taken from the GUI desktop. With a window title it reads that window; without arguments it uses the active MDI image window. For stack windows it returns the currently visible frame. |
CV.DETECT_OBJECTS | Command | Analysis / flow statements | 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. |
CV.DFT_COMPLEX | Command | Frequency / spectral statements | Computes a complex 2D DFT. A real single-channel input becomes CV_32FC2; a complex two-channel input is transformed as complex data. |
CV.DFT_MAGNITUDE | Command | Frequency / spectral statements | Computes a centered 2D DFT magnitude map from the grayscale source, normalized to 0..255 as 32F. |
CV.DFT_SHIFT | Command | Frequency / spectral statements | Circularly shifts a real or complex spectrum so the DC component is at the image center. Dimensions are preserved, including odd sizes. |
CV.DILATE | Command | Morphology statements | Applies morphological dilation frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations. |
CV.DISTANCE | Command | Morphology statements | Computes the distance transform of a binary mask derived from non-zero pixels. |
CV.DISTANCE_TRANSFORM | Command | Morphology statements | 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. |
CV.DIV | Command | Image arithmetic statements | Performs pixel-wise division between two images or stacks. |
CV.DIVS | Command | Image arithmetic statements | Divides every pixel/channel of an image or stack by a non-zero scalar. This is clearer than CV.MULS src, 1/scalar. |
CV.DRAW_BBOX | Command | Drawing statements | Draws the bounding box of the largest mask contour over the source image or stack. |
CV.DRAW_CONTOURS | Command | Drawing statements | Draws external contours extracted from a binary mask over the source image or stack. |
CV.DRAW_FLOW_ARROWS | Command | Analysis / flow statements | 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. |
CV.DRAW_MATCHES | Command | Analysis / flow statements | 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. |
CV.DRAW_MATCHES_DATA | Command | Analysis / flow statements | Draws matches from a numeric matches/inliers array, useful after CV.FIND_HOMOGRAPHY RANSAC filtering. |
CV.EDGES | Command | Analysis / flow statements | Computes an edge map frame-by-frame. |
CV.EQUALIZE | Command | Filtering / enhancement statements | Equalizes the histogram frame-by-frame. |
CV.ERODE | Command | Morphology statements | Applies morphological erosion frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations. |
CV.EXTENT | Function | Shape and connected-component metrics | Largest contour area divided by its bounding-rectangle area. |
CV.FARNEBACK | Command | Analysis / flow statements | 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. |
CV.FILL_HOLES | Command | Threshold and mask statements | Fills internal holes of a binary mask derived from non-zero pixels. |
CV.FILTER2D | Command | Filtering / enhancement statements | Applies a custom 2D convolution kernel. Kernel rows are separated by semicolons; values by spaces or commas. |
CV.FIND_HOMOGRAPHY | Command | Analysis / flow statements | 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. |
CV.FLIP | Command | Geometry / remap statements | 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.FLOW_COLOR | Command | Analysis / flow statements | Converts a 2-channel CV.FARNEBACK FLOW map to a BGR color visualization: hue is direction and brightness is motion magnitude. |
CV.FPS | Function | Image / stack information | FPS associated with the video stack. |
CV.FRAME | Function | Image / stack information | Extracts a stack frame as a single image. |
CV.FRAMES | Function | Image / stack information | Number of frames in the stack, or 1 for a single image. |
CV.FREQ_BAND_PASS | Command | Frequency / spectral statements | Keeps a centered annular frequency band and rejects frequencies outside the selected radii. |
CV.FREQ_GAUSSIAN_HIGH_PASS | Command | Frequency / spectral statements | Applies a smooth Gaussian high-pass mask to a centered complex spectrum. |
CV.FREQ_GAUSSIAN_LOW_PASS | Command | Frequency / spectral statements | Applies a smooth Gaussian low-pass mask to a centered complex spectrum. |
CV.FREQ_HIGH_PASS | Command | Frequency / spectral statements | Applies an ideal circular high-pass mask to a centered complex spectrum. |
CV.FREQ_LOW_PASS | Command | Frequency / spectral statements | Applies an ideal circular low-pass mask to a centered complex spectrum. |
CV.FREQ_NOTCH | Command | Frequency / spectral statements | Suppresses a circular notch at the offset from the centered DC component. mirror=TRUE also suppresses the symmetric notch. |
CV.GAMMA | Command | Filtering / enhancement statements | Applies gamma correction frame-by-frame. |
CV.GAUSSIAN | Command | Filtering / enhancement statements | Applies a Gaussian blur frame-by-frame. |
CV.GOOD_FEATURES | Command | Analysis / flow statements | Draws Shi-Tomasi goodFeaturesToTrack points over an 8-bit BGR diagnostic image. |
CV.GOOD_FEATURES_POINTS | Command | Analysis / flow statements | Returns Shi-Tomasi corner coordinates as an Nx2 numeric array: x,y. This is the data-producing companion of CV.GOOD_FEATURES. |
CV.GRAY | Command | Image creation / conversion statements | Converts to grayscale; on stacks it operates frame-by-frame. |
CV.HARRIS | Command | Analysis / flow statements | Computes a normalized Harris corner response map. |
CV.HEIGHT | Function | Image / stack information | Height of an image or stack. |
CV.HIST_ARRAY | Function | Image statistics | Returns a numeric array with histogram bin counts. If min/max are omitted, the range is detected from the media. |
CV.HIST_BACKPROJECT | Command | Analysis / flow statements | 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. |
CV.HOG_DETECT_PEOPLE | Command | Analysis / flow statements | 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. |
CV.HOUGH_CIRCLES | Command | Analysis / flow statements | Detects circular structures with HoughCircles and draws the result over a diagnostic image. |
CV.HOUGH_LINES | Command | Analysis / flow statements | Detects Hough lines from a Canny edge map and draws them over a diagnostic image. |
CV.IDFT_COMPLEX | Command | Frequency / spectral statements | Computes the inverse complex DFT with scaling. The output remains a complex image; split it to inspect real and imaginary residuals. |
CV.IDFT_SHIFT | Command | Frequency / spectral statements | Inverse circular shift for a spectrum previously centered with CV.DFT_SHIFT. |
CV.INPAINT | Command | Filtering / enhancement statements | Fills/restores masked pixels using OpenCV inpainting. method can be TELEA or NS; the source must be 8-bit single-channel or BGR. |
CV.INRANGE | Command | Threshold and mask statements | Segments pixels whose values fall inside a scalar range; the range is applied to all channels. |
CV.INRANGE_COLOR | Command | Threshold and mask statements | Creates a 3-channel scalar range mask, useful after HSV/Lab conversion. |
CV.INVERT | Command | Image creation / conversion statements | Inverts pixel intensity; on stacks it operates frame-by-frame. |
CV.IS_EMPTY | Function | Image / stack information | Returns TRUE for NULL, empty media, invalid arrays or empty strings. |
CV.IS_IMAGE | Function | Image / stack information | Returns TRUE when value is a non-empty single image object. |
CV.IS_STACK | Function | Image / stack information | Returns TRUE when value is a non-empty stack object. Non-media values simply return FALSE. |
CV.IS_VALID | Function | Image / stack information | Returns TRUE when value is a non-empty image or stack object. Useful after IO.TRY_LOAD. |
CV.KEEP_LARGEST | Command | Threshold and mask statements | Keeps only the largest connected foreground component of a binary mask. |
CV.KMEANS | Command | Analysis / flow statements | Quantizes an image or each frame of a stack with k-means clustering in channel space. |
CV.KMEANS_CENTERS | Command | Analysis / flow statements | 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.LABELS_COLOR | Command | Analysis / flow statements | Converts a label image, or a binary mask converted to connected components, into a deterministic color visualization. |
CV.LAPLACIAN | Command | Analysis / flow statements | Computes the Laplacian frame-by-frame. |
CV.LARGEST_CONTOUR_AREA | Function | Shape and connected-component metrics | Area in pixels of the largest external contour found across the media object. |
CV.LARGEST_CONTOUR_PERIMETER | Function | Shape and connected-component metrics | Perimeter of the largest external contour found across the media object. |
CV.LINE_PROFILE_ARRAY | Function | Image statistics | Returns a bilinear sampled line profile array from the first frame. Channel -1 means grayscale. |
CV.MATCH_ORB | Command | Analysis / flow statements | Matches two ORB descriptor matrices with Hamming distance and cross-check. Output columns are queryIdx, trainIdx, distance, matchRank. |
CV.MATCH_TEMPLATE | Command | Analysis / flow statements | Computes an OpenCV template-matching response map. Source/template pairs may be broadcast across stacks. |
CV.MAXIMUM | Command | Image arithmetic statements | Computes the per-pixel maximum of two images or stacks. |
CV.MAXLOC_FRAME | Function | Location functions | Frame index where the maximum value is located. |
CV.MAXLOC_VALUE | Function | Location functions | Maximum value in a single-channel map or map stack. |
CV.MAXLOC_X | Function | Location functions | X coordinate of the maximum value in a single-channel map or map stack. |
CV.MAXLOC_Y | Function | Location functions | Y coordinate of the maximum value in a single-channel map or map stack. |
CV.MAXVAL | Function | Image statistics | Maximum sample value across all pixels, channels, and frames. |
CV.MEAN | Function | Image statistics | Mean value across all pixels, channels, and frames. |
CV.MEAN_MASK | Function | Image statistics | Masked mean of a media object using a binary mask or mask stack. |
CV.MEANSHIFT | Command | Analysis / flow statements | 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. |
CV.MEDIAN | Command | Filtering / enhancement statements | Applies a median filter frame-by-frame. |
CV.MERGE | Command | Image creation / conversion statements | Merges one to four single-channel images/stacks into a multi-channel result. |
CV.MERGE_COMPLEX | Command | Complex image statements | Merges two same-size single-channel images into a CV_32FC2 complex image: channel 0 is real, channel 1 is imaginary. |
CV.MINIMUM | Command | Image arithmetic statements | Computes the per-pixel minimum of two images or stacks. |
CV.MINLOC_FRAME | Function | Location functions | Frame index where the minimum value is located. |
CV.MINLOC_VALUE | Function | Location functions | Minimum value in a single-channel map or map stack. |
CV.MINLOC_X | Function | Location functions | X coordinate of the minimum value in a single-channel map or map stack. |
CV.MINLOC_Y | Function | Location functions | Y coordinate of the minimum value in a single-channel map or map stack. |
CV.MINVAL | Function | Image statistics | Minimum sample value across all pixels, channels, and frames. |
CV.MORPH_CLOSE | Command | Morphology statements | Applies morphological closing frame-by-frame with selectable kernel shape. |
CV.MORPH_EX | Command | Morphology statements | Applies a selectable morphological operation. operation: OPEN, CLOSE, GRADIENT, TOPHAT, BLACKHAT, ERODE, DILATE. kernelType: ELLIPSE, RECT, CROSS. |
CV.MORPH_GRADIENT | Command | Morphology statements | Computes a morphological gradient frame-by-frame with selectable kernel shape. |
CV.MORPH_OPEN | Command | Morphology statements | Applies morphological opening frame-by-frame with selectable kernel shape. |
CV.MUL | Command | Image arithmetic statements | Performs pixel-wise multiplication between two images or stacks. |
CV.MULS | Command | Image arithmetic statements | Multiplies every pixel by a scalar value. |
CV.NLMEANS | Command | Filtering / enhancement statements | Applies OpenCV fast non-local means denoising. Output is 8-bit grayscale/BGR. |
CV.NORM | Function | Image statistics | Global L2 norm across all pixels, channels, and frames. |
CV.NORMALIZE | Command | Image arithmetic statements | Normalizes the source range into a target range using OpenCV NORM_MINMAX. |
CV.ORB_DETECT | Command | Analysis / flow statements | 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.OTSU | Command | Threshold and mask statements | Computes an automatic Otsu threshold on the grayscale source. |
CV.PAD | Command | Geometry / remap statements | Adds a constant border around an image or every stack frame. |
CV.PALETTE | Command | Other image / stack statements | 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. |
CV.PASTE | Command | Geometry / remap statements | 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_RECT | Command | Geometry / remap statements | 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. |
CV.PERIMETER | Function | Shape and connected-component metrics | Total contour perimeter of a binary mask across all frames. |
CV.PIXEL | Function | Image / stack information | Returns one pixel sample as a number. Channel and frame default to zero. |
CV.PIXEL_ARRAY | Function | Image statistics | Returns all channel samples of one pixel as a numeric array. For color images the order follows OpenCV/BGR. |
CV.POWER_SPECTRUM | Command | Frequency / spectral statements | Computes a centered power spectrum map from the grayscale source, normalized to 0..255 as 32F. |
CV.PROFILE_ARRAY | Function | Image statistics | Returns a horizontal or vertical intensity profile array from the first frame. Modes: H/ROW or V/COLUMN. Channel -1 means grayscale. |
CV.QR_DETECT | Command | Analysis / flow statements | 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.RECT_MASK | Command | Threshold and mask statements | Creates a single-channel rectangular mask. Legacy command equivalent to MASK.RECT with explicit coordinates. |
CV.REMAP | Command | Geometry / remap statements | 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.RESIZE | Command | Geometry / remap statements | Resizes the image or all frames in the stack. |
CV.ROTATE | Command | Geometry / remap statements | Rotates around the image center using affine interpolation and a constant border value. |
CV.ROTATE90 | Command | Geometry / remap statements | Rotates by exact right angles without interpolation. Codes: 90/CW, 180, 270/CCW. |
CV.SCALE_ABS | Command | Image creation / conversion statements | Applies OpenCV convertScaleAbs, useful for visualizing gradients and signed/float maps. |
CV.SCHARR | Command | Analysis / flow statements | Computes Scharr gradients. Without dx/dy it returns a combined gradient image. |
CV.SET_PIXEL | Command | Pixel access statements | Returns a copy where one pixel sample has been written. channel=-1 writes all channels; frame=-1 writes all frames. |
CV.SET_PIXEL3 | Command | Pixel access statements | Returns a copy where channels 0..2 of one pixel have been written. OpenCV color order is B,G,R. |
CV.SET_PIXEL4 | Command | Pixel access statements | Returns a copy where channels 0..3 of one pixel have been written. OpenCV color order is B,G,R,A. |
CV.SHOW | Command | Other image / stack statements | Compatibility alias of SHOW. |
CV.SOBEL | Command | Analysis / flow statements | Computes the Sobel gradient frame-by-frame. |
CV.SPECTRUM_LOG_MAG | Command | Frequency / spectral statements | Computes log(1+magnitude) from a complex spectrum, optionally normalized for display. |
CV.SPECTRUM_MAGNITUDE | Command | Frequency / spectral statements | Computes magnitude from a complex spectrum. With normalize=TRUE the result is scaled to 0..255 for display. |
CV.SPECTRUM_PHASE | Command | Frequency / spectral statements | Computes phase from a complex spectrum. Without normalization the result is in radians; normalized output is intended for GUI display. |
CV.SPECTRUM_POWER | Command | Frequency / spectral statements | Computes power re^2+im^2 from a complex spectrum, optionally applying log(1+x) and normalization for display. |
CV.SPLIT_COMPLEX | Command | Complex image statements | Splits a CV_32FC2/CV_64FC2 complex image into real and imaginary single-channel images. |
CV.STDDEV | Function | Image statistics | Standard deviation across all pixels, channels, and frames. |
CV.SUB | Command | Image arithmetic statements | Starts a named subroutine block. The block is skipped during normal flow and executed only by CALL. |
CV.SUBS | Command | Image arithmetic statements | Subtracts a scalar from every pixel/channel of an image or stack. This is clearer than CV.ADDS src, -scalar. |
CV.SUM | Function | Image statistics | Sum of all pixels, channels, and frames. |
CV.THRESHOLD | Command | Threshold and mask statements | Applies a fixed threshold frame-by-frame. |
CV.TO32F | Command | Image creation / conversion statements | Converts to 32-bit float using optional scale and offset. |
CV.TO8U | Command | Image creation / conversion statements | Converts to 8-bit unsigned using optional alpha and beta. |
CV.TOPHAT | Command | Morphology statements | Computes the top-hat transform frame-by-frame with selectable kernel shape. |
CV.TRANSLATE | Command | Geometry / remap statements | Translates image content by dx,dy pixels using a constant border value. |
CV.TYPE | Function | Image / stack information | Returns NUMBER, BOOL, STRING, IMAGE, STACK, ARRAY or NULL. |
CV.UNSHARP | Command | Filtering / enhancement statements | Applies unsharp masking using a Gaussian blur and weighted recombination. |
CV.WARP_AFFINE | Command | Geometry / remap statements | Applies a 2x3 affine transform matrix with optional output size and constant border value. |
CV.WARP_HOMOGRAPHY | Command | Geometry / remap statements | 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. |
CV.WARP_PERSPECTIVE | Command | Geometry / remap statements | Applies a 3x3 homography/perspective transform matrix with optional output size and constant border value. On stacks it operates frame-by-frame. |
CV.WATERSHED | Command | Threshold and mask statements | 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. |
CV.WATERSHED_AUTO | Command | Threshold and mask statements | 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. |
CV.WIDTH | Function | Image / stack information | Width of an image or stack. |
CV.ABSDIFF left, right AS dst
Computes the absolute difference between two images or stacks.
CV.ABSDIFF left, right AS dstCV.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.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.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.AREA(mask)
Counts foreground pixels in a binary mask; non-zero means foreground.
value = CV.AREA(mask)CV.ASPECT_RATIO(mask)
Bounding-box width/height ratio of the largest contour.
value = CV.ASPECT_RATIO(mask)CV.BBOX_H(mask)
Height of the largest contour bounding box.
h = CV.BBOX_H(mask)CV.BBOX_W(mask)
Width of the largest contour bounding box.
w = CV.BBOX_W(mask)CV.BBOX_X(mask)
X coordinate of the largest contour bounding box.
x = CV.BBOX_X(mask)CV.BBOX_Y(mask)
Y coordinate of the largest contour bounding box.
y = CV.BBOX_Y(mask)CV.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.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.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.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.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.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.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.CC_COUNT(mask)
Counts connected components in a binary mask; stacks are summed frame-by-frame.
value = CV.CC_COUNT(mask)CV.CC_LARGEST_AREA(mask)
Area in pixels of the largest connected component found across the media object.
value = CV.CC_LARGEST_AREA(mask)CV.CDF_ARRAY(media [, bins [, channel [, minValue [, maxValue]]]])
Returns a normalized cumulative distribution array from the image/stack histogram.
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 |
|---|---|
bins | Number of histogram bins. |
channel | Zero-based channel index; some commands accept -1 for grayscale/all channels. |
minValue | Lower numeric range limit. |
maxValue | Upper numeric range limit. |
cdf = CV.CDF_ARRAY(img, 256)CV.CENTROID_X(mask)
X coordinate of the largest contour centroid.
cx = CV.CENTROID_X(mask)CV.CENTROID_Y(mask)
Y coordinate of the largest contour centroid.
cy = CV.CENTROID_Y(mask)CV.CHANNEL src, index AS dst
Extracts one channel as a single-channel image or stack.
CV.CHANNEL src, index AS dstCV.CHANNELS(image)
Number of channels in the image or stack frames.
value = CV.CHANNELS(image)CV.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.CIRCULARITY(mask)
Circularity of the largest contour, computed as 4*pi*area / perimeter^2.
value = CV.CIRCULARITY(mask)CV.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.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.COMPARE src, op, value AS dst
Creates a mask by comparing pixels with a scalar value. Operators: >, >=, <, <=, ==, !=.
CV.COMPARE img, ">", 128 AS maskCV.COMPLEX_CONJ complexImage AS dst
Computes the complex conjugate of a complex image by negating the imaginary channel.
CV.COMPLEX_CONJ complexImage AS dstCV.COMPLEX_MAGNITUDE complexImage AS magnitudeImage
Computes per-pixel magnitude sqrt(re^2 + im^2) from a complex image.
CV.COMPLEX_MAGNITUDE complexImage AS magnitudeImageCV.COMPLEX_PHASE complexImage AS phaseImage
Computes per-pixel phase angle atan2(im,re), in radians, from a complex image.
CV.COMPLEX_PHASE complexImage AS phaseImageCV.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.CONTOUR_COUNT(mask)
Counts external contours in a binary mask; stacks are summed frame-by-frame.
value = CV.CONTOUR_COUNT(mask)CV.CONTOUR_POINTS(mask [, contourIndex])
Returns an Nx2 numeric array with x,y contour coordinates from the first frame. External contours are sorted by descending area; contourIndex defaults to 0, while -1 concatenates all external contours.
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 |
|---|---|
contourIndex | Optional parameter. If omitted, the command uses its internal default. |
pts = CV.CONTOUR_POINTS(mask)
PRINT ARRAY.DIMSIZE(pts, 0), pts(0,0), pts(0,1)CV.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.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.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.COUNT_NONZERO(mask)
Compatibility alias for COUNT_NONZERO / MASK.COUNT.
n = CV.COUNT_NONZERO(mask)CV.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.DESKTOP_IMAGE([windowTitle])
Returns a single image taken from the GUI desktop. With a window title it reads that window; without arguments it uses the active MDI image window. For stack windows it returns the currently visible 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 |
|---|---|
windowTitle | Optional parameter. If omitted, the command uses its internal default. |
value = CV.DESKTOP_IMAGE([windowTitle])CV.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.DFT_COMPLEX src AS spectrum
Computes a complex 2D DFT. A real single-channel input becomes CV_32FC2; a complex two-channel input is transformed as complex data.
CV.DFT_COMPLEX src AS specCV.DFT_MAGNITUDE src [, logScale] AS dst
Computes a centered 2D DFT magnitude 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.DFT_MAGNITUDE img, TRUE AS specCV.DFT_SHIFT spectrum AS centered
Circularly shifts a real or complex spectrum so the DC component is at the image center. Dimensions are preserved, including odd sizes.
CV.DFT_SHIFT spectrum AS centeredCV.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.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.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 overlayCV.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.EQUALIZE src AS dst
Equalizes the histogram frame-by-frame.
CV.EQUALIZE src AS dstCV.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.EXTENT(mask)
Largest contour area divided by its bounding-rectangle area.
value = CV.EXTENT(mask)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)
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.FILL_HOLES mask AS dst
Fills internal holes of a binary mask derived from non-zero pixels.
CV.FILL_HOLES mask AS filledCV.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.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.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.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.FPS(image)
FPS associated with the video stack.
value = CV.FPS(image)CV.FRAME(stack,index)
Extracts a stack frame as a single image.
value = CV.FRAME(stack,index)CV.FRAMES(image)
Number of frames in the stack, or 1 for a single image.
value = CV.FRAMES(image)CV.FREQ_BAND_PASS centeredSpectrum, innerRadius, outerRadius AS filteredSpectrum
Keeps a centered annular frequency band and rejects frequencies outside the selected radii.
CV.FREQ_BAND_PASS centeredSpectrum, innerRadius, outerRadius AS filteredSpectrumCV.FREQ_GAUSSIAN_HIGH_PASS centeredSpectrum, sigma AS filteredSpectrum
Applies a smooth Gaussian high-pass mask to a centered complex spectrum.
CV.FREQ_GAUSSIAN_HIGH_PASS centeredSpectrum, sigma AS filteredSpectrumCV.FREQ_GAUSSIAN_LOW_PASS centeredSpectrum, sigma AS filteredSpectrum
Applies a smooth Gaussian low-pass mask to a centered complex spectrum.
CV.FREQ_GAUSSIAN_LOW_PASS centeredSpectrum, sigma AS filteredSpectrumCV.FREQ_HIGH_PASS centeredSpectrum, radius AS filteredSpectrum
Applies an ideal circular high-pass mask to a centered complex spectrum.
CV.FREQ_HIGH_PASS centeredSpectrum, radius AS filteredSpectrumCV.FREQ_LOW_PASS centeredSpectrum, radius AS filteredSpectrum
Applies an ideal circular low-pass mask to a centered complex spectrum.
CV.FREQ_LOW_PASS centeredSpectrum, radius AS filteredSpectrumCV.FREQ_NOTCH centeredSpectrum, offsetX, offsetY, radius [, mirror] AS filteredSpectrum
Suppresses a circular notch at the offset from the centered DC component. mirror=TRUE also suppresses the symmetric notch.
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 |
|---|---|
mirror | Optional parameter. If omitted, the command uses its internal default. |
CV.FREQ_NOTCH centeredSpectrum, offsetX, offsetY, radius [, mirror] AS filteredSpectrumCV.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.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.GRAY src AS dst
Converts to grayscale; on stacks it operates frame-by-frame.
CV.GRAY src AS dstCV.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.HEIGHT(image)
Height of an image or stack.
value = CV.HEIGHT(image)CV.HIST_ARRAY(media [, bins [, channel [, minValue [, maxValue]]]])
Returns a numeric array with histogram bin counts. If min/max are omitted, the range is detected from the 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 |
|---|---|
bins | Number of histogram bins. |
channel | Zero-based channel index; some commands accept -1 for grayscale/all channels. |
minValue | Lower numeric range limit. |
maxValue | Upper numeric range limit. |
h = CV.HIST_ARRAY(img, 256)
p = DPLOT.CREATE("Histogram")
DPLOT.ADDY p, "gray", hCV.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.IDFT_COMPLEX spectrum AS complexImage
Computes the inverse complex DFT with scaling. The output remains a complex image; split it to inspect real and imaginary residuals.
CV.IDFT_COMPLEX spec AS recon
CV.SPLIT_COMPLEX recon AS real, imagCV.IDFT_SHIFT centered AS spectrum
Inverse circular shift for a spectrum previously centered with CV.DFT_SHIFT.
CV.IDFT_SHIFT centered AS spectrumCV.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.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.INVERT src AS dst
Inverts pixel intensity; on stacks it operates frame-by-frame.
CV.INVERT src AS dstCV.IS_EMPTY(value)
Returns TRUE for NULL, empty media, invalid arrays or empty strings.
ASSERT NOT CV.IS_EMPTY(img), "empty media"CV.IS_IMAGE(value)
Returns TRUE when value is a non-empty single image object.
IF CV.IS_IMAGE(img) THEN
GUI.SHOW img
ENDIFCV.IS_STACK(value)
Returns TRUE when value is a non-empty stack object. Non-media values simply return FALSE.
IF CV.IS_STACK(media) THEN
PRINT STACK.FRAMES(media)
ENDIFCV.IS_VALID(value)
Returns TRUE when value is a non-empty image or stack object. Useful after IO.TRY_LOAD.
IO.TRY_LOAD "missing.png" AS img
IF NOT CV.IS_VALID(img) THEN
PRINT IO.LAST_ERROR()
ENDIFCV.KEEP_LARGEST mask AS dst
Keeps only the largest connected foreground component of a binary mask.
CV.KEEP_LARGEST mask AS mainObjCV.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.LARGEST_CONTOUR_AREA(mask)
Area in pixels of the largest external contour found across the media object.
value = CV.LARGEST_CONTOUR_AREA(mask)CV.LARGEST_CONTOUR_PERIMETER(mask)
Perimeter of the largest external contour found across the media object.
value = CV.LARGEST_CONTOUR_PERIMETER(mask)CV.LINE_PROFILE_ARRAY image, x1, y1, x2, y2 [, channel]
Returns a bilinear sampled line profile array from the first frame. Channel -1 means grayscale.
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. |
line = CV.LINE_PROFILE_ARRAY(img, 10, 10, 200, 100)CV.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.MAXIMUM left, right AS dst
Computes the per-pixel maximum of two images or stacks.
CV.MAXIMUM left, right AS dstCV.MAXLOC_FRAME(map)
Frame index where the maximum value is located.
value = CV.MAXLOC_FRAME(map)CV.MAXLOC_VALUE(map)
Maximum value in a single-channel map or map stack.
value = CV.MAXLOC_VALUE(map)CV.MAXLOC_X(map)
X coordinate of the maximum value in a single-channel map or map stack.
value = CV.MAXLOC_X(map)CV.MAXLOC_Y(map)
Y coordinate of the maximum value in a single-channel map or map stack.
value = CV.MAXLOC_Y(map)CV.MAXVAL(media)
Maximum sample value across all pixels, channels, and frames.
value = CV.MAXVAL(media)CV.MEAN(media)
Mean value across all pixels, channels, and frames.
value = CV.MEAN(media)CV.MEAN_MASK(media,mask)
Masked mean of a media object using a binary mask or mask stack.
value = CV.MEAN_MASK(media,mask)CV.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.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.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.MERGE_COMPLEX realImage, imagImage AS complexImage
Merges two same-size single-channel images into a CV_32FC2 complex image: channel 0 is real, channel 1 is imaginary.
CV.MERGE_COMPLEX re, im AS zimgCV.MINIMUM left, right AS dst
Computes the per-pixel minimum of two images or stacks.
CV.MINIMUM left, right AS dstCV.MINLOC_FRAME(map)
Frame index where the minimum value is located.
value = CV.MINLOC_FRAME(map)CV.MINLOC_VALUE(map)
Minimum value in a single-channel map or map stack.
value = CV.MINLOC_VALUE(map)CV.MINLOC_X(map)
X coordinate of the minimum value in a single-channel map or map stack.
value = CV.MINLOC_X(map)CV.MINLOC_Y(map)
Y coordinate of the minimum value in a single-channel map or map stack.
value = CV.MINLOC_Y(map)CV.MINVAL(media)
Minimum sample value across all pixels, channels, and frames.
value = CV.MINVAL(media)CV.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.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.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.NORM(media)
Global L2 norm across all pixels, channels, and frames.
value = CV.NORM(media)CV.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.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.OTSU src AS dst
Computes an automatic Otsu threshold on the grayscale source.
CV.OTSU src AS dstCV.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.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.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.PERIMETER(mask)
Total contour perimeter of a binary mask across all frames.
value = CV.PERIMETER(mask)CV.PIXEL(media, x, y [, channel [, frame]])
Returns one pixel sample as a number. Channel and frame default to zero.
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. |
v = CV.PIXEL(img, 120, 80)
vb = CV.PIXEL(colorImg, 120, 80, 0)CV.PIXEL_ARRAY(media, x, y [, frame])
Returns all channel samples of one pixel as a numeric array. For color images the order follows OpenCV/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 |
|---|---|
frame | Zero-based frame index; some stack commands accept -1 for all frames. |
px = CV.PIXEL_ARRAY(colorImg, 120, 80)CV.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.PROFILE_ARRAY mode, image, coord [, channel]
Returns a horizontal or vertical intensity profile array from the first frame. Modes: H/ROW or V/COLUMN. Channel -1 means grayscale.
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. |
row = CV.PROFILE_ARRAY("H", img, 100)CV.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.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.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.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.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.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 redPixelCV.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.SHOWCV.SOBEL src AS dst
Computes the Sobel gradient frame-by-frame.
CV.SOBEL src AS dstCV.SPECTRUM_LOG_MAG spectrum [, normalize] AS logMagnitudeImage
Computes log(1+magnitude) from a complex spectrum, optionally normalized for display.
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 |
|---|---|
normalize | Optional parameter. If omitted, the command uses its internal default. |
CV.SPECTRUM_LOG_MAG centered, TRUE AS view
GUI.SHOW view, "log spectrum"CV.SPECTRUM_MAGNITUDE spectrum [, normalize] AS magImage
Computes magnitude from a complex spectrum. With normalize=TRUE the result is scaled to 0..255 for display.
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 |
|---|---|
normalize | Optional parameter. If omitted, the command uses its internal default. |
CV.SPECTRUM_MAGNITUDE spectrum [, normalize] AS magImageCV.SPECTRUM_PHASE spectrum [, normalize] AS phaseImage
Computes phase from a complex spectrum. Without normalization the result is in radians; normalized output is intended for GUI display.
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 |
|---|---|
normalize | Optional parameter. If omitted, the command uses its internal default. |
CV.SPECTRUM_PHASE spectrum [, normalize] AS phaseImageCV.SPECTRUM_POWER spectrum [, logScale [, normalize]] AS powerImage
Computes power re^2+im^2 from a complex spectrum, optionally applying log(1+x) and normalization for display.
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. |
normalize | Optional parameter. If omitted, the command uses its internal default. |
CV.SPECTRUM_POWER spectrum [, logScale [, normalize]] AS powerImageCV.SPLIT_COMPLEX complexImage AS realImage, imagImage
Splits a CV_32FC2/CV_64FC2 complex image into real and imaginary single-channel images.
CV.SPLIT_COMPLEX zimg AS re, imCV.STDDEV(media)
Standard deviation across all pixels, channels, and frames.
value = CV.STDDEV(media)CV.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.SUM(media)
Sum of all pixels, channels, and frames.
value = CV.SUM(media)CV.THRESHOLD src, CV.THRESHOLD AS dst
Applies a fixed threshold frame-by-frame.
CV.THRESHOLD src, CV.THRESHOLD AS dstCV.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.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.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.TYPE(value)
Returns NUMBER, BOOL, STRING, IMAGE, STACK, ARRAY or NULL.
value = CV.TYPE(value)CV.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.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.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.WIDTH(image)
Width of an image or stack.
value = CV.WIDTH(image)