CV namespace

OpenCV image processing, filtering, morphology, measurements and media operations.

Symbols in this namespace: 186

SymbolKindCategoryDescription
CV.ABSDIFFCommandImage arithmetic statementsComputes the absolute difference between two images or stacks.
CV.ADAPTIVE_THRESHOLDCommandThreshold and mask statementsApplies an adaptive threshold frame-by-frame.
CV.ADDCommandImage arithmetic statementsAdds two images or stacks. A single image can be broadcast across a stack.
CV.ADDSCommandImage arithmetic statementsAdds a scalar value to every pixel.
CV.ADJUST_COLORCommandAnalysis / flow statementsApplies brightness/contrast in BGR and hue/saturation in HSV; useful with GUI trackbars in live webcam demos.
CV.AREAFunctionShape and connected-component metricsCounts foreground pixels in a binary mask; non-zero means foreground.
CV.ASPECT_RATIOFunctionShape and connected-component metricsBounding-box width/height ratio of the largest contour.
CV.BBOX_HFunctionShape and connected-component metricsHeight of the largest contour bounding box.
CV.BBOX_WFunctionShape and connected-component metricsWidth of the largest contour bounding box.
CV.BBOX_XFunctionShape and connected-component metricsX coordinate of the largest contour bounding box.
CV.BBOX_YFunctionShape and connected-component metricsY coordinate of the largest contour bounding box.
CV.BG_SUBTRACTCommandAnalysis / flow statementsApplies MOG2 or KNN background subtraction to a video/stack and returns an 8-bit foreground-mask stack. method can be "MOG2" or "KNN".
CV.BILATERALCommandFiltering / enhancement statementsApplies bilateral edge-preserving smoothing frame-by-frame.
CV.BITANDCommandImage arithmetic statementsComputes 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.BITNOTCommandImage arithmetic statementsComputes the bitwise NOT of the source image or stack.
CV.BITORCommandImage arithmetic statementsComputes 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.BITXORCommandImage arithmetic statementsComputes 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.BLACKHATCommandMorphology statementsComputes the black-hat transform frame-by-frame with selectable kernel shape.
CV.BLURCommandFiltering / enhancement statementsApplies a simple blur frame-by-frame.
CV.CAMSHIFTCommandAnalysis / flow statementsTracks 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.CANNYCommandAnalysis / flow statementsRuns Canny edge detection frame-by-frame.
CV.CANVASCommandImage creation / conversion statementsCreates a new 8-bit canvas image with 1 to 4 channels and a constant background value.
CV.CC_COUNTFunctionShape and connected-component metricsCounts connected components in a binary mask; stacks are summed frame-by-frame.
CV.CC_LARGEST_AREAFunctionShape and connected-component metricsArea in pixels of the largest connected component found across the media object.
CV.CDF_ARRAYFunctionImage statisticsReturns a normalized cumulative distribution array from the image/stack histogram.
CV.CENTROID_XFunctionShape and connected-component metricsX coordinate of the largest contour centroid.
CV.CENTROID_YFunctionShape and connected-component metricsY coordinate of the largest contour centroid.
CV.CHANNELCommandImage creation / conversion statementsExtracts one channel as a single-channel image or stack.
CV.CHANNELSFunctionImage / stack informationNumber of channels in the image or stack frames.
CV.CIRCLE_MASKCommandThreshold and mask statementsCreates a single-channel circular mask.
CV.CIRCULARITYFunctionShape and connected-component metricsCircularity of the largest contour, computed as 4*pi*area / perimeter^2.
CV.CLAHECommandFiltering / enhancement statementsApplies contrast-limited adaptive histogram equalization. On color images it works on the L channel in Lab.
CV.CLONECommandImage creation / conversion statementsDuplicates the image or stack object.
CV.COLORCommandImage creation / conversion statementsConverts between common color spaces such as BGR, HSV, Lab, and gray.
CV.COMPARECommandThreshold and mask statementsCreates a mask by comparing pixels with a scalar value. Operators: >, >=, <, <=, ==, !=.
CV.COMPLEX_CONJCommandComplex image statementsComputes the complex conjugate of a complex image by negating the imaginary channel.
CV.COMPLEX_MAGNITUDECommandComplex image statementsComputes per-pixel magnitude sqrt(re^2 + im^2) from a complex image.
CV.COMPLEX_PHASECommandComplex image statementsComputes per-pixel phase angle atan2(im,re), in radians, from a complex image.
CV.CONNECTED_COMPONENTSCommandAnalysis / flow statementsLabels foreground connected components in a binary mask derived from non-zero pixels.
CV.CONTOUR_COUNTFunctionShape and connected-component metricsCounts external contours in a binary mask; stacks are summed frame-by-frame.
CV.CONTOUR_POINTSFunctionShape and connected-component metricsReturns 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.CONTOURSCommandAnalysis / flow statementsExtracts 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.CONVERTCommandImage creation / conversion statementsConverts OpenCV depth with optional scale and offset. Depth tokens include 8U, 16U, 32F, 64F and SAME.
CV.CORNER_SUBPIXCommandAnalysis / flow statementsRefines an Nx2 or Nx>=2 point array with OpenCV cornerSubPix and returns a refined Nx2 array.
CV.COUNT_NONZEROFunctionImage statisticsCompatibility alias for COUNT_NONZERO / MASK.COUNT.
CV.CROPCommandGeometry / remap statementsCrops a ROI from the image or from all frames in the stack.
CV.CROP_RECTCommandGeometry / remap statementsCrops 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_IMAGEFunctionDesktop / GUI capture functionsReturns 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_OBJECTSCommandAnalysis / flow statementsRuns 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_COMPLEXCommandFrequency / spectral statementsComputes a complex 2D DFT. A real single-channel input becomes CV_32FC2; a complex two-channel input is transformed as complex data.
CV.DFT_MAGNITUDECommandFrequency / spectral statementsComputes a centered 2D DFT magnitude map from the grayscale source, normalized to 0..255 as 32F.
CV.DFT_SHIFTCommandFrequency / spectral statementsCircularly shifts a real or complex spectrum so the DC component is at the image center. Dimensions are preserved, including odd sizes.
CV.DILATECommandMorphology statementsApplies morphological dilation frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations.
CV.DISTANCECommandMorphology statementsComputes the distance transform of a binary mask derived from non-zero pixels.
CV.DISTANCE_TRANSFORMCommandMorphology statementsComputes 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.DIVCommandImage arithmetic statementsPerforms pixel-wise division between two images or stacks.
CV.DIVSCommandImage arithmetic statementsDivides every pixel/channel of an image or stack by a non-zero scalar. This is clearer than CV.MULS src, 1/scalar.
CV.DRAW_BBOXCommandDrawing statementsDraws the bounding box of the largest mask contour over the source image or stack.
CV.DRAW_CONTOURSCommandDrawing statementsDraws external contours extracted from a binary mask over the source image or stack.
CV.DRAW_FLOW_ARROWSCommandAnalysis / flow statementsDraws 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_MATCHESCommandAnalysis / flow statementsMatches 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_DATACommandAnalysis / flow statementsDraws matches from a numeric matches/inliers array, useful after CV.FIND_HOMOGRAPHY RANSAC filtering.
CV.EDGESCommandAnalysis / flow statementsComputes an edge map frame-by-frame.
CV.EQUALIZECommandFiltering / enhancement statementsEqualizes the histogram frame-by-frame.
CV.ERODECommandMorphology statementsApplies morphological erosion frame-by-frame. shape can be ELLIPSE, RECT, or CROSS. The old numeric third parameter is still accepted as iterations.
CV.EXTENTFunctionShape and connected-component metricsLargest contour area divided by its bounding-rectangle area.
CV.FARNEBACKCommandAnalysis / flow statementsComputes 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_HOLESCommandThreshold and mask statementsFills internal holes of a binary mask derived from non-zero pixels.
CV.FILTER2DCommandFiltering / enhancement statementsApplies a custom 2D convolution kernel. Kernel rows are separated by semicolons; values by spaces or commas.
CV.FIND_HOMOGRAPHYCommandAnalysis / flow statementsEstimates 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.FLIPCommandGeometry / remap statementsFlips 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_COLORCommandAnalysis / flow statementsConverts a 2-channel CV.FARNEBACK FLOW map to a BGR color visualization: hue is direction and brightness is motion magnitude.
CV.FPSFunctionImage / stack informationFPS associated with the video stack.
CV.FRAMEFunctionImage / stack informationExtracts a stack frame as a single image.
CV.FRAMESFunctionImage / stack informationNumber of frames in the stack, or 1 for a single image.
CV.FREQ_BAND_PASSCommandFrequency / spectral statementsKeeps a centered annular frequency band and rejects frequencies outside the selected radii.
CV.FREQ_GAUSSIAN_HIGH_PASSCommandFrequency / spectral statementsApplies a smooth Gaussian high-pass mask to a centered complex spectrum.
CV.FREQ_GAUSSIAN_LOW_PASSCommandFrequency / spectral statementsApplies a smooth Gaussian low-pass mask to a centered complex spectrum.
CV.FREQ_HIGH_PASSCommandFrequency / spectral statementsApplies an ideal circular high-pass mask to a centered complex spectrum.
CV.FREQ_LOW_PASSCommandFrequency / spectral statementsApplies an ideal circular low-pass mask to a centered complex spectrum.
CV.FREQ_NOTCHCommandFrequency / spectral statementsSuppresses a circular notch at the offset from the centered DC component. mirror=TRUE also suppresses the symmetric notch.
CV.GAMMACommandFiltering / enhancement statementsApplies gamma correction frame-by-frame.
CV.GAUSSIANCommandFiltering / enhancement statementsApplies a Gaussian blur frame-by-frame.
CV.GOOD_FEATURESCommandAnalysis / flow statementsDraws Shi-Tomasi goodFeaturesToTrack points over an 8-bit BGR diagnostic image.
CV.GOOD_FEATURES_POINTSCommandAnalysis / flow statementsReturns Shi-Tomasi corner coordinates as an Nx2 numeric array: x,y. This is the data-producing companion of CV.GOOD_FEATURES.
CV.GRAYCommandImage creation / conversion statementsConverts to grayscale; on stacks it operates frame-by-frame.
CV.HARRISCommandAnalysis / flow statementsComputes a normalized Harris corner response map.
CV.HEIGHTFunctionImage / stack informationHeight of an image or stack.
CV.HIST_ARRAYFunctionImage statisticsReturns a numeric array with histogram bin counts. If min/max are omitted, the range is detected from the media.
CV.HIST_BACKPROJECTCommandAnalysis / flow statementsBuilds 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_PEOPLECommandAnalysis / flow statementsRuns 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_CIRCLESCommandAnalysis / flow statementsDetects circular structures with HoughCircles and draws the result over a diagnostic image.
CV.HOUGH_LINESCommandAnalysis / flow statementsDetects Hough lines from a Canny edge map and draws them over a diagnostic image.
CV.IDFT_COMPLEXCommandFrequency / spectral statementsComputes the inverse complex DFT with scaling. The output remains a complex image; split it to inspect real and imaginary residuals.
CV.IDFT_SHIFTCommandFrequency / spectral statementsInverse circular shift for a spectrum previously centered with CV.DFT_SHIFT.
CV.INPAINTCommandFiltering / enhancement statementsFills/restores masked pixels using OpenCV inpainting. method can be TELEA or NS; the source must be 8-bit single-channel or BGR.
CV.INRANGECommandThreshold and mask statementsSegments pixels whose values fall inside a scalar range; the range is applied to all channels.
CV.INRANGE_COLORCommandThreshold and mask statementsCreates a 3-channel scalar range mask, useful after HSV/Lab conversion.
CV.INVERTCommandImage creation / conversion statementsInverts pixel intensity; on stacks it operates frame-by-frame.
CV.IS_EMPTYFunctionImage / stack informationReturns TRUE for NULL, empty media, invalid arrays or empty strings.
CV.IS_IMAGEFunctionImage / stack informationReturns TRUE when value is a non-empty single image object.
CV.IS_STACKFunctionImage / stack informationReturns TRUE when value is a non-empty stack object. Non-media values simply return FALSE.
CV.IS_VALIDFunctionImage / stack informationReturns TRUE when value is a non-empty image or stack object. Useful after IO.TRY_LOAD.
CV.KEEP_LARGESTCommandThreshold and mask statementsKeeps only the largest connected foreground component of a binary mask.
CV.KMEANSCommandAnalysis / flow statementsQuantizes an image or each frame of a stack with k-means clustering in channel space.
CV.KMEANS_CENTERSCommandAnalysis / flow statementsReturns 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_COLORCommandAnalysis / flow statementsConverts a label image, or a binary mask converted to connected components, into a deterministic color visualization.
CV.LAPLACIANCommandAnalysis / flow statementsComputes the Laplacian frame-by-frame.
CV.LARGEST_CONTOUR_AREAFunctionShape and connected-component metricsArea in pixels of the largest external contour found across the media object.
CV.LARGEST_CONTOUR_PERIMETERFunctionShape and connected-component metricsPerimeter of the largest external contour found across the media object.
CV.LINE_PROFILE_ARRAYFunctionImage statisticsReturns a bilinear sampled line profile array from the first frame. Channel -1 means grayscale.
CV.MATCH_ORBCommandAnalysis / flow statementsMatches two ORB descriptor matrices with Hamming distance and cross-check. Output columns are queryIdx, trainIdx, distance, matchRank.
CV.MATCH_TEMPLATECommandAnalysis / flow statementsComputes an OpenCV template-matching response map. Source/template pairs may be broadcast across stacks.
CV.MAXIMUMCommandImage arithmetic statementsComputes the per-pixel maximum of two images or stacks.
CV.MAXLOC_FRAMEFunctionLocation functionsFrame index where the maximum value is located.
CV.MAXLOC_VALUEFunctionLocation functionsMaximum value in a single-channel map or map stack.
CV.MAXLOC_XFunctionLocation functionsX coordinate of the maximum value in a single-channel map or map stack.
CV.MAXLOC_YFunctionLocation functionsY coordinate of the maximum value in a single-channel map or map stack.
CV.MAXVALFunctionImage statisticsMaximum sample value across all pixels, channels, and frames.
CV.MEANFunctionImage statisticsMean value across all pixels, channels, and frames.
CV.MEAN_MASKFunctionImage statisticsMasked mean of a media object using a binary mask or mask stack.
CV.MEANSHIFTCommandAnalysis / flow statementsTracks 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.MEDIANCommandFiltering / enhancement statementsApplies a median filter frame-by-frame.
CV.MERGECommandImage creation / conversion statementsMerges one to four single-channel images/stacks into a multi-channel result.
CV.MERGE_COMPLEXCommandComplex image statementsMerges two same-size single-channel images into a CV_32FC2 complex image: channel 0 is real, channel 1 is imaginary.
CV.MINIMUMCommandImage arithmetic statementsComputes the per-pixel minimum of two images or stacks.
CV.MINLOC_FRAMEFunctionLocation functionsFrame index where the minimum value is located.
CV.MINLOC_VALUEFunctionLocation functionsMinimum value in a single-channel map or map stack.
CV.MINLOC_XFunctionLocation functionsX coordinate of the minimum value in a single-channel map or map stack.
CV.MINLOC_YFunctionLocation functionsY coordinate of the minimum value in a single-channel map or map stack.
CV.MINVALFunctionImage statisticsMinimum sample value across all pixels, channels, and frames.
CV.MORPH_CLOSECommandMorphology statementsApplies morphological closing frame-by-frame with selectable kernel shape.
CV.MORPH_EXCommandMorphology statementsApplies a selectable morphological operation. operation: OPEN, CLOSE, GRADIENT, TOPHAT, BLACKHAT, ERODE, DILATE. kernelType: ELLIPSE, RECT, CROSS.
CV.MORPH_GRADIENTCommandMorphology statementsComputes a morphological gradient frame-by-frame with selectable kernel shape.
CV.MORPH_OPENCommandMorphology statementsApplies morphological opening frame-by-frame with selectable kernel shape.
CV.MULCommandImage arithmetic statementsPerforms pixel-wise multiplication between two images or stacks.
CV.MULSCommandImage arithmetic statementsMultiplies every pixel by a scalar value.
CV.NLMEANSCommandFiltering / enhancement statementsApplies OpenCV fast non-local means denoising. Output is 8-bit grayscale/BGR.
CV.NORMFunctionImage statisticsGlobal L2 norm across all pixels, channels, and frames.
CV.NORMALIZECommandImage arithmetic statementsNormalizes the source range into a target range using OpenCV NORM_MINMAX.
CV.ORB_DETECTCommandAnalysis / flow statementsDetects 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.OTSUCommandThreshold and mask statementsComputes an automatic Otsu threshold on the grayscale source.
CV.PADCommandGeometry / remap statementsAdds a constant border around an image or every stack frame.
CV.PALETTECommandOther image / stack statementsApplies 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.PASTECommandGeometry / remap statementsPastes 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_RECTCommandGeometry / remap statementsPastes 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.PERIMETERFunctionShape and connected-component metricsTotal contour perimeter of a binary mask across all frames.
CV.PIXELFunctionImage / stack informationReturns one pixel sample as a number. Channel and frame default to zero.
CV.PIXEL_ARRAYFunctionImage statisticsReturns all channel samples of one pixel as a numeric array. For color images the order follows OpenCV/BGR.
CV.POWER_SPECTRUMCommandFrequency / spectral statementsComputes a centered power spectrum map from the grayscale source, normalized to 0..255 as 32F.
CV.PROFILE_ARRAYFunctionImage statisticsReturns a horizontal or vertical intensity profile array from the first frame. Modes: H/ROW or V/COLUMN. Channel -1 means grayscale.
CV.QR_DETECTCommandAnalysis / flow statementsDetects 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_MASKCommandThreshold and mask statementsCreates a single-channel rectangular mask. Legacy command equivalent to MASK.RECT with explicit coordinates.
CV.REMAPCommandGeometry / remap statementsWarps 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.RESIZECommandGeometry / remap statementsResizes the image or all frames in the stack.
CV.ROTATECommandGeometry / remap statementsRotates around the image center using affine interpolation and a constant border value.
CV.ROTATE90CommandGeometry / remap statementsRotates by exact right angles without interpolation. Codes: 90/CW, 180, 270/CCW.
CV.SCALE_ABSCommandImage creation / conversion statementsApplies OpenCV convertScaleAbs, useful for visualizing gradients and signed/float maps.
CV.SCHARRCommandAnalysis / flow statementsComputes Scharr gradients. Without dx/dy it returns a combined gradient image.
CV.SET_PIXELCommandPixel access statementsReturns a copy where one pixel sample has been written. channel=-1 writes all channels; frame=-1 writes all frames.
CV.SET_PIXEL3CommandPixel access statementsReturns a copy where channels 0..2 of one pixel have been written. OpenCV color order is B,G,R.
CV.SET_PIXEL4CommandPixel access statementsReturns a copy where channels 0..3 of one pixel have been written. OpenCV color order is B,G,R,A.
CV.SHOWCommandOther image / stack statementsCompatibility alias of SHOW.
CV.SOBELCommandAnalysis / flow statementsComputes the Sobel gradient frame-by-frame.
CV.SPECTRUM_LOG_MAGCommandFrequency / spectral statementsComputes log(1+magnitude) from a complex spectrum, optionally normalized for display.
CV.SPECTRUM_MAGNITUDECommandFrequency / spectral statementsComputes magnitude from a complex spectrum. With normalize=TRUE the result is scaled to 0..255 for display.
CV.SPECTRUM_PHASECommandFrequency / spectral statementsComputes phase from a complex spectrum. Without normalization the result is in radians; normalized output is intended for GUI display.
CV.SPECTRUM_POWERCommandFrequency / spectral statementsComputes power re^2+im^2 from a complex spectrum, optionally applying log(1+x) and normalization for display.
CV.SPLIT_COMPLEXCommandComplex image statementsSplits a CV_32FC2/CV_64FC2 complex image into real and imaginary single-channel images.
CV.STDDEVFunctionImage statisticsStandard deviation across all pixels, channels, and frames.
CV.SUBCommandImage arithmetic statementsStarts a named subroutine block. The block is skipped during normal flow and executed only by CALL.
CV.SUBSCommandImage arithmetic statementsSubtracts a scalar from every pixel/channel of an image or stack. This is clearer than CV.ADDS src, -scalar.
CV.SUMFunctionImage statisticsSum of all pixels, channels, and frames.
CV.THRESHOLDCommandThreshold and mask statementsApplies a fixed threshold frame-by-frame.
CV.TO32FCommandImage creation / conversion statementsConverts to 32-bit float using optional scale and offset.
CV.TO8UCommandImage creation / conversion statementsConverts to 8-bit unsigned using optional alpha and beta.
CV.TOPHATCommandMorphology statementsComputes the top-hat transform frame-by-frame with selectable kernel shape.
CV.TRANSLATECommandGeometry / remap statementsTranslates image content by dx,dy pixels using a constant border value.
CV.TYPEFunctionImage / stack informationReturns NUMBER, BOOL, STRING, IMAGE, STACK, ARRAY or NULL.
CV.UNSHARPCommandFiltering / enhancement statementsApplies unsharp masking using a Gaussian blur and weighted recombination.
CV.WARP_AFFINECommandGeometry / remap statementsApplies a 2x3 affine transform matrix with optional output size and constant border value.
CV.WARP_HOMOGRAPHYCommandGeometry / remap statementsApplies 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_PERSPECTIVECommandGeometry / remap statementsApplies a 3x3 homography/perspective transform matrix with optional output size and constant border value. On stacks it operates frame-by-frame.
CV.WATERSHEDCommandThreshold and mask statementsRuns 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_AUTOCommandThreshold and mask statementsAutomatically 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.WIDTHFunctionImage / stack informationWidth of an image or stack.

CV.ABSDIFF

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.ABSDIFF left, right AS dst

Computes the absolute difference between two images or stacks.

Minimal example

CV.ABSDIFF left, right AS dst

CV.ADAPTIVE_THRESHOLD

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.ADAPTIVE_THRESHOLD src [, blockSize [, c]] AS dst

Applies an adaptive threshold frame-by-frame.

Optional parameters

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

ParameterMeaning
blockSizeLocal analysis window size used by the algorithm.
cOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.ADAPTIVE_THRESHOLD src [, blockSize [, c]] AS dst

CV.ADD

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.ADD left, right AS dst

Adds two images or stacks. A single image can be broadcast across a stack.

Minimal example

CV.ADD left, right AS dst

CV.ADDS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.ADDS src, scalar AS dst

Adds a scalar value to every pixel.

Minimal example

CV.ADDS src, scalar AS dst

CV.ADJUST_COLOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Minimal example

CV.ADJUST_COLOR frame, brightness, contrast, hue, saturation AS tuned

CV.AREA

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.AREA(mask)

Counts foreground pixels in a binary mask; non-zero means foreground.

Minimal example

value = CV.AREA(mask)

CV.ASPECT_RATIO

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.ASPECT_RATIO(mask)

Bounding-box width/height ratio of the largest contour.

Minimal example

value = CV.ASPECT_RATIO(mask)

CV.BBOX_H

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.BBOX_H(mask)

Height of the largest contour bounding box.

Minimal example

h = CV.BBOX_H(mask)

CV.BBOX_W

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.BBOX_W(mask)

Width of the largest contour bounding box.

Minimal example

w = CV.BBOX_W(mask)

CV.BBOX_X

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.BBOX_X(mask)

X coordinate of the largest contour bounding box.

Minimal example

x = CV.BBOX_X(mask)

CV.BBOX_Y

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.BBOX_Y(mask)

Y coordinate of the largest contour bounding box.

Minimal example

y = CV.BBOX_Y(mask)

CV.BG_SUBTRACT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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".

Optional parameters

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

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

Minimal example

IO.LOAD "input.avi" AS st
CV.BG_SUBTRACT st, "MOG2", 80, 16 AS fg

CV.BILATERAL

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.BILATERAL src [, d [, sigmaColor [, sigmaSpace]]] AS dst

Applies bilateral edge-preserving smoothing frame-by-frame.

Optional parameters

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

ParameterMeaning
dBilateral filter neighborhood diameter.
sigmaColorBilateral filter sigma in color/intensity space.
sigmaSpaceBilateral filter sigma in coordinate space.

Minimal example

CV.BILATERAL img, 9, 75, 75 AS den

CV.BITAND

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.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.

Minimal example

CV.BITAND left, right AS dst

CV.BITNOT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.BITNOT src AS dst

Computes the bitwise NOT of the source image or stack.

Minimal example

CV.BITNOT src AS dst

CV.BITOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.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.

Minimal example

CV.BITOR left, right AS dst

CV.BITXOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.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.

Minimal example

CV.BITXOR left, right AS dst

CV.BLACKHAT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.BLACKHAT src [, radius [, shape [, iterations]]] AS dst

Computes the black-hat transform frame-by-frame with selectable kernel shape.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.BLACKHAT gray, 4, RECT, 1 AS blackhatMap

CV.BLUR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.BLUR src [, radius] AS dst

Applies a simple blur frame-by-frame.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.

Minimal example

CV.BLUR src [, radius] AS dst

CV.CAMSHIFT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
hBinsOptional parameter. If omitted, the command uses its internal default.
sBinsOptional parameter. If omitted, the command uses its internal default.
maxIterOptional parameter. If omitted, the command uses its internal default.
epsilonOptional parameter. If omitted, the command uses its internal default.
previewOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.CAMSHIFT st, rect, 30, 32, 20, 1.0 AS rects, preview

CV.CANNY

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.CANNY src, low, high AS dst

Runs Canny edge detection frame-by-frame.

Minimal example

CV.CANNY src, low, high AS dst

CV.CANVAS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.CANVAS width, height [, channels [, background]] AS dst

Creates a new 8-bit canvas image with 1 to 4 channels and a constant background value.

Optional parameters

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

ParameterMeaning
channelsNumber of channels to create or process.
backgroundInitial canvas background value.

Minimal example

CV.CANVAS width, height [, channels [, background]] AS dst

CV.CC_COUNT

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CC_COUNT(mask)

Counts connected components in a binary mask; stacks are summed frame-by-frame.

Minimal example

value = CV.CC_COUNT(mask)

CV.CC_LARGEST_AREA

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CC_LARGEST_AREA(mask)

Area in pixels of the largest connected component found across the media object.

Minimal example

value = CV.CC_LARGEST_AREA(mask)

CV.CDF_ARRAY

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.CDF_ARRAY(media [, bins [, channel [, minValue [, maxValue]]]])

Returns a normalized cumulative distribution array from the image/stack histogram.

Optional parameters

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

ParameterMeaning
binsNumber of histogram bins.
channelZero-based channel index; some commands accept -1 for grayscale/all channels.
minValueLower numeric range limit.
maxValueUpper numeric range limit.

Minimal example

cdf = CV.CDF_ARRAY(img, 256)

CV.CENTROID_X

FUNCTIONCVBATCH-FRIENDLYIMAGEROI
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CENTROID_X(mask)

X coordinate of the largest contour centroid.

Minimal example

cx = CV.CENTROID_X(mask)

CV.CENTROID_Y

FUNCTIONCVBATCH-FRIENDLYIMAGEROI
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CENTROID_Y(mask)

Y coordinate of the largest contour centroid.

Minimal example

cy = CV.CENTROID_Y(mask)

CV.CHANNEL

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.CHANNEL src, index AS dst

Extracts one channel as a single-channel image or stack.

Minimal example

CV.CHANNEL src, index AS dst

CV.CHANNELS

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.CHANNELS(image)

Number of channels in the image or stack frames.

Minimal example

value = CV.CHANNELS(image)

CV.CIRCLE_MASK

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.CIRCLE_MASK width, height, cx, cy, radius [, value] AS dst

Creates a single-channel circular mask.

Optional parameters

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

ParameterMeaning
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.CIRCLE_MASK 80, 60, 40, 30, 12 AS mask

CV.CIRCULARITY

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CIRCULARITY(mask)

Circularity of the largest contour, computed as 4*pi*area / perimeter^2.

Minimal example

value = CV.CIRCULARITY(mask)

CV.CLAHE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.CLAHE src [, clipLimit [, tiles]] AS dst

Applies contrast-limited adaptive histogram equalization. On color images it works on the L channel in Lab.

Optional parameters

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

ParameterMeaning
clipLimitCLAHE contrast clipping limit.
tilesCLAHE tile grid size; one value creates a square grid.

Minimal example

CV.CLAHE src [, clipLimit [, tiles]] AS dst

CV.CLONE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.CLONE src AS dst

Duplicates the image or stack object.

Minimal example

CV.CLONE src AS dst

CV.COLOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.COLOR src, mode AS dst

Converts between common color spaces such as BGR, HSV, Lab, and gray.

Minimal example

CV.COLOR src, mode AS dst

CV.COMPARE

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.COMPARE src, op, value AS dst

Creates a mask by comparing pixels with a scalar value. Operators: >, >=, <, <=, ==, !=.

Minimal example

CV.COMPARE img, ">", 128 AS mask

CV.COMPLEX_CONJ

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Complex image statements   Namespace: CV

CV.COMPLEX_CONJ complexImage AS dst

Computes the complex conjugate of a complex image by negating the imaginary channel.

Minimal example

CV.COMPLEX_CONJ complexImage AS dst

CV.COMPLEX_MAGNITUDE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Complex image statements   Namespace: CV

CV.COMPLEX_MAGNITUDE complexImage AS magnitudeImage

Computes per-pixel magnitude sqrt(re^2 + im^2) from a complex image.

Minimal example

CV.COMPLEX_MAGNITUDE complexImage AS magnitudeImage

CV.COMPLEX_PHASE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Complex image statements   Namespace: CV

CV.COMPLEX_PHASE complexImage AS phaseImage

Computes per-pixel phase angle atan2(im,re), in radians, from a complex image.

Minimal example

CV.COMPLEX_PHASE complexImage AS phaseImage

CV.CONNECTED_COMPONENTS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.CONNECTED_COMPONENTS src [, connectivity] AS dst

Labels foreground connected components in a binary mask derived from non-zero pixels.

Optional parameters

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

ParameterMeaning
connectivityConnected-component connectivity, normally 4 or 8.

Minimal example

CV.CONNECTED_COMPONENTS src [, connectivity] AS dst

CV.CONTOUR_COUNT

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.CONTOUR_COUNT(mask)

Counts external contours in a binary mask; stacks are summed frame-by-frame.

Minimal example

value = CV.CONTOUR_COUNT(mask)

CV.CONTOUR_POINTS

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

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.

Optional parameters

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

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

Minimal example

pts = CV.CONTOUR_POINTS(mask)
PRINT ARRAY.DIMSIZE(pts, 0), pts(0,0), pts(0,1)

CV.CONTOURS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.
approxOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.CONTOURS mask, EXTERNAL, SIMPLE AS contourPts, contourInfo
PRINT ARRAY.DIMSIZE(contourInfo, 0)

CV.CONVERT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
alphaMultiplicative scale factor.
betaAdditive offset after scaling.

Minimal example

CV.CONVERT img, "32F", 1.0 / 255.0 AS f

CV.CORNER_SUBPIX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
winSizeOptical-flow averaging window size; larger values are smoother and less local.
maxIterOptional parameter. If omitted, the command uses its internal default.
epsilonOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.GOOD_FEATURES_POINTS img, 80, 0.01, 10 AS pts
CV.CORNER_SUBPIX img, pts, 5, 40, 0.001 AS refined

CV.COUNT_NONZERO

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.COUNT_NONZERO(mask)

Compatibility alias for COUNT_NONZERO / MASK.COUNT.

Minimal example

n = CV.COUNT_NONZERO(mask)

CV.CROP

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.CROP src, x, y, w, h AS dst

Crops a ROI from the image or from all frames in the stack.

Minimal example

CV.CROP src, x, y, w, h AS dst

CV.CROP_RECT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Minimal example

r = RECT.CREATE(10, 20, 30, 40)
CV.CROP_RECT img, r AS patch

CV.DESKTOP_IMAGE

FUNCTIONCVGUI / INTERACTIVEIMAGE
Kind: Function   Category: Desktop / GUI capture functions   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

value = CV.DESKTOP_IMAGE([windowTitle])

CV.DETECT_OBJECTS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
scaleFactorOptional parameter. If omitted, the command uses its internal default.
minNeighborsOptional parameter. If omitted, the command uses its internal default.
minSizeWOptional parameter. If omitted, the command uses its internal default.
minSizeHOptional parameter. If omitted, the command uses its internal default.
previewOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.DETECT_OBJECTS img, "haarcascade_frontalface_default.xml", 1.1, 4 AS faces, preview

CV.DFT_COMPLEX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Minimal example

CV.DFT_COMPLEX src AS spec

CV.DFT_MAGNITUDE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.DFT_MAGNITUDE src [, logScale] AS dst

Computes a centered 2D DFT magnitude map from the grayscale source, normalized to 0..255 as 32F.

Optional parameters

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

ParameterMeaning
logScaleWhen true, applies logarithmic visualization scaling to spectral magnitude/power.

Minimal example

CV.DFT_MAGNITUDE img, TRUE AS spec

CV.DFT_SHIFT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Minimal example

CV.DFT_SHIFT spectrum AS centered

CV.DILATE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.DILATE mask, 2, CROSS, 1 AS dilated

CV.DISTANCE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.DISTANCE src [, distanceType [, maskSize]] AS dst

Computes the distance transform of a binary mask derived from non-zero pixels.

Optional parameters

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

ParameterMeaning
distanceTypeDistance-transform metric selector.
maskSizeDistance-transform mask size.

Minimal example

CV.DISTANCE src [, distanceType [, maskSize]] AS dst

CV.DISTANCE_TRANSFORM

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
distanceTypeDistance-transform metric selector.
maskSizeDistance-transform mask size.
normalizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.DISTANCE_TRANSFORM mask, L2, 5, TRUE AS distMap

CV.DIV

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.DIV left, right AS dst

Performs pixel-wise division between two images or stacks.

Minimal example

CV.DIV left, right AS dst

CV.DIVS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.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.

Minimal example

CV.DIVS img, 2.0 AS half

CV.DRAW_BBOX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Drawing statements   Namespace: CV

CV.DRAW_BBOX src, mask [, value [, thickness]] AS dst

Draws the bounding box of the largest mask contour over the source image or stack.

Optional parameters

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

ParameterMeaning
valueScalar value written, drawn, or used as foreground/background according to the command.
thicknessOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.DRAW_BBOX img, mask, 255, 2 AS boxed

CV.DRAW_CONTOURS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Drawing statements   Namespace: CV

CV.DRAW_CONTOURS src, mask [, value [, thickness]] AS dst

Draws external contours extracted from a binary mask over the source image or stack.

Optional parameters

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

ParameterMeaning
valueScalar value written, drawn, or used as foreground/background according to the command.
thicknessOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.DRAW_CONTOURS img, mask, 255, 1 AS overlay

CV.DRAW_FLOW_ARROWS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
stepOptional parameter. If omitted, the command uses its internal default.
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
minMagOptional parameter. If omitted, the command uses its internal default.
bOptional parameter. If omitted, the command uses its internal default.
gOptional parameter. If omitted, the command uses its internal default.
rOptional parameter. If omitted, the command uses its internal default.
thicknessOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.DRAW_FLOW_ARROWS frame, flow, 24, 4.0, 0.6, 0, 255, 255, 1 AS arrows

CV.DRAW_MATCHES

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.DRAW_MATCHES imgA, kpA, imgB, kpB, descA, descB, 64 AS matchesPreview

CV.DRAW_MATCHES_DATA

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.DRAW_MATCHES_DATA imgA, kpA, imgB, kpB, inliers, 100 AS inlierPreview

CV.EDGES

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.EDGES src AS dst

Computes an edge map frame-by-frame.

Minimal example

CV.EDGES src AS dst

CV.EQUALIZE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.EQUALIZE src AS dst

Equalizes the histogram frame-by-frame.

Minimal example

CV.EQUALIZE src AS dst

CV.ERODE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.ERODE mask, 2, RECT, 1 AS eroded

CV.EXTENT

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.EXTENT(mask)

Largest contour area divided by its bounding-rectangle area.

Minimal example

value = CV.EXTENT(mask)

CV.FARNEBACK

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.
pyrScaleFarneback pyramid scale between image levels.
levelsNumber of pyramid levels used by the optical-flow algorithm.
winsizeOptical-flow averaging window size; larger values are smoother and less local.
iterationsNumber of repeated passes applied by the operation.
polyNFarneback polynomial neighborhood size.
polySigmaFarneback Gaussian smoothing sigma for polynomial expansion.

Minimal example

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

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.FILL_HOLES mask AS dst

Fills internal holes of a binary mask derived from non-zero pixels.

Minimal example

CV.FILL_HOLES mask AS filled

CV.FILTER2D

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.FILTER2D src, kernelText [, scale [, delta]] AS dst

Applies a custom 2D convolution kernel. Kernel rows are separated by semicolons; values by spaces or commas.

Optional parameters

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

ParameterMeaning
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
deltaOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.FILTER2D img, "0 -1 0; -1 5 -1; 0 -1 0" AS sharp

CV.FIND_HOMOGRAPHY

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

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

Minimal example

CV.FIND_HOMOGRAPHY kpA, kpB, matches, 3.0 AS H, inliers

CV.FLIP

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Minimal example

CV.FLIP img, "H" AS flipped

CV.FLOW_COLOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.FARNEBACK prevGray, gray, "FLOW" AS flow
CV.FLOW_COLOR flow AS flowColor

CV.FPS

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.FPS(image)

FPS associated with the video stack.

Minimal example

value = CV.FPS(image)

CV.FRAME

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.FRAME(stack,index)

Extracts a stack frame as a single image.

Minimal example

value = CV.FRAME(stack,index)

CV.FRAMES

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.FRAMES(image)

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

Minimal example

value = CV.FRAMES(image)

CV.FREQ_BAND_PASS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.FREQ_BAND_PASS centeredSpectrum, innerRadius, outerRadius AS filteredSpectrum

Keeps a centered annular frequency band and rejects frequencies outside the selected radii.

Minimal example

CV.FREQ_BAND_PASS centeredSpectrum, innerRadius, outerRadius AS filteredSpectrum

CV.FREQ_GAUSSIAN_HIGH_PASS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.FREQ_GAUSSIAN_HIGH_PASS centeredSpectrum, sigma AS filteredSpectrum

Applies a smooth Gaussian high-pass mask to a centered complex spectrum.

Minimal example

CV.FREQ_GAUSSIAN_HIGH_PASS centeredSpectrum, sigma AS filteredSpectrum

CV.FREQ_GAUSSIAN_LOW_PASS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.FREQ_GAUSSIAN_LOW_PASS centeredSpectrum, sigma AS filteredSpectrum

Applies a smooth Gaussian low-pass mask to a centered complex spectrum.

Minimal example

CV.FREQ_GAUSSIAN_LOW_PASS centeredSpectrum, sigma AS filteredSpectrum

CV.FREQ_HIGH_PASS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.FREQ_HIGH_PASS centeredSpectrum, radius AS filteredSpectrum

Applies an ideal circular high-pass mask to a centered complex spectrum.

Minimal example

CV.FREQ_HIGH_PASS centeredSpectrum, radius AS filteredSpectrum

CV.FREQ_LOW_PASS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.FREQ_LOW_PASS centeredSpectrum, radius AS filteredSpectrum

Applies an ideal circular low-pass mask to a centered complex spectrum.

Minimal example

CV.FREQ_LOW_PASS centeredSpectrum, radius AS filteredSpectrum

CV.FREQ_NOTCH

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.FREQ_NOTCH centeredSpectrum, offsetX, offsetY, radius [, mirror] AS filteredSpectrum

CV.GAMMA

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.GAMMA src, CV.GAMMA AS dst

Applies gamma correction frame-by-frame.

Minimal example

CV.GAMMA src, CV.GAMMA AS dst

CV.GAUSSIAN

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.GAUSSIAN src [, radius] AS dst

Applies a Gaussian blur frame-by-frame.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.

Minimal example

CV.GAUSSIAN src [, radius] AS dst

CV.GOOD_FEATURES

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.GOOD_FEATURES src [, maxCorners [, quality [, minDistance [, value]]]] AS dst

Draws Shi-Tomasi goodFeaturesToTrack points over an 8-bit BGR diagnostic image.

Optional parameters

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

ParameterMeaning
maxCornersMaximum number of features/corners to keep.
qualityRelative quality threshold used by feature selection.
minDistanceMinimum distance between accepted features.
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.GOOD_FEATURES img, 100, 0.01, 8 AS pts

CV.GOOD_FEATURES_POINTS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
maxCornersMaximum number of features/corners to keep.
qualityRelative quality threshold used by feature selection.
minDistanceMinimum distance between accepted features.

Minimal example

CV.GOOD_FEATURES_POINTS img, 100, 0.01, 10 AS pts

CV.GRAY

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.GRAY src AS dst

Converts to grayscale; on stacks it operates frame-by-frame.

Minimal example

CV.GRAY src AS dst

CV.HARRIS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.HARRIS src [, blockSize [, ksize [, k]]] AS dst

Computes a normalized Harris corner response map.

Optional parameters

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

ParameterMeaning
blockSizeLocal analysis window size used by the algorithm.
ksizeDerivative/kernel aperture size.
kAlgorithm coefficient, for example the Harris detector free parameter.

Minimal example

CV.HARRIS img, 2, 3, 0.04 AS corners

CV.HEIGHT

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.HEIGHT(image)

Height of an image or stack.

Minimal example

value = CV.HEIGHT(image)

CV.HIST_ARRAY

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
binsNumber of histogram bins.
channelZero-based channel index; some commands accept -1 for grayscale/all channels.
minValueLower numeric range limit.
maxValueUpper numeric range limit.

Minimal example

h = CV.HIST_ARRAY(img, 256)
p = DPLOT.CREATE("Histogram")
DPLOT.ADDY p, "gray", h

CV.HIST_BACKPROJECT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

rect = RECT.CREATE(70, 60, 80, 80)
CV.HIST_BACKPROJECT img, rect, 30, 32 AS prob
GUI.SHOW prob, "backprojection"

CV.HOG_DETECT_PEOPLE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
hitThresholdOptional parameter. If omitted, the command uses its internal default.
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
finalThresholdOptional parameter. If omitted, the command uses its internal default.
previewOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.HOG_DETECT_PEOPLE frame, 0.0, 1.05, 2.0 AS people, preview

CV.HOUGH_CIRCLES

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
dpInverse accumulator resolution ratio used by HoughCircles.
minDistMinimum distance between detected circle centers.
param1First algorithm-specific tuning parameter.
param2Second algorithm-specific tuning parameter.
minRadiusMinimum circle radius to detect.
maxRadiusMaximum circle radius to detect; zero may let OpenCV choose automatically.
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.HOUGH_CIRCLES img, 1.2, 20, 100, 30, 5, 80 AS circles

CV.HOUGH_LINES

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.HOUGH_LINES src [, rho [, thetaDeg [, threshold [, value]]]] AS dst

Detects Hough lines from a Canny edge map and draws them over a diagnostic image.

Optional parameters

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

ParameterMeaning
rhoHough-line distance resolution in pixels.
thetaDegHough-line angular resolution in degrees.
thresholdDetection or segmentation threshold used by the command.
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.HOUGH_LINES img, 1, 1, 50 AS lines

CV.IDFT_COMPLEX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Minimal example

CV.IDFT_COMPLEX spec AS recon
CV.SPLIT_COMPLEX recon AS real, imag

CV.IDFT_SHIFT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.IDFT_SHIFT centered AS spectrum

Inverse circular shift for a spectrum previously centered with CV.DFT_SHIFT.

Minimal example

CV.IDFT_SHIFT centered AS spectrum

CV.INPAINT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
methodOpenCV method selector accepted by the command.

Minimal example

CV.INPAINT damaged, mask, 3, TELEA AS repaired

CV.INRANGE

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.INRANGE src, low, high AS dst

Segments pixels whose values fall inside a scalar range; the range is applied to all channels.

Minimal example

CV.INRANGE src, low, high AS dst

CV.INRANGE_COLOR

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.INRANGE_COLOR src, low0, low1, low2, high0, high1, high2 AS dst

Creates a 3-channel scalar range mask, useful after HSV/Lab conversion.

Minimal example

CV.COLOR img, "BGR2HSV" AS hsv
CV.INRANGE_COLOR hsv, 20, 60, 60, 40, 255, 255 AS mask

CV.INVERT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.INVERT src AS dst

Inverts pixel intensity; on stacks it operates frame-by-frame.

Minimal example

CV.INVERT src AS dst

CV.IS_EMPTY

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.IS_EMPTY(value)

Returns TRUE for NULL, empty media, invalid arrays or empty strings.

Minimal example

ASSERT NOT CV.IS_EMPTY(img), "empty media"

CV.IS_IMAGE

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.IS_IMAGE(value)

Returns TRUE when value is a non-empty single image object.

Minimal example

IF CV.IS_IMAGE(img) THEN
    GUI.SHOW img
ENDIF

CV.IS_STACK

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.IS_STACK(value)

Returns TRUE when value is a non-empty stack object. Non-media values simply return FALSE.

Minimal example

IF CV.IS_STACK(media) THEN
    PRINT STACK.FRAMES(media)
ENDIF

CV.IS_VALID

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.IS_VALID(value)

Returns TRUE when value is a non-empty image or stack object. Useful after IO.TRY_LOAD.

Minimal example

IO.TRY_LOAD "missing.png" AS img
IF NOT CV.IS_VALID(img) THEN
    PRINT IO.LAST_ERROR()
ENDIF

CV.KEEP_LARGEST

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.KEEP_LARGEST mask AS dst

Keeps only the largest connected foreground component of a binary mask.

Minimal example

CV.KEEP_LARGEST mask AS mainObj

CV.KMEANS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.KMEANS src, k AS quantized

Quantizes an image or each frame of a stack with k-means clustering in channel space.

Minimal example

CV.KMEANS img, 4 AS quantized

CV.KMEANS_CENTERS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Minimal example

CV.KMEANS_CENTERS img, 4 AS centers

CV.LABELS_COLOR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.LABELS_COLOR labels AS dst

Converts a label image, or a binary mask converted to connected components, into a deterministic color visualization.

Minimal example

CV.CONNECTED_COMPONENTS mask AS labels
CV.LABELS_COLOR labels AS colorLabels

CV.LAPLACIAN

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.LAPLACIAN src AS dst

Computes the Laplacian frame-by-frame.

Minimal example

CV.LAPLACIAN src AS dst

CV.LARGEST_CONTOUR_AREA

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.LARGEST_CONTOUR_AREA(mask)

Area in pixels of the largest external contour found across the media object.

Minimal example

value = CV.LARGEST_CONTOUR_AREA(mask)

CV.LARGEST_CONTOUR_PERIMETER

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.LARGEST_CONTOUR_PERIMETER(mask)

Perimeter of the largest external contour found across the media object.

Minimal example

value = CV.LARGEST_CONTOUR_PERIMETER(mask)

CV.LINE_PROFILE_ARRAY

FUNCTIONCVBATCH-FRIENDLYFILE I/OIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
channelZero-based channel index; some commands accept -1 for grayscale/all channels.

Minimal example

line = CV.LINE_PROFILE_ARRAY(img, 10, 10, 200, 100)

CV.MATCH_ORB

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

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

Minimal example

CV.MATCH_ORB descA, descB, 64, 200 AS matches

CV.MATCH_TEMPLATE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.MATCH_TEMPLATE src, templ [, method] AS dst

Computes an OpenCV template-matching response map. Source/template pairs may be broadcast across stacks.

Optional parameters

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

ParameterMeaning
methodOpenCV method selector accepted by the command.

Minimal example

CV.MATCH_TEMPLATE src, templ [, method] AS dst

CV.MAXIMUM

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.MAXIMUM left, right AS dst

Computes the per-pixel maximum of two images or stacks.

Minimal example

CV.MAXIMUM left, right AS dst

CV.MAXLOC_FRAME

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MAXLOC_FRAME(map)

Frame index where the maximum value is located.

Minimal example

value = CV.MAXLOC_FRAME(map)

CV.MAXLOC_VALUE

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MAXLOC_VALUE(map)

Maximum value in a single-channel map or map stack.

Minimal example

value = CV.MAXLOC_VALUE(map)

CV.MAXLOC_X

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MAXLOC_X(map)

X coordinate of the maximum value in a single-channel map or map stack.

Minimal example

value = CV.MAXLOC_X(map)

CV.MAXLOC_Y

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MAXLOC_Y(map)

Y coordinate of the maximum value in a single-channel map or map stack.

Minimal example

value = CV.MAXLOC_Y(map)

CV.MAXVAL

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.MAXVAL(media)

Maximum sample value across all pixels, channels, and frames.

Minimal example

value = CV.MAXVAL(media)

CV.MEAN

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.MEAN(media)

Mean value across all pixels, channels, and frames.

Minimal example

value = CV.MEAN(media)

CV.MEAN_MASK

FUNCTIONCVBATCH-FRIENDLYIMAGEMASK
Kind: Function   Category: Image statistics   Namespace: CV

CV.MEAN_MASK(media,mask)

Masked mean of a media object using a binary mask or mask stack.

Minimal example

value = CV.MEAN_MASK(media,mask)

CV.MEANSHIFT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
hBinsOptional parameter. If omitted, the command uses its internal default.
sBinsOptional parameter. If omitted, the command uses its internal default.
maxIterOptional parameter. If omitted, the command uses its internal default.
epsilonOptional parameter. If omitted, the command uses its internal default.
previewOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.MEANSHIFT st, rect, 30, 32, 20, 1.0 AS rects, preview

CV.MEDIAN

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.MEDIAN src [, radius] AS dst

Applies a median filter frame-by-frame.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.

Minimal example

CV.MEDIAN src [, radius] AS dst

CV.MERGE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.MERGE ch0, ch1 [, ch2 [, ch3]] AS dst

Merges one to four single-channel images/stacks into a multi-channel result.

Optional parameters

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

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

Minimal example

CV.MERGE ch0, ch1 [, ch2 [, ch3]] AS dst

CV.MERGE_COMPLEX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Complex image statements   Namespace: CV

CV.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.

Minimal example

CV.MERGE_COMPLEX re, im AS zimg

CV.MINIMUM

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.MINIMUM left, right AS dst

Computes the per-pixel minimum of two images or stacks.

Minimal example

CV.MINIMUM left, right AS dst

CV.MINLOC_FRAME

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MINLOC_FRAME(map)

Frame index where the minimum value is located.

Minimal example

value = CV.MINLOC_FRAME(map)

CV.MINLOC_VALUE

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MINLOC_VALUE(map)

Minimum value in a single-channel map or map stack.

Minimal example

value = CV.MINLOC_VALUE(map)

CV.MINLOC_X

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MINLOC_X(map)

X coordinate of the minimum value in a single-channel map or map stack.

Minimal example

value = CV.MINLOC_X(map)

CV.MINLOC_Y

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Location functions   Namespace: CV

CV.MINLOC_Y(map)

Y coordinate of the minimum value in a single-channel map or map stack.

Minimal example

value = CV.MINLOC_Y(map)

CV.MINVAL

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.MINVAL(media)

Minimum sample value across all pixels, channels, and frames.

Minimal example

value = CV.MINVAL(media)

CV.MORPH_CLOSE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.MORPH_CLOSE src [, radius [, shape [, iterations]]] AS dst

Applies morphological closing frame-by-frame with selectable kernel shape.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.MORPH_CLOSE mask, 3, RECT, 1 AS closed

CV.MORPH_EX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.MORPH_EX mask, CLOSE, RECT, 15, 5, 1 AS closedHorizontal

CV.MORPH_GRADIENT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.MORPH_GRADIENT src [, radius [, shape [, iterations]]] AS dst

Computes a morphological gradient frame-by-frame with selectable kernel shape.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.MORPH_GRADIENT mask, 2, CROSS, 1 AS grad

CV.MORPH_OPEN

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.MORPH_OPEN src [, radius [, shape [, iterations]]] AS dst

Applies morphological opening frame-by-frame with selectable kernel shape.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.MORPH_OPEN mask, 2, ELLIPSE, 1 AS opened

CV.MUL

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.MUL left, right AS dst

Performs pixel-wise multiplication between two images or stacks.

Minimal example

CV.MUL left, right AS dst

CV.MULS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.MULS src, scalar AS dst

Multiplies every pixel by a scalar value.

Minimal example

CV.MULS src, scalar AS dst

CV.NLMEANS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.NLMEANS src [, h [, templateWindow [, searchWindow]]] AS dst

Applies OpenCV fast non-local means denoising. Output is 8-bit grayscale/BGR.

Optional parameters

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

ParameterMeaning
hOptional output height, or ROI height when part of x,y,w,h.
templateWindowNon-local-means template patch size.
searchWindowNon-local-means search window size.

Minimal example

CV.NLMEANS img, 10, 7, 21 AS den

CV.NORM

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.NORM(media)

Global L2 norm across all pixels, channels, and frames.

Minimal example

value = CV.NORM(media)

CV.NORMALIZE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.NORMALIZE src [, newMin [, newMax]] AS dst

Normalizes the source range into a target range using OpenCV NORM_MINMAX.

Optional parameters

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

ParameterMeaning
newMinOutput minimum used by normalization.
newMaxOutput maximum used by normalization.

Minimal example

CV.NORMALIZE src [, newMin [, newMax]] AS dst

CV.ORB_DETECT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.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.

Minimal example

CV.ORB_DETECT img, 800 AS kp, desc

CV.OTSU

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.OTSU src AS dst

Computes an automatic Otsu threshold on the grayscale source.

Minimal example

CV.OTSU src AS dst

CV.PAD

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.PAD src, top, bottom, left, right [, value] AS dst

Adds a constant border around an image or every stack frame.

Optional parameters

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

ParameterMeaning
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.PAD img, 10, 10, 20, 20, 0 AS padded

CV.PALETTE

STATEMENTCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Other image / stack statements   Namespace: CV

CV.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.

Minimal example

img = CV.DESKTOP_IMAGE()
CV.PALETTE img, "thermal.map" AS colorImg
GUI.SHOW colorImg

CV.PASTE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Minimal example

CV.PASTE base, patch, 10, 20 AS out

CV.PASTE_RECT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Minimal example

r = RECT.CREATE(10, 20, 30, 40)
CV.PASTE_RECT base, patch, r AS out

CV.PERIMETER

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Shape and connected-component metrics   Namespace: CV

CV.PERIMETER(mask)

Total contour perimeter of a binary mask across all frames.

Minimal example

value = CV.PERIMETER(mask)

CV.PIXEL

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.PIXEL(media, x, y [, channel [, frame]])

Returns one pixel sample as a number. Channel and frame default to zero.

Optional parameters

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

ParameterMeaning
channelZero-based channel index; some commands accept -1 for grayscale/all channels.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

v = CV.PIXEL(img, 120, 80)
vb = CV.PIXEL(colorImg, 120, 80, 0)

CV.PIXEL_ARRAY

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

px = CV.PIXEL_ARRAY(colorImg, 120, 80)

CV.POWER_SPECTRUM

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.POWER_SPECTRUM src [, logScale] AS dst

Computes a centered power spectrum map from the grayscale source, normalized to 0..255 as 32F.

Optional parameters

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

ParameterMeaning
logScaleWhen true, applies logarithmic visualization scaling to spectral magnitude/power.

Minimal example

CV.POWER_SPECTRUM img, TRUE AS pow

CV.PROFILE_ARRAY

FUNCTIONCVBATCH-FRIENDLYFILE I/OIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
channelZero-based channel index; some commands accept -1 for grayscale/all channels.

Minimal example

row = CV.PROFILE_ARRAY("H", img, 100)

CV.QR_DETECT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

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.

Minimal example

CV.QR_DETECT img AS qrText
IF qrText <> "" THEN
    PRINT "QR=" + qrText
ENDIF

CV.RECT_MASK

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
valueScalar value written, drawn, or used as foreground/background according to the command.

Minimal example

CV.RECT_MASK 80, 60, 10, 12, 20, 15 AS mask

CV.REMAP

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Minimal example

CV.REMAP src, flow AS dst  OR  CV.REMAP src, flowX, flowY AS dst

CV.RESIZE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.RESIZE src, w, h AS dst

Resizes the image or all frames in the stack.

Minimal example

CV.RESIZE src, w, h AS dst

CV.ROTATE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.ROTATE src, angle [, scale [, borderValue]] AS dst

Rotates around the image center using affine interpolation and a constant border value.

Optional parameters

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

ParameterMeaning
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
borderValueConstant value used to fill pixels outside the source image after a transform.

Minimal example

CV.ROTATE img, 12.5, 1.0, 0 AS rot

CV.ROTATE90

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.ROTATE90 src, code AS dst

Rotates by exact right angles without interpolation. Codes: 90/CW, 180, 270/CCW.

Minimal example

CV.ROTATE90 img, 90 AS rot

CV.SCALE_ABS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.SCALE_ABS src [, alpha [, beta]] AS dst

Applies OpenCV convertScaleAbs, useful for visualizing gradients and signed/float maps.

Optional parameters

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

ParameterMeaning
alphaMultiplicative scale factor.
betaAdditive offset after scaling.

Minimal example

CV.SCALE_ABS grad, 2.0 AS vis

CV.SCHARR

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.SCHARR src [, dx [, dy]] AS dst

Computes Scharr gradients. Without dx/dy it returns a combined gradient image.

Optional parameters

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

ParameterMeaning
dxDerivative order or X displacement, depending on the command.
dyDerivative order or Y displacement, depending on the command.

Minimal example

CV.SCHARR img AS grad

CV.SET_PIXEL

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Pixel access statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
channelZero-based channel index; some commands accept -1 for grayscale/all channels.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

CV.SET_PIXEL img, 10, 10, 255 AS marked
CV.SET_PIXEL img, 10, 10, 128, 1 AS greenOnly

CV.SET_PIXEL3

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Pixel access statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

CV.SET_PIXEL3 colorImg, 20, 20, 0, 0, 255 AS redPixel

CV.SET_PIXEL4

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Pixel access statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

CV.SET_PIXEL4 rgbaImg, 20, 20, 0, 0, 255, 255 AS redPixel

CV.SHOW

STATEMENTCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Other image / stack statements   Namespace: CV

CV.SHOW imageOrStack [, title]

Compatibility alias of SHOW.

Optional parameters

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

ParameterMeaning
titleOptional GUI/DataPlot window title.

Minimal example

CV.SHOW

CV.SOBEL

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Analysis / flow statements   Namespace: CV

CV.SOBEL src AS dst

Computes the Sobel gradient frame-by-frame.

Minimal example

CV.SOBEL src AS dst

CV.SPECTRUM_LOG_MAG

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.SPECTRUM_LOG_MAG spectrum [, normalize] AS logMagnitudeImage

Computes log(1+magnitude) from a complex spectrum, optionally normalized for display.

Optional parameters

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

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

Minimal example

CV.SPECTRUM_LOG_MAG centered, TRUE AS view
GUI.SHOW view, "log spectrum"

CV.SPECTRUM_MAGNITUDE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

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.

Optional parameters

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

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

Minimal example

CV.SPECTRUM_MAGNITUDE spectrum [, normalize] AS magImage

CV.SPECTRUM_PHASE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.SPECTRUM_PHASE spectrum [, normalize] AS phaseImage

CV.SPECTRUM_POWER

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Frequency / spectral statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
logScaleWhen true, applies logarithmic visualization scaling to spectral magnitude/power.
normalizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.SPECTRUM_POWER spectrum [, logScale [, normalize]] AS powerImage

CV.SPLIT_COMPLEX

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Complex image statements   Namespace: CV

CV.SPLIT_COMPLEX complexImage AS realImage, imagImage

Splits a CV_32FC2/CV_64FC2 complex image into real and imaginary single-channel images.

Minimal example

CV.SPLIT_COMPLEX zimg AS re, im

CV.STDDEV

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.STDDEV(media)

Standard deviation across all pixels, channels, and frames.

Minimal example

value = CV.STDDEV(media)

CV.SUB

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.SUB name([param1 [, param2 ...]])

Starts a named subroutine block. The block is skipped during normal flow and executed only by CALL.

Optional parameters

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

ParameterMeaning
param1First algorithm-specific tuning parameter.
param2Second algorithm-specific tuning parameter.

Minimal example

CV.SUB

CV.SUBS

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image arithmetic statements   Namespace: CV

CV.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.

Minimal example

CV.SUBS img, 25 AS darker

CV.SUM

FUNCTIONCVBATCH-FRIENDLYIMAGE
Kind: Function   Category: Image statistics   Namespace: CV

CV.SUM(media)

Sum of all pixels, channels, and frames.

Minimal example

value = CV.SUM(media)

CV.THRESHOLD

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.THRESHOLD src, CV.THRESHOLD AS dst

Applies a fixed threshold frame-by-frame.

Minimal example

CV.THRESHOLD src, CV.THRESHOLD AS dst

CV.TO32F

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.TO32F src [, scale [, beta]] AS dst

Converts to 32-bit float using optional scale and offset.

Optional parameters

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

ParameterMeaning
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
betaAdditive offset after scaling.

Minimal example

CV.TO32F img, 1.0 / 255.0 AS f

CV.TO8U

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Image creation / conversion statements   Namespace: CV

CV.TO8U src [, alpha [, beta]] AS dst

Converts to 8-bit unsigned using optional alpha and beta.

Optional parameters

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

ParameterMeaning
alphaMultiplicative scale factor.
betaAdditive offset after scaling.

Minimal example

CV.TO8U f, 255.0 AS u8

CV.TOPHAT

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Morphology statements   Namespace: CV

CV.TOPHAT src [, radius [, shape [, iterations]]] AS dst

Computes the top-hat transform frame-by-frame with selectable kernel shape.

Optional parameters

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

ParameterMeaning
radiusKernel radius or neighborhood radius used by the filter.
shapeOptional parameter. If omitted, the command uses its internal default.
iterationsNumber of repeated passes applied by the operation.

Minimal example

CV.TOPHAT gray, 4, ELLIPSE, 1 AS tophatMap

CV.TRANSLATE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.TRANSLATE src, dx, dy [, borderValue] AS dst

Translates image content by dx,dy pixels using a constant border value.

Optional parameters

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

ParameterMeaning
borderValueConstant value used to fill pixels outside the source image after a transform.

Minimal example

CV.TRANSLATE img, 4, -2 AS shifted

CV.TYPE

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.TYPE(value)

Returns NUMBER, BOOL, STRING, IMAGE, STACK, ARRAY or NULL.

Minimal example

value = CV.TYPE(value)

CV.UNSHARP

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Filtering / enhancement statements   Namespace: CV

CV.UNSHARP src [, amount [, radius]] AS dst

Applies unsharp masking using a Gaussian blur and weighted recombination.

Optional parameters

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

ParameterMeaning
amountStrength of the effect.
radiusKernel radius or neighborhood radius used by the filter.

Minimal example

CV.UNSHARP img, 0.8, 2 AS sharp

CV.WARP_AFFINE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
wOptional output width, or ROI width when part of x,y,w,h.
hOptional output height, or ROI height when part of x,y,w,h.
borderValueConstant value used to fill pixels outside the source image after a transform.

Minimal example

CV.WARP_AFFINE img, 1, 0, 8, 0, 1, 4 AS shifted

CV.WARP_HOMOGRAPHY

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
wOptional output width, or ROI width when part of x,y,w,h.
hOptional output height, or ROI height when part of x,y,w,h.
borderValueConstant value used to fill pixels outside the source image after a transform.

Minimal example

CV.FIND_HOMOGRAPHY kpA, kpB, matches, 3.0 AS H, inliers
CV.WARP_HOMOGRAPHY imgB, H AS aligned

CV.WARP_PERSPECTIVE

STATEMENTCVBATCH-FRIENDLYIMAGE
Kind: Command   Category: Geometry / remap statements   Namespace: CV

CV.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.

Optional parameters

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

ParameterMeaning
wOptional output width, or ROI width when part of x,y,w,h.
hOptional output height, or ROI height when part of x,y,w,h.
borderValueConstant value used to fill pixels outside the source image after a transform.

Minimal example

CV.WARP_PERSPECTIVE img, 1, 0.15, -18, 0.05, 1, -8, 0.0006, 0.0009, 1, 320, 240, 0 AS warped

CV.WATERSHED

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

CV.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.

Optional parameters

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

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

Minimal example

CV.WATERSHED img, markers AS labels, colored
GUI.SHOW colored, "watershed"

CV.WATERSHED_AUTO

STATEMENTCVBATCH-FRIENDLYIMAGEMASK
Kind: Command   Category: Threshold and mask statements   Namespace: CV

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.

Optional parameters

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

ParameterMeaning
blurRadiusOptional parameter. If omitted, the command uses its internal default.
distThresholdOptional parameter. If omitted, the command uses its internal default.
invertOptional parameter. If omitted, the command uses its internal default.
coloredOptional parameter. If omitted, the command uses its internal default.

Minimal example

CV.WATERSHED_AUTO img, 1, 0.40 AS labels, colored
GUI.SHOW colored, "auto watershed"

CV.WIDTH

FUNCTIONCVBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Function   Category: Image / stack information   Namespace: CV

CV.WIDTH(image)

Width of an image or stack.

Minimal example

value = CV.WIDTH(image)