All cvBasic symbols

Full automatically generated reference. Use the browser search command to jump to a symbol, namespace or keyword.

Total symbols: 953   Statements: 455   Functions: 459   Keywords: 39

SymbolKindCategoryDescription
ANDKeywordLanguage keywordsLogical AND operator.
AP.ABSCommandArbitrary precision statementsAbsolute value.
AP.ADDCommandArbitrary precision statementsAdds AP operands and stores the result.
AP.CBRTCommandArbitrary precision statementsComputes the cube root.
AP.CEILCommandArbitrary precision statementsCeiling of an AP value.
AP.CLEARCommandArbitrary precision statementsDeletes all AP variables from the current runtime.
AP.COMPAREFunctionArbitrary precision functionsCompares two AP variables or literals. Returns -1, 0 or +1.
AP.COPYCommandArbitrary precision statementsCopies an AP variable or numeric literal into another AP variable.
AP.COSCommandArbitrary precision statementsComputes cosine.
AP.COUNTFunctionArbitrary precision functionsReturns how many AP variables are currently stored.
AP.DELETECommandArbitrary precision statementsDeletes one AP variable.
AP.DIGITSFunctionArbitrary precision functionsReturns the number of significant digits currently stored in the AP value.
AP.DIVCommandArbitrary precision statementsDivides a by b using the given digit precision, or the current AP.PRECISION setting.
AP.DOUBLEFunctionArbitrary precision functionsConverts an AP value to a normal Basic double. This is an explicit lossy bridge back to ordinary expressions.
AP.ECommandArbitrary precision statementsStores Euler's number into an AP variable.
AP.EVALCommandArbitrary precision statementsEvaluates a compact arbitrary-precision expression inside the AP world. Supports AP variables, numeric literals, pi/e, + - * / ^, parentheses and functions such as sqrt, sin, cos, log, exp, pow, fact, gcd, mod. AP.LET is the friendly alias.
AP.EXISTSFunctionArbitrary precision functionsReturns TRUE if an AP variable exists.
AP.EXPCommandArbitrary precision statementsComputes e^a.
AP.EXPONENTFunctionArbitrary precision functionsReturns the MAPM decimal exponent of the AP value.
AP.FACTCommandArbitrary precision statementsComputes factorial for integer AP values. AP.FACTORIAL is the long alias.
AP.FACTORIALCommandArbitrary precision statementsLong alias of AP.FACT.
AP.FIXEDFunctionArbitrary precision functionsReturns an AP value as fixed-point decimal text.
AP.FLOORCommandArbitrary precision statementsFloor of an AP value.
AP.GCDCommandArbitrary precision statementsGreatest common divisor for integer AP values.
AP.IDIVCommandArbitrary precision statementsInteger division quotient.
AP.INTSTRFunctionArbitrary precision functionsReturns the integer part as a string.
AP.IPOWCommandArbitrary precision statementsComputes an integer exponent power. Useful for exact or near-exact high-precision power series tests.
AP.LCMCommandArbitrary precision statementsLeast common multiple for integer AP values.
AP.LETCommandArbitrary precision statementsAlias of AP.EVAL, useful when the AP expression reads like an assignment into the AP variable table.
AP.LOGCommandArbitrary precision statementsComputes the natural logarithm.
AP.LOG10CommandArbitrary precision statementsComputes the base-10 logarithm.
AP.MODCommandArbitrary precision statementsInteger remainder.
AP.MULCommandArbitrary precision statementsMultiplies AP operands and stores the result.
AP.NEGCommandArbitrary precision statementsChanges sign of an AP value.
AP.PICommandArbitrary precision statementsStores pi into an AP variable.
AP.POWCommandArbitrary precision statementsComputes a raised to b with arbitrary precision.
AP.PRECISIONCommandArbitrary precision statementsSets the global decimal digit precision used by AP arithmetic. AP variables live in a separate namespace and are not normal Basic numeric variables.
AP.PRECISION_VALUEFunctionArbitrary precision functionsReturns the current AP precision setting.
AP.PRODCommandArbitrary precision statementsEvaluates an AP expression repeatedly while index is an AP integer variable, accumulating the product.
AP.RANDOMCommandArbitrary precision statementsStores a MAPM random value in [0,1).
AP.ROUNDCommandArbitrary precision statementsRounds an AP value.
AP.SETCommandArbitrary precision statementsCreates or replaces an arbitrary-precision variable. Prefer quoted numeric strings for exact decimal input; numeric Basic values already have double precision.
AP.SIGNFunctionArbitrary precision functionsReturns -1, 0 or +1 depending on the AP value sign.
AP.SINCommandArbitrary precision statementsComputes sine.
AP.SQRTCommandArbitrary precision statementsComputes the square root.
AP.STRFunctionArbitrary precision functionsReturns an AP value as a string. In expressions, pass the AP variable name as a string, for example AP.STR("c", 80).
AP.SUBCommandArbitrary precision statementsSubtracts b from a and stores the result.
AP.SUMCommandArbitrary precision statementsEvaluates an AP expression repeatedly while index is an AP integer variable, accumulating the sum. The previous index variable is restored after the loop.
AP.TANCommandArbitrary precision statementsComputes tangent.
AP.VERSIONFunctionArbitrary precision functionsReturns the underlying MAPM library version.
ARRAYKeywordLanguage keywordsLogical type returned by TYPE(x) for arrays.
ARRAY.COLUMNFunctionArray functionsExtracts one column from a 2D array and returns a 1D array.
ARRAY.DIMSFunctionArray functionsReturns the number of dimensions.
ARRAY.DIMSIZEFunctionArray functionsReturns the size of one zero-based dimension.
ARRAY.EQUALFunctionArray functionsReturns TRUE when two arrays have the same shape and equal values, with optional numeric tolerance.
ARRAY.FROM_TEXTFunctionArray functionsReads an array from ARRAY.TO_TEXT output or plain delimited rows.
ARRAY.GETFunctionArray functionsReads an array element. For vector-like 2D arrays n x 1 or 1 x n, one-index access is accepted: v[0] or ARRAY.GET(v,0).
ARRAY.IS_ARRAYFunctionArray functionsReturns TRUE when the value is a script array.
ARRAY.MAXFunctionArray functionsReturns the maximum numeric element.
ARRAY.MEANFunctionArray functionsReturns the mean of all numeric elements in the array.
ARRAY.MINFunctionArray functionsReturns the minimum numeric element.
ARRAY.ROWFunctionArray functionsExtracts one row from a 2D array and returns a 1D array.
ARRAY.SETFunctionArray functionsWrites an array element and returns the same array object. Vector-like 2D arrays n x 1 or 1 x n also accept one-index writes.
ARRAY.SIZEFunctionArray functionsReturns the total number of elements.
ARRAY.STDDEVFunctionArray functionsReturns the population standard deviation of all numeric elements.
ARRAY.SUMFunctionArray functionsReturns the sum of all numeric elements in the array.
ARRAY.TO_TEXTFunctionArray functionsSerializes a 1D/2D array to a compact CVB_ARRAY text block.
ASKeywordLanguage keywordsAssigns the result of a command to a variable, or names the local return variable in FUNCTION ... AS result.
ASSERTCommandDiagnostics statementsStops the script with a clear error if condition is false. Useful for diagnostic and regression scripts.
CALLKeywordLanguage keywordsExecutes a SUB block. Simple variable arguments are copied back after the call.
CASEKeywordLanguage keywordsIntroduces one SWITCH branch. Multiple comma-separated values are allowed. Numeric ranges and comparisons are supported. Only the first matching branch is executed.
CATCHKeywordLanguage keywordsHandles a runtime error from the preceding TRY block. Optional variables receive the message and source line.
COUNT_NONZEROFunctionOpenCV / media functionsCompatibility alias for COUNT_NONZERO / MASK.COUNT.
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.
CX.ABSCommandComplex number statementsStores the modulus |z| in a normal numeric variable.
CX.ADDCommandComplex number statementsComputes dst = a + b for two scalar complex variables.
CX.ADD_REALCommandComplex number statementsComputes dst = z + x where x is a normal real expression.
CX.ARGCommandComplex number statementsStores the phase angle arg(z), in radians, in a normal numeric variable.
CX.CLEARCommandComplex number statementsClears all scalar complex variables stored in the CX runtime table.
CX.CONJCommandComplex number statementsComputes the complex conjugate of z.
CX.COPYCommandComplex number statementsCopies a scalar complex variable.
CX.COSCommandComplex number statementsComputes the complex cosine.
CX.DELETECommandComplex number statementsDeletes one scalar complex variable if it exists.
CX.DIVCommandComplex number statementsComputes dst = a / b for two scalar complex variables. Division by a zero complex value is rejected.
CX.DIV_REALCommandComplex number statementsComputes dst = z / x where x is a normal real expression. Division by zero is rejected.
CX.EXISTSCommandComplex number statementsWrites 1 to result when the named scalar complex variable exists, otherwise 0.
CX.EXPCommandComplex number statementsComputes the complex exponential exp(z).
CX.FROM_POLARCommandComplex number statementsCreates a scalar complex variable from polar coordinates. The radius must be non-negative and the angle is in radians.
CX.FROM_RE_IMCommandComplex number statementsCreates a scalar complex variable from rectangular coordinates. Alias-friendly companion of CX.SET.
CX.IMCommandComplex number statementsStores the imaginary part of z in a normal numeric variable.
CX.INVCommandComplex number statementsComputes dst = 1/z. Division by a zero complex value is rejected.
CX.LISTCommandComplex number statementsPrints all scalar complex variables currently stored in the CX runtime table.
CX.LOGCommandComplex number statementsComputes the principal complex logarithm log(z).
CX.MULCommandComplex number statementsComputes dst = a * b for two scalar complex variables.
CX.MUL_REALCommandComplex number statementsComputes dst = z * x where x is a normal real expression.
CX.NEGCommandComplex number statementsComputes dst = -z.
CX.NORMCommandComplex number statementsStores squared modulus re*re + im*im in a normal numeric variable.
CX.POLARCommandComplex number statementsAlias of CX.FROM_POLAR.
CX.POW_REALCommandComplex number statementsRaises z to a real-valued exponent. Complex exponents are intentionally not parsed in this first CX layer.
CX.PRINTCommandComplex number statementsPrints a scalar complex variable in readable real/imaginary form.
CX.RECommandComplex number statementsStores the real part of z in a normal numeric variable.
CX.SETCommandComplex number statementsCreates or replaces a scalar complex variable from real and imaginary parts.
CX.SINCommandComplex number statementsComputes the complex sine.
CX.SQRTCommandComplex number statementsComputes the principal complex square root.
CX.SUBCommandComplex number statementsComputes dst = a - b for two scalar complex variables.
CX.SUB_REALCommandComplex number statementsComputes dst = z - x where x is a normal real expression.
CX.TANCommandComplex number statementsComputes the complex tangent.
CX.TO_POLARCommandComplex number statementsStores modulus and phase angle, in radians, in two normal numeric variables.
CX.TO_RE_IMCommandComplex number statementsStores real and imaginary parts of z in two normal numeric variables.
DEBUG.EXPR_CACHE_COMPILE_ATTEMPTSFunctionDiagnostics functionsPublic cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
DEBUG.EXPR_CACHE_COMPILE_FAILURESFunctionDiagnostics functionsPublic cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
DEBUG.EXPR_CACHE_COMPILEDFunctionDiagnostics functionsPublic cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
DEBUG.EXPR_CACHE_EVALSFunctionDiagnostics functionsPublic cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
DEBUG.EXPR_CACHE_FALLBACKSFunctionDiagnostics functionsReturns how many expression evaluations fell back to the classic ExpressionParser.
DEBUG.EXPR_CACHE_HIT_RATEFunctionDiagnostics functionsReturns the expression-cache hit rate as a percentage over hits + misses.
DEBUG.EXPR_CACHE_HITSFunctionDiagnostics functionsReturns the number of expression-cache hits in the current run since the last reset.
DEBUG.EXPR_CACHE_LIMIT_CLEARSFunctionDiagnostics functionsPublic cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
DEBUG.EXPR_CACHE_MISSESFunctionDiagnostics functionsReturns the number of expression-cache misses in the current run since the last reset.
DEBUG.EXPR_CACHE_RESET_STATSCommandDiagnostics statementsResets the expression-cache diagnostic counters without clearing the cached expression tree.
DEBUG.EXPR_CACHE_SIZEFunctionDiagnostics functionsReturns the current number of compiled expressions stored in the cache.
DEBUG.EXPR_CACHE_SUMMARYFunctionDiagnostics functionsReturns a compact string with expression-cache size, evaluations, hits, misses, compiled expressions, fallbacks and limit clears.
DEFAULTKeywordLanguage keywordsOptional fallback branch of a SWITCH block. It must appear after all CASE branches.
DEMO.ADDFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns a + b.
DEMO.ARGSINFOFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns a compact description of all received argument types.
DEMO.ARRAY_INFOFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns shape and total size of a cvBasic array using SDK v2 array access.
DEMO.ARRAY_SCALEFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns a numeric array with every element multiplied by factor.
DEMO.ARRAY_SUMFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the sum of all numeric array elements.
DEMO.CLAMPFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Clamps x into the [lo, hi] range.
DEMO.HELLOCommandOther image / stack statementsLibrary: DemoStats user library 2.0.0 Prints a greeting from the DLL.
DEMO.IMAGE_INFOFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns width, height, channels, depth, type and frame count for an image/stack.
DEMO.INVERT8FunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns an inverted copy of an 8-bit image using SDK v2 image view access.
DEMO.MAXFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the maximum numeric argument.
DEMO.MEANFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the arithmetic mean of all numeric arguments.
DEMO.MINFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the minimum numeric argument.
DEMO.MULFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the product of all numeric arguments.
DEMO.RAMPFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns a 1D numeric array containing 0..n-1.
DEMO.REPEATFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Repeats text count times, capped at 1024 repetitions.
DEMO.STDDEVFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the population standard deviation of the numeric arguments.
DEMO.TYPEOFFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the external SDK value type name of the argument.
DEMO.TYPESCommandOther image / stack statementsLibrary: DemoStats user library 2.0.0 Prints the SDK data types supported by this demo library.
DEMO.UPPERFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns an upper-case copy of text.
DEMO.VERSIONFunctionOpenCV / media functionsLibrary: DemoStats user library 2.0.0 Returns the library version string.
DIMCommandLanguage keywordsDeclares a zero-based one or multi-dimensional array. Variable names are case-insensitive, so DIM v(10) and later V refer to the same variable. Compact literals are also supported: v = [1,2,3] and A = [[1,2],[3,4]].
DIMCommandCore statementsDeclares a zero-based one or multi-dimensional array. Variable names are case-insensitive, so DIM v(10) and later V refer to the same variable. Compact literals are also supported: v = [1,2,3] and A = [[1,2],[3,4]].
DPLOT.ADDXYCommandInteractive DataPlot statementsAdds an X/Y numeric channel to an interactive DataPlot window. xValues and yValues can be arrays or numeric text lists and must have the same length.
DPLOT.ADDYCommandInteractive DataPlot statementsAdds a Y-only numeric channel to an interactive DataPlot window. The X axis is generated as 0..N-1. yValues can be an array, numeric text list, or single numeric value.
DPLOT.BINSCommandInteractive DataPlot statementsChanges the number of bins used by the DataPlot histogram panel.
DPLOT.CLEARCommandInteractive DataPlot statementsRemoves all channels from an interactive DataPlot window.
DPLOT.COMMON_RANGECommandInteractive DataPlot statementsEnables or disables a common histogram range across all DataPlot channels.
DPLOT.CREATEFunctionInteractive DataPlot functionsCreates an interactive DataPlot MDI window and returns a numeric handle used by DPLOT.ADDY, DPLOT.ADDXY and the other DPLOT commands.
DPLOT.MODECommandInteractive DataPlot statementsSets the interactive DataPlot mode: READOUT, ZOOM, or PAN.
DPLOT.NORMALIZECommandInteractive DataPlot statementsEnables or disables normalized histogram display in a DataPlot window.
DRAW.CIRCLECommandDrawing statementsDraws or fills a circle over an image or stack.
DRAW.LINECommandDrawing statementsDraws a line over an image or over every frame of a stack and returns the modified media.
DRAW.RECTCommandDrawing statementsDraws or fills a rectangle over an image or stack.
DRAW.TEXTCommandDrawing statementsDraws text using an OpenCV Hershey font over an image or stack.
ELSEKeywordLanguage keywordsAlternative branch of an IF block.
ENDFUNCTIONKeywordLanguage keywordsCloses a FUNCTION block.
ENDIFKeywordLanguage keywordsCloses the IF block.
ENDSUBKeywordLanguage keywordsCloses a SUB block.
ENDSWITCHKeywordLanguage keywordsCloses a SWITCH block.
ENDTRYKeywordLanguage keywordsCloses a TRY/CATCH block.
EXITKeywordLanguage keywordsTerminates the current script cleanly. Useful in interactive scripts after a cancelled dialog or an explicit user choice.
FALSEKeywordLanguage keywordsBoolean false constant.
FORKeywordLanguage keywordsStarts either a numeric loop or a FOR IN iteration over all elements of an array/string.
FUNCTIONKeywordLanguage keywordsStarts a user-defined function block. The function can be used inside expressions and returns either RETURN expr or the AS return variable.
GL.ARROWCommandOpenGL 3D commandsAdds a 3D vector arrow starting at x,y,z and pointing by dx,dy,dz.
GL.AUTOROTATECommandOpenGL 3D commandsStarts or stops the GL viewer internal autorotation timer.
GL.AXESCommandOpenGL 3D commandsAdds RGB XYZ axes: X red, Y green, Z blue.
GL.BACKGROUNDCommandOpenGL 3D commandsSets the GL viewer background color. Accepts Qt color names or #RRGGBB values.
GL.BOUNDSFunctionOpenGL 3D functionsReturns scene bounds as minX,minY,minZ;maxX,maxY,maxZ, useful for reports and sanity checks.
GL.CAPTIONCommandOpenGL 3D commandsSets a scene caption shown in the GL overlay and included in GL.INFO/GL.REPORT.
GL.CAPTURECommandOpenGL 3D commandsAlias of GL.CAPTURE_FRAME.
GL.CAPTURE_FRAMECommandOpenGL 3D commandsSaves a frame snapshot. pathPattern may contain %04d, %03d, %02d, %d or {frame}. Alias: GL.CAPTURE.
GL.CENTERCommandOpenGL 3D commandsRecenters the camera on current bounds without changing rotation.
GL.CLEARCommandOpenGL 3D commandsRemoves all geometry from a GL scene and resets its automatic bounds.
GL.CLOSECommandOpenGL 3D commandsCloses a GL viewer by handle.
GL.COLORCommandOpenGL 3D commandsChanges object color. For gradient surfaces this switches the object to a flat color.
GL.COLORMAPCommandOpenGL 3D commandsApplies a preview colormap to all gradient GL.SURFACE/GL.HEIGHTFIELD objects. Supported modes: gray, hot, blue-red, jet, viridis, thermal, custom.
GL.CREATEFunctionOpenGL 3D functionsCreates an interactive OpenGL MDI viewer for scientific 3D geometry and returns a numeric handle. The viewer supports mouse/keyboard rotation, pan, zoom, fit, grid/axes toggle and snapshot.
GL.DELETECommandOpenGL 3D commandsDeletes a GL object previously identified through GL.LAST_ID.
GL.EXPORT_CSVCommandOpenGL 3D commandsExports GL geometry as a simple CSV table of VERTEX and TRI records. It is easier to inspect than OBJ/PLY and complements GL.SAVE_SCENE.
GL.EXPORT_OBJCommandOpenGL 3D commandsExports visible GL geometry to Wavefront OBJ. If objectId is supplied, only that GL object is exported. Lines are written as OBJ l records; triangle meshes/surfaces are written as faces.
GL.EXPORT_OBJECT_CSVCommandOpenGL 3D commandsExports one selected GL object to a compact CSV geometry table.
GL.EXPORT_OBJECT_OBJCommandOpenGL 3D commandsExports one selected GL object to Wavefront OBJ.
GL.EXPORT_OBJECT_PLYCommandOpenGL 3D commandsExports one selected GL object to ASCII PLY.
GL.EXPORT_PLYCommandOpenGL 3D commandsExports visible GL vertices and triangular faces to ASCII PLY. Point clouds are exported as vertices; lines are not represented as edges in this first lightweight exporter.
GL.EXPORT_SCENECommandOpenGL 3D commandsPublic cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
GL.FITCommandOpenGL 3D commandsRecomputes scene bounds, recenters the camera and resets zoom/pan while preserving the current rotation.
GL.FLUSHCommandOpenGL 3D commandsAlias of GL.SYNC.
GL.FRAMECommandOpenGL 3D commandsProcesses GUI events for one animation frame. Without maxMs it uses the delay configured by GL.SET_FPS.
GL.GRIDCommandOpenGL 3D commandsAdds a scientific reference grid on plane XY, XZ or YZ.
GL.HEIGHTFIELDCommandOpenGL 3D commandsConverts an image or stack frame into a shaded 3D heightfield. X/Y are image coordinates centered around the origin; Z is normalized luminance mapped between zMin and zMax. sampleStep reduces large images.
GL.HIDECommandOpenGL 3D commandsTemporarily hides a GL object without deleting it.
GL.IMAGE_POINTSCommandOpenGL 3D commandsAlias of GL.POINTCLOUD_FROM_IMAGE.
GL.IMAGE_SURFACECommandOpenGL 3D commandsAlias of GL.HEIGHTFIELD, intended for OpenCV image-to-surface visualizations.
GL.IMPORT_OBJCommandOpenGL 3D commandsImports a simple Wavefront OBJ mesh. v and f records are supported; polygonal faces are triangulated as fans. If the OBJ has vertices but no faces, it is imported as a point cloud.
GL.INFOFunctionOpenGL 3D functionsReturns a multi-line diagnostic summary of the GL scene: title, caption, bounds, camera, renderer, item/object counts and visible primitive totals.
GL.ISOSURFACECommandOpenGL 3D commandsExtracts a lightweight triangulated isosurface from a W x H x T stack using a marching-tetrahedra pass. threshold01 is normalized over the sampled volume.
GL.ITEM_COUNTFunctionOpenGL 3D functionsReturns the number of internal GL items currently stored in a scene, including grids, axes and labels.
GL.LABELCommandOpenGL 3D commandsAlias of GL.TEXT.
GL.LAST_IDFunctionOpenGL 3D functionsReturns the object id assigned to the last GL object added to the scene. Useful before GL.HIDE, GL.SHOW, GL.DELETE or style changes.
GL.LINECommandOpenGL 3D commandsAdds one 3D line segment to the scene.
GL.LOAD_OBJCommandOpenGL 3D commandsImports a simple Wavefront OBJ mesh. v and f records are supported; polygonal faces are triangulated as fans. If the OBJ has vertices but no faces, it is imported as a point cloud.
GL.MARCHING_CUBESCommandOpenGL 3D commandsAlias of GL.ISOSURFACE. The current implementation uses marching tetrahedra internally to avoid large lookup tables while still producing triangular isosurfaces.
GL.MARCHING_TETRAHEDRACommandOpenGL 3D commandsExtracts a lightweight triangulated isosurface from a W x H x T stack using a marching-tetrahedra pass. threshold01 is normalized over the sampled volume.
GL.MESHCommandOpenGL 3D commandsAdds a triangular mesh from a vertex list and a face list. Face indices may be 0-based or 1-based; polygons with more than three indices are triangulated as fans.
GL.NEWFunctionOpenGL 3D functionsAlias of GL.CREATE.
GL.OBJECT_COUNTFunctionOpenGL 3D functionsReturns the number of user geometry objects, excluding helper grids and axes.
GL.POINTCommandOpenGL 3D commandsAdds one 3D point to the scene.
GL.POINTCLOUD_FROM_IMAGECommandOpenGL 3D commandsConverts bright pixels of an image frame into a sparse 3D point cloud. X/Y come from image coordinates, Z comes from normalized luminance times zScale.
GL.POINTCLOUD_FROM_STACKCommandOpenGL 3D commandsAlias of GL.VOXELS.
GL.POINTSCommandOpenGL 3D commandsAdds a batch of independent 3D points, useful for point clouds, samples and phase-space scatter plots.
GL.POLYLINECommandOpenGL 3D commandsAdds a connected 3D polyline from a semicolon/newline-separated list of x,y,z points.
GL.RAYMARCHCommandOpenGL 3D commandsAlias of GL.VOLUME. Practical slice/ray-sampling preview before heavier GPU 3D-texture ray marching.
GL.RENDER_MODECommandOpenGL 3D commandsSelects the GL renderer path. Modes: AUTO uses shader/VBO when available; MODERN requests the shader/VBO path; LEGACY forces the fixed-pipeline fallback.
GL.RENDERERFunctionOpenGL 3D functionsReturns the requested renderer mode, active renderer and shader/VBO initialization status.
GL.REPORTCommandOpenGL 3D commandsPublic cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
GL.RESET_VIEWCommandOpenGL 3D commandsAlias of GL.RESETVIEW.
GL.RESETVIEWCommandOpenGL 3D commandsResets the GL viewer orientation, pan and zoom.
GL.ROTATECommandOpenGL 3D commandsAdds incremental camera rotation deltas to the current GL view. Useful inside animation loops.
GL.SAVE_SCENECommandOpenGL 3D commandsPublic cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.
GL.SET_COLORCommandOpenGL 3D commandsChanges object color. For gradient surfaces this switches the object to a flat color.
GL.SET_FPSCommandOpenGL 3D commandsSets the default frame delay used by GL.FRAME for this viewer.
GL.SET_SIZECommandOpenGL 3D commandsChanges point size or text size for compatible GL objects.
GL.SET_TITLECommandOpenGL 3D commandsChanges the GL MDI window title. Alias: GL.TITLE.
GL.SET_WIDTHCommandOpenGL 3D commandsChanges line width for line, polyline, grid, axes, arrow, wireframe and mesh-outline objects.
GL.SHADEDCommandOpenGL 3D commandsToggles the simple face-normal shading used by GL.SURFACE and GL.MESH.
GL.SHOWCommandOpenGL 3D commandsShows a previously hidden GL object.
GL.SIZECommandOpenGL 3D commandsChanges point size or text size for compatible GL objects.
GL.SLICECommandOpenGL 3D commandsDisplays an orthogonal X/Y/Z section of a stack as a triangulated relief surface. X/Y are image axes and Z is frame/time; scale extrudes luminance along the slice normal.
GL.SLICE_XCommandOpenGL 3D commandsDisplays the Y/T section at a fixed image column xIndex, useful for temporal stack inspection.
GL.SLICE_YCommandOpenGL 3D commandsDisplays the X/T section at a fixed image row yIndex, revealing temporal trajectories and rotating/moving patterns.
GL.SLICE_ZCommandOpenGL 3D commandsDisplays one normal image frame of the stack as a relief slice positioned at its temporal Z coordinate.
GL.SNAPSHOTCommandOpenGL 3D commandsSaves the current GL framebuffer to an image file such as PNG/JPG/BMP.
GL.STACK_POINTSCommandOpenGL 3D commandsDisplays a stack/image as a thresholded voxel-like point cloud. X/Y are image coordinates, Z is frame index times zStep.
GL.SURFACECommandOpenGL 3D commandsAdds a shaded triangulated surface from a row-major cols x rows grid of 3D points. The surface uses a simple z-gradient between lowColor and highColor.
GL.SYNCCommandOpenGL 3D commandsProcesses pending GUI events briefly after heavy GL scene construction.
GL.TEXTCommandOpenGL 3D commandsAdds a projected 3D label anchored at x,y,z. The label follows camera rotation and zoom.
GL.TITLECommandOpenGL 3D commandsAlias of GL.SET_TITLE.
GL.UPDATE_LINECommandOpenGL 3D commandsUpdates the endpoints of an existing line-segment object.
GL.UPDATE_MESHCommandOpenGL 3D commandsReplaces vertices/faces of an existing GL.MESH/GL.ISOSURFACE mesh object.
GL.UPDATE_POINTSCommandOpenGL 3D commandsReplaces the vertex list of an existing GL.POINT/GL.POINTS object without creating a new object. Useful for particle animation.
GL.UPDATE_POLYLINECommandOpenGL 3D commandsReplaces the points of an existing GL.POLYLINE object while preserving its color/width.
GL.UPDATE_SURFACECommandOpenGL 3D commandsReplaces the grid geometry of an existing GL.SURFACE/heightfield/slice object. Style and colormap are preserved.
GL.UPDATE_TEXTCommandOpenGL 3D commandsMoves and rewrites an existing GL.TEXT/GL.LABEL object.
GL.VIEWCommandOpenGL 3D commandsSets the initial 3D camera orientation and zoom. Users can still rotate/pan/zoom interactively.
GL.VOLUMECommandOpenGL 3D commandsAdds a CPU-built transparent volume-render mesh from a stack. Modes: alpha, threshold, mip. It uses per-vertex color/alpha and the GL alpha-blending renderer.
GL.VOLUME_RENDERCommandOpenGL 3D commandsAlias of GL.VOLUME.
GL.VOXELSCommandOpenGL 3D commandsDisplays a stack/image as a thresholded voxel-like point cloud. X/Y are image coordinates, Z is frame index times zStep.
GL.WAITCommandOpenGL 3D commandsProcesses pending GUI events for animation pacing with an explicit millisecond delay.
GL.WIDTHCommandOpenGL 3D commandsChanges line width for line, polyline, grid, axes, arrow, wireframe and mesh-outline objects.
GL.WIREFRAMECommandOpenGL 3D commandsToggles global wireframe display for GL.SURFACE and GL.MESH objects.
GUI.CLEAR_ROICommandGUI interaction statementsClears the current ROI from the selected image/stack window.
GUI.CLOSECommandGUI interaction statementsCloses an image or stack window in the GUI MDI area. Without arguments it closes the active image/stack window.
GUI.CONFIRMFunctionHybrid GUI functionsShows a Yes/No confirmation dialog and returns TRUE for Yes, FALSE for No.
GUI.CREATE_TRACKBARCommandGUI interaction statementsCreates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().
GUI.DRAWINGFunctionHybrid GUI functionsGeneric drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].
GUI.GET_COLORFunctionHybrid GUI functionsShows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.
GUI.GET_DRAWINGFunctionHybrid GUI functionsGeneric drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].
GUI.GET_EXISTING_DIRECTORYFunctionHybrid GUI functionsShows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.
GUI.GET_OPEN_FILE_NAMEFunctionHybrid GUI functionsShows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.
GUI.GET_OPEN_FILE_NAMESFunctionHybrid GUI functionsShows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.
GUI.GET_POINTFunctionHybrid GUI functionsReturns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.
GUI.GET_RECTFunctionHybrid GUI functionsReturns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
GUI.GET_ROI_RECTFunctionHybrid GUI functionsReturns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
GUI.GET_SAVE_FILE_NAMEFunctionHybrid GUI functionsShows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.
GUI.GET_TRACKBAR_POSFunctionHybrid GUI functionsReturns the current integer value of a GUI trackbar.
GUI.GETCOLORFunctionHybrid GUI functionsShows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.
GUI.GETEXISTINGDIRECTORYFunctionHybrid GUI functionsShows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.
GUI.GETOPENFILENAMEFunctionHybrid GUI functionsShows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.
GUI.GETOPENFILENAMESFunctionHybrid GUI functionsShows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.
GUI.GETSAVEFILENAMEFunctionHybrid GUI functionsShows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.
GUI.HISTOGRAMFunctionHybrid GUI functionsCreates an interactive DataPlot histogram from an image. Modes include GRAY, RGB, BGR, R, G, B and A.
GUI.INPUTFunctionHybrid GUI functionsShows a modal text input dialog and returns the entered string.
GUI.INPUT_NUMBERFunctionHybrid GUI functionsShows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.
GUI.INPUT_TEXTFunctionHybrid GUI functionsShows a text input dialog and returns the entered string. Returns an empty string if the user cancels.
GUI.MESSAGECommandGUI interaction statementsAlias of GUI.MSGBOX with a clearer name for script-driven user messages.
GUI.MSGBOXCommandGUI interaction statementsShows a Qt information message box.
GUI.NUMBER_INPUTFunctionHybrid GUI functionsShows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.
GUI.POINTFunctionHybrid GUI functionsReturns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.
GUI.PROFILEFunctionHybrid GUI functionsCreates an interactive DataPlot profile from an image. Modes: H row profile, V column profile, XY arbitrary line profile with bilinear sampling.
GUI.RECTFunctionHybrid GUI functionsReturns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].
GUI.RELEASE_TRACKBARSCommandGUI interaction statementsRemoves all trackbars, or only those belonging to the selected panel.
GUI.ROI_HISTOGRAMFunctionHybrid GUI functionsCreates an interactive DataPlot histogram from a ROI using x,y,w,h and the selected histogram mode.
GUI.ROI_PROFILEFunctionHybrid GUI functionsCreates an interactive DataPlot profile from a ROI using x,y,w,h. H averages vertically per column; V averages horizontally per row.
GUI.SET_TRACKBAR_POSCommandGUI interaction statementsSets an existing trackbar position from script.
GUI.SHOWCommandGUI interaction statementsDisplays an image or stack in the GUI MDI area. If a title is provided and an image window with the same title already exists, that window is updated instead of opening a new one.
GUI.TEXT_INPUTFunctionHybrid GUI functionsShows a text input dialog and returns the entered string. Returns an empty string if the user cancels.
GUI.TRACKBARCommandGUI interaction statementsCreates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().
GUI.TRACKBAR_POSFunctionHybrid GUI functionsReturns the current integer value of a GUI trackbar.
GUI.TRACKBAR_VALUEFunctionHybrid GUI functionsReturns the current integer value of a GUI trackbar.
GUI.WAIT_DRAWINGFunctionHybrid GUI functionsGeneric interactive drawing wait. It waits for a GUI ROI change and returns either a rectangle array or point array.
GUI.WAIT_KEYFunctionHybrid GUI functionsProcesses GUI events for delayMs milliseconds and returns the last pressed key as uppercase text, or an empty string when no key was pressed. delayMs=0 waits indefinitely.
GUI.WAIT_POINTFunctionHybrid GUI functionsWaits for a ROI/pick and returns the selected point as [x,y]. The default point is the ROI center.
GUI.WAIT_RECTFunctionHybrid GUI functionsWaits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].
GUI.WAIT_ROICommandGUI interaction statementsWaits until the user creates, moves or resizes a ROI in the selected image/stack window.
GUI.WAIT_ROI_CHANGECommandGUI interaction statementsWaits for any committed desktop ROI change. Use ROI.FROM_DESKTOP(img,title) to copy it into an image object, or ROI.CHANGE(title)/ROI.REVISION(title) to inspect the GUI state.
GUI.WAIT_ROI_RECTFunctionHybrid GUI functionsWaits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].
IFKeywordLanguage keywordsStarts a conditional block. If a statement follows THEN on the same line, it is executed as a one-line IF without requiring ENDIF.
IMAGEKeywordLanguage keywordsLogical type returned by TYPE(x) for single images.
INKeywordLanguage keywordsIntroduces the collection expression in a FOR IN loop. Arrays are iterated in row-major linear order; strings are iterated character by character.
INCLUDEKeywordLanguage keywordsAlias of USING. Includes another cvBasic source file before execution, with the same path resolution, nested include support and recursive cycle protection.
IO.ABS_PATHFunctionFile and path functionsReturns the absolute version of a path.
IO.APPEND_TEXTFunctionFile and path functionsAppends UTF-8 text to a file and returns TRUE on success.
IO.BASE_NAMEFunctionFile and path functionsFile name without the final extension.
IO.CAMERA_GETFunctionFile / media IO statementsReads an OpenCV VideoCapture property and assigns the numeric value.
IO.CAMERA_GETFunctionFile and path functionsReads an OpenCV VideoCapture property and assigns the numeric value.
IO.CAMERA_IS_OPENFunctionFile and path functionsReturns TRUE when the selected camera index is currently open inside the script runtime.
IO.CAMERA_PROP_IDFunctionFile and path functionsReturns the numeric OpenCV CAP_PROP id for a known friendly property name, or -1 if unknown.
IO.CAMERA_PROPSFunctionFile / media IO statementsReturns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.
IO.CAMERA_PROPSFunctionFile and path functionsReturns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.
IO.CAMERA_RELEASECommandFile / media IO statementsReleases an opened camera handle. Use this when a script has finished acquiring frames.
IO.CAMERA_SETCommandFile / media IO statementsSets an OpenCV VideoCapture property. Property can be a friendly name such as FPS, WIDTH, HEIGHT, EXPOSURE or GAIN, quoted or bare.
IO.CANONICAL_PATHFunctionFile and path functionsReturns the canonical existing path with symlinks resolved when possible.
IO.CAPTURE_FRAMECommandFile / media IO statementsCaptures one BGR frame from a camera. The camera is opened lazily and kept open for following captures until IO.CAMERA_RELEASE is called.
IO.CLEAR_ERRORFunctionFile and path functionsClears the stored non-fatal runtime error and returns TRUE.
IO.COPY_FILEFunctionFile and path functionsCopies a file and returns TRUE on success.
IO.CSV_COLSFunctionFile and path functionsReturns the number of columns in a CSV/text table.
IO.CSV_COLUMNFunctionFile and path functionsReturns one selected CSV column as newline-separated text. The selector may be a header name or a zero-based index.
IO.CSV_COLUMN_ARRAYFunctionFile and path functionsLoads a selected CSV column into a script array. Pass numeric=TRUE to force numeric conversion.
IO.CSV_FIELDFunctionFile and path functionsReturns one CSV cell as text. The field selector may be a header name or a zero-based column index.
IO.CSV_HEADERSFunctionFile and path functionsReturns available CSV field names as newline-separated text. If no header exists, synthetic Column N names are returned.
IO.CSV_INFOFunctionFile and path functionsAnalyzes and loads a CSV/text table using auto-detected delimiter and header by default, then returns a diagnostic text summary.
IO.CSV_NUMBERFunctionFile and path functionsReturns one CSV cell parsed as a flexible number, supporting decimal comma and decimal point.
IO.CSV_ROWSFunctionFile and path functionsReturns the number of data rows in a CSV/text table.
IO.CSV_TABLE_ARRAYFunctionFile and path functionsLoads the whole CSV data table into a two-dimensional script array.
IO.CURRENT_DIRFunctionFile and path functionsReturns the current working directory.
IO.DIR_EXISTSFunctionFile and path functionsTRUE if a path exists and is a directory.
IO.DIR_LISTFunctionFile and path functionsReturns a newline-separated directory listing.
IO.DIR_NAMEFunctionFile and path functionsParent directory component of a path.
IO.EXTFunctionFile and path functionsFinal file extension without the dot.
IO.FCLOSEFunctionFile and path functionsCloses a file handle and returns TRUE on success.
IO.FEOFFunctionFile and path functionsReturns TRUE when the file handle is invalid or at end-of-file.
IO.FFLUSHFunctionFile and path functionsFlushes pending writes on an open file handle.
IO.FILE_EXISTSFunctionFile and path functionsTRUE if a path exists and is a file.
IO.FILE_NAMEFunctionFile and path functionsFinal file or directory name component.
IO.FILE_SIZEFunctionFile and path functionsSize in bytes, or -1 when unavailable.
IO.FOPENFunctionFile and path functionsOpens a file and returns a numeric runtime handle. Modes follow fopen-style strings such as r, w, a, rb, wb, r+, w+.
IO.FPRINTFFunctionFile and path functionsWrites formatted text to an open file handle using simple %s, %d, %f, %g placeholders.
IO.FREADFunctionFile and path functionsReads a byte block from an open file handle and returns it as text.
IO.FREADLINEFunctionFile and path functionsReads one text line from an open file handle without the trailing newline.
IO.FSCANFFunctionFile and path functionsReads the next whitespace-separated token, optionally converting it using %s, %d, %f or %g.
IO.FSEEKFunctionFile and path functionsMoves the current file position. Origin can be SET, CUR or END.
IO.FTELLFunctionFile and path functionsReturns the current byte position of an open file handle.
IO.FWRITEFunctionFile and path functionsWrites text/raw UTF-8 bytes to an open file handle and returns the number of bytes written.
IO.HOME_DIRFunctionFile and path functionsReturns the user's home directory.
IO.IS_ABSOLUTEFunctionFile and path functionsTRUE if the path is absolute.
IO.LAST_ERRORFunctionFile and path functionsReturns the last non-fatal runtime error text, currently set by IO.TRY_LOAD and IO.TRY_LOAD_WITH_META.
IO.LAST_ERROR_LINEFunctionFile and path functionsReturns the source line associated with IO.LAST_ERROR(), or -1 when unavailable.
IO.LOADCommandFile / media IO statementsLoads an image, a FITS image/stack, a TIFF/TIFF stack, or a video; videos, multipage TIFF files and multi-HDU FITS files become in-memory stacks.
IO.LOAD_WITH_METAFunctionFile / media IO statementsLoads an image/stack and applies the optional path.cvbmeta sidecar when present.
IO.LOAD_WITH_METAFunctionFile and path functionsLoads an image/stack and applies the optional path.cvbmeta sidecar when present.
IO.META_PATHFunctionFile and path functionsReturns the metadata sidecar path used by IO.SAVE_WITH_META.
IO.MKDIRFunctionFile and path functionsCreates a single directory level and returns TRUE on success.
IO.MKPATHFunctionFile and path functionsCreates a directory tree and returns TRUE on success.
IO.MOVE_FILEFunctionFile and path functionsMoves or renames a file and returns TRUE on success.
IO.PATH_EXISTSFunctionFile and path functionsTRUE if a path exists.
IO.PATH_JOINFunctionFile and path functionsJoins a base path and a child component.
IO.READ_CSV_ARRAYFunctionFile and path functionsReads a CSV written by IO.WRITE_CSV_ARRAY, preserving 1D/2D shape when the #CVB_ARRAY header is present.
IO.READ_TEXTFunctionFile and path functionsReads a text file as UTF-8, returning an empty string on failure.
IO.REMOVE_DIRFunctionFile and path functionsRemoves an empty directory and returns TRUE on success.
IO.REMOVE_DIR_TREEFunctionFile and path functionsRemoves a directory tree recursively and returns TRUE on success.
IO.REMOVE_FILEFunctionFile and path functionsDeletes a file and returns TRUE on success.
IO.SAVECommandFile / media IO statementsSaves a single image to common image formats, or saves a stack to multipage TIFF when the target extension is .tif/.tiff.
IO.SAVE_WITH_METACommandFile / media IO statementsSaves an image or stack and writes a path.cvbmeta sidecar containing ROI state and user metadata.
IO.TEMP_DIRFunctionFile and path functionsReturns the system temporary directory.
IO.TRY_LOADFunctionFile and path functionsLoads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.
IO.TRY_LOADFunctionFile / media IO statementsLoads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.
IO.TRY_LOAD_WITH_METAFunctionFile and path functionsNon-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().
IO.TRY_LOAD_WITH_METAFunctionFile / media IO statementsNon-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().
IO.WRITE_CSV_ARRAYFunctionFile and path functionsWrites a 1D/2D array to CSV with a small #CVB_ARRAY shape header and returns TRUE.
IO.WRITE_TEXTFunctionFile and path functionsWrites UTF-8 text to a file and returns TRUE on success.
IO.WRITE_VIDEOCommandFile / media IO statementsWrites a stack as an AVI/MJPG video.
LA.ADDFunctionLinear algebra / EigenElement-wise matrix addition; A and B must have the same shape.
LA.COLFunctionLinear algebra / EigenCreates an n x 1 column vector. It can still be read with one index, for example c[0].
LA.COLSFunctionLinear algebra / EigenReturns the number of columns. A 1D vector reports cols = 1.
LA.COSFunctionLinear algebra / EigenElement-wise cosine.
LA.CROSSFunctionLinear algebra / EigenCross product between two 3D vectors.
LA.DETFunctionLinear algebra / EigenReturns the determinant of a square matrix.
LA.DIAGFunctionLinear algebra / EigenVector input creates a diagonal matrix; matrix input extracts the diagonal.
LA.DOTFunctionLinear algebra / EigenDot product between same-size vectors.
LA.EIGSYM_VALSFunctionLinear algebra / EigenReturns real eigenvalues for symmetric matrices.
LA.EIGSYM_VECSFunctionLinear algebra / EigenReturns real eigenvectors for symmetric matrices.
LA.EIGVALSFunctionLinear algebra / EigenReturns eigenvalues as an N x 2 table: real and imaginary part.
LA.EIGVECSFunctionLinear algebra / EigenReturns real eigenvectors when the decomposition has negligible imaginary components.
LA.EXPFunctionLinear algebra / EigenElement-wise exponential.
LA.FROM_IMAGEFunctionLinear algebra / EigenConverts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance.
LA.GRID_XFunctionLinear algebra / EigenBuilds the X coordinate matrix for a regular grid.
LA.GRID_YFunctionLinear algebra / EigenBuilds the Y coordinate matrix for a regular grid.
LA.HADAMARDFunctionLinear algebra / EigenElement-wise matrix product.
LA.IDENTITYFunctionLinear algebra / EigenCreates an n x n identity matrix.
LA.INVFunctionLinear algebra / EigenReturns the inverse of a non-singular square matrix.
LA.LINSPACEFunctionLinear algebra / EigenCreates a 1D vector with n evenly spaced samples from a to b.
LA.LSQFunctionLinear algebra / EigenLeast-squares solution for overdetermined systems.
LA.MULFunctionLinear algebra / EigenMatrix product using Eigen.
LA.NORMFunctionLinear algebra / EigenReturns the Frobenius/vector norm.
LA.NULLSPACEFunctionLinear algebra / EigenReturns a matrix whose columns form a numerical basis of the null space of A. Full-rank matrices return one zero column because zero-width arrays are not supported.
LA.ONESFunctionLinear algebra / EigenCreates a numeric matrix initialized to one.
LA.PINVFunctionLinear algebra / EigenReturns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted.
LA.QR_QFunctionLinear algebra / EigenReturns the Q factor of the Householder QR decomposition.
LA.QR_RFunctionLinear algebra / EigenReturns the R factor of the Householder QR decomposition, with Q*R reconstructing A.
LA.RANKFunctionLinear algebra / EigenReturns the numerical rank of A using its singular values.
LA.ROWFunctionLinear algebra / EigenCreates a 1 x n row vector. It can still be read with one index, for example r[0].
LA.ROWSFunctionLinear algebra / EigenReturns the number of rows. A 1D vector reports rows = length.
LA.SCALEFunctionLinear algebra / EigenMultiplies all matrix elements by scalar s.
LA.SHAPEFunctionLinear algebra / EigenReturns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2.
LA.SINFunctionLinear algebra / EigenElement-wise sine.
LA.SINCFunctionLinear algebra / EigenElement-wise sin(x)/x with the correct value 1 near zero.
LA.SOLVEFunctionLinear algebra / EigenSolves A*x=b with Eigen QR decomposition.
LA.SQRTFunctionLinear algebra / EigenElement-wise square root.
LA.SUBFunctionLinear algebra / EigenElement-wise matrix subtraction; A and B must have the same shape.
LA.SVD_SFunctionLinear algebra / EigenReturns the singular values of A.
LA.SVD_UFunctionLinear algebra / EigenReturns the thin U matrix from the singular value decomposition A = U*S*V^T.
LA.SVD_VFunctionLinear algebra / EigenReturns the thin V matrix from the singular value decomposition A = U*S*V^T.
LA.TO_IMAGEFunctionLinear algebra / EigenConverts a numeric matrix to a grayscale image, optionally normalized to 0..255.
LA.TRACEFunctionLinear algebra / EigenReturns the sum of the diagonal of A.
LA.TRANSPOSEFunctionLinear algebra / EigenReturns the transpose of a vector or matrix.
LA.VECFunctionLinear algebra / EigenCreates a compact 1D numeric vector. Direct indexing works as v[0].
LA.VERSIONFunctionLinear algebra / EigenReturns the Eigen version detected at compile time.
LA.ZEROSFunctionLinear algebra / EigenCreates a numeric matrix initialized to zero.
LANG.CATALOG_WARNINGSFunctionLanguage introspectionReturns a 1D array with registry/catalog drift diagnostics. Empty array means no warnings.
LANG.CATEGORYFunctionLanguage introspectionReturns the documentation/help category for a public symbol.
LANG.COMMANDSFunctionLanguage introspectionReturns a 1D array containing all public command names.
LANG.EXISTSFunctionLanguage introspectionReturns TRUE if name is a public command, function, keyword, or documented catalog symbol.
LANG.FUNCTIONSFunctionLanguage introspectionReturns a 1D array containing all public function names.
LANG.HEADLESSFunctionLanguage introspectionReturns TRUE for symbols that can be used safely in batch/headless scripts, and FALSE for explicit GUI/interactive symbols.
LANG.HELPFunctionLanguage introspectionReturns a compact multi-line help block with name, kind, signature and description.
LANG.KINDFunctionLanguage introspectionReturns Command, Function, Keyword, or an empty string when the symbol is unknown.
LANG.SIGNATUREFunctionLanguage introspectionReturns the documented or registry-derived signature of a public symbol.
LANG.SYMBOLSFunctionLanguage introspectionReturns a 1D array containing public commands, public functions and language keywords.
LANG.USERLIB_REPORTFunctionLanguage introspectionReturns a multi-line diagnostic report with loaded user libraries, exported symbols, argument ranges, SDK data types and warnings.
LANG.USERLIB_SYMBOLSFunctionLanguage introspectionReturns a 1D array with public symbols registered by external user libraries.
LANG.USERLIB_TYPESFunctionLanguage introspectionReturns a 1D array describing the data types currently exposed by the external user-library SDK.
LANG.USERLIBSFunctionLanguage introspectionReturns a 1D array with the loaded external cvBasic user libraries.
LANG.VERSIONFunctionLanguage introspectionReturns the cvBasic language/runtime version string.
LETKeywordLanguage keywordsExplicit assignment; equivalent to using =. Variables are case-insensitive: k and K are the same variable, so scientific scripts should prefer descriptive names such as springK and kinEnergy. Array elements may be assigned with A[i,j] = value or legacy A(i,j) = value.
MASK.APPLYFunctionMask geometry functionsReturns image/stack pixels inside the mask unchanged and replaces outside pixels with background. Single images/masks broadcast across stacks.
MASK.AREAFunctionMask geometry functionsAlias-style semantic count of foreground pixels. For a rectangular single-frame mask it equals RECT.AREA(rect).
MASK.BBOXFunctionMask geometry functionsReturns the half-open RECT bounding box of all non-zero mask pixels in the selected frame.
MASK.COUNTFunctionMask geometry functionsCounts foreground pixels, where any non-zero channel marks a foreground pixel. For stacks, counts all frames.
MASK.COUNT_NONZEROFunctionMask geometry functionsCompatibility alias for COUNT_NONZERO / MASK.COUNT.
MASK.EMPTYFunctionMask geometry functionsReturns TRUE if the mask has no foreground pixels.
MASK.FROM_ROIFunctionMask geometry functionsCreates a mask from the programmatic ROI stored on an image or stack.
MASK.INVERTFunctionMask geometry functionsReturns the binary inverse of a mask, using 0 for foreground and 255 for background.
MASK.RECTFunctionMask geometry functionsCreates a binary mask image from a RECT geometry or explicit x,y,w,h coordinates. The rectangle is clipped to the mask bounds.
MASK.TO_ROIFunctionMask geometry functionsWith one mask returns MASK.BBOX. With image+mask returns a copy of the image with ROI set to the mask bounding box.
MASK.VALIDFunctionMask geometry functionsReturns TRUE when the argument is a non-empty image/stack that can be treated as a mask.
MAT3D.CLOSECommandHybrid 3D commandsCloses a Mat3D window by handle.
MAT3D.CREATEFunctionHybrid 3D functionsCreates an interactive Mat3D MDI window and returns a numeric handle. X/Y are pixels and Z is luminance.
MAT3D.OPTIONSCommandHybrid 3D commandsControls Z normalization, inversion, Y flip, decimation, Z scale/offset and the color legend.
MAT3D.PALETTECommandHybrid 3D commandsApplies a QwtPlot3D .map palette file, or resets to the standard palette when omitted.
MAT3D.SETCommandHybrid 3D commandsUpdates an existing Mat3D window with a new image or with one selected frame from a stack.
MAT3D.SHOWFunctionHybrid 3D functionsCreates a Mat3D window, displays the first frame of an image/stack, and returns the Mat3D handle.
MAT3D.SNAPSHOTCommandHybrid 3D commandsSaves the current Mat3D view as PNG/JPG/BMP/PDF/EPS/TIF according to file extension.
MAT3D.STYLECommandHybrid 3D commandsSets surface style. plotStyle: POINTS, WIREFRAME, HIDDENLINE, POLYGON, FILLEDMESH. floorStyle: NONE, DATA, ISO. coordStyle: NONE, FRAME, BOX.
MAT3D.VIEWCommandHybrid 3D commandsSets the 3D view rotation and optional zoom.
MATH.ABSFunctionMath and numeric functionsAbsolute numeric value.
MATH.ACOSFunctionMath and numeric functionsInverse cosine, returning radians.
MATH.ACOSHFunctionMath and numeric functionsInverse hyperbolic cosine.
MATH.ASINFunctionMath and numeric functionsInverse sine, returning radians.
MATH.ASINHFunctionMath and numeric functionsInverse hyperbolic sine.
MATH.ATANFunctionMath and numeric functionsInverse tangent, returning radians.
MATH.ATAN2FunctionMath and numeric functionsTwo-argument inverse tangent, returning radians.
MATH.ATANHFunctionMath and numeric functionsInverse hyperbolic tangent.
MATH.CBRTFunctionMath and numeric functionsCube root.
MATH.CEILFunctionMath and numeric functionsRounds toward positive infinity.
MATH.COSFunctionMath and numeric functionsCosine of the angle in radians.
MATH.COSHFunctionMath and numeric functionsHyperbolic cosine.
MATH.DOUBLEFunctionMath and numeric functionsConverts the value to double.
MATH.EXPFunctionMath and numeric functionsNatural exponential e^x.
MATH.EXP2FunctionMath and numeric functionsBase-2 exponential 2^x.
MATH.EXPM1FunctionMath and numeric functionsComputes e^x - 1 with improved small-value accuracy.
MATH.FLOORFunctionMath and numeric functionsRounds toward negative infinity.
MATH.FMODFunctionMath and numeric functionsFloating-point remainder with truncation-based quotient.
MATH.HYPOTFunctionMath and numeric functionsEuclidean norm sqrt(a*a + b*b).
MATH.INTFunctionMath and numeric functionsConverts the value to a truncated integer.
MATH.LOGFunctionMath and numeric functionsNatural logarithm.
MATH.LOG10FunctionMath and numeric functionsBase-10 logarithm.
MATH.LOG1PFunctionMath and numeric functionsComputes log(1+x) with improved small-value accuracy.
MATH.LOG2FunctionMath and numeric functionsBase-2 logarithm.
MATH.MAXFunctionMath and numeric functionsReturns the larger of two numeric values.
MATH.MINFunctionMath and numeric functionsReturns the smaller of two numeric values.
MATH.POWFunctionMath and numeric functionsRaises a base to an exponent.
MATH.REMAINDERFunctionMath and numeric functionsIEEE-style floating-point remainder.
MATH.ROUNDFunctionMath and numeric functionsRounds to the nearest integer, half away from zero.
MATH.SINFunctionMath and numeric functionsSine of the angle in radians.
MATH.SINHFunctionMath and numeric functionsHyperbolic sine.
MATH.SQRTFunctionMath and numeric functionsSquare root.
MATH.TANFunctionMath and numeric functionsTangent of the angle in radians.
MATH.TANHFunctionMath and numeric functionsHyperbolic tangent.
MATH.TRUNCFunctionMath and numeric functionsTruncates the fractional part.
MATH.TYPEFunctionMath and numeric functionsReturns NUMBER, BOOL, STRING, IMAGE, STACK, ARRAY or NULL.
META.CLEARFunctionMetadata functionsClears all user metadata, or only the selected key when key is provided.
META.FROM_TEXTFunctionMetadata functionsApplies cvBasic sidecar text back to an existing image or stack object and returns it.
META.GETFunctionMetadata functionsReturns user metadata as readable key=value lines.
META.HASFunctionMetadata functionsReturns TRUE when a metadata key exists on the image or stack.
META.KEYSFunctionMetadata functionsReturns all user metadata keys as newline-separated text.
META.SETFunctionMetadata functionsStores a user key/value metadata pair directly in an image or stack object and returns the same object.
META.TO_TEXTFunctionMetadata functionsSerializes image dimensions, ROI state and user metadata into cvBasic sidecar text.
META.VALUEFunctionMetadata functionsReturns the metadata value for key, or fallback when the key is absent.
NEXTKeywordLanguage keywordsCloses the FOR loop.
NOTKeywordLanguage keywordsLogical negation.
ORKeywordLanguage keywordsLogical OR operator.
PARAMS.ADD_BOOLCommandParameter editor commandsAdds a checkbox bound to an already-defined script variable.
PARAMS.ADD_COLORCommandParameter editor commandsAdds a color selector bound to an already-defined string variable such as #00ff00.
PARAMS.ADD_COMBOCommandParameter editor commandsAdds a combo box bound to an already-defined script variable. String variables receive the selected text; numeric variables receive the selected index.
PARAMS.ADD_DIRCommandParameter editor commandsAdds a directory selector bound to an already-defined string variable.
PARAMS.ADD_DOUBLECommandParameter editor commandsAdds a double spin box bound to an already-defined script variable. The variable name is passed without quotes.
PARAMS.ADD_FILECommandParameter editor commandsAdds an open-file path selector bound to an already-defined string variable.
PARAMS.ADD_INTCommandParameter editor commandsAdds an integer spin box bound to an already-defined script variable.
PARAMS.ADD_SAVEFILECommandParameter editor commandsAdds a save-file path selector bound to an already-defined string variable.
PARAMS.ADD_STRINGCommandParameter editor commandsAdds a line edit bound to an already-defined script variable.
PARAMS.CLEAR_DIRTYCommandParameter editor commandsClears the dirty flag of a LIVE ParamsEditor panel.
PARAMS.CLOSECommandParameter editor commandsCloses and destroys a ParamsEditor panel.
PARAMS.CREATEFunctionParameter editor functionsCreates a ParamsEditor panel and returns a numeric handle. Mode is DIALOG by default or LIVE for a non-modal panel.
PARAMS.DIRTYFunctionParameter editor functionsTRUE when the user has modified at least one widget since the last PARAMS.CLEAR_DIRTY.
PARAMS.EXECFunctionParameter editor functionsRuns the panel as a modal dialog. Variables are updated only if OK is pressed; the dialog session is destroyed on exit.
PARAMS.HELPCommandParameter editor commandsAdds or replaces the ParamsEditor Help tab with HTML text.
PARAMS.IS_OPENFunctionParameter editor functionsTRUE while a LIVE ParamsEditor window is visible.
PARAMS.LOADCommandParameter editor commandsLoads widget values from a ParamsEditor XML file.
PARAMS.SAVECommandParameter editor commandsSaves widget values to a ParamsEditor XML file.
PARAMS.SHOWCommandParameter editor commandsShows a LIVE ParamsEditor panel as a non-modal always-on-top window.
PARAMS.SYNCCommandParameter editor commandsCopies current LIVE widget values back into the bound script variables.
PARAMS.TABFunctionParameter editor functionsAdds a tab to a ParamsEditor panel and returns its zero-based index.
PLOT.BARCommandStatic plot statementsCreates a bar-chart image from newline-separated numeric values.
PLOT.XYCommandStatic plot statementsCreates a chart image from newline-separated X,Y numeric pairs.
PLOT.YCommandStatic plot statementsCreates a chart image from newline-separated numeric Y values.
PRINTCommandCore statementsWrites the provided values to the log output.
RECT.AREAFunctionGeometry functionsReturns w*h for valid rectangles, otherwise 0.
RECT.CLIPFunctionGeometry functionsClips a rectangle to image bounds [0,width) x [0,height).
RECT.CREATEFunctionGeometry functionsCreates a half-open pixel rectangle represented by x,y,w,h. XEND is x+w and YEND is y+h.
RECT.EMPTYFunctionGeometry functionsReturns TRUE when rect has zero/negative width or height.
RECT.EQUALFunctionGeometry functionsReturns TRUE when x,y,w,h are identical.
RECT.FROM_TEXTFunctionGeometry functionsReads a rectangle from RECT(x,y,w,h), RECT:x,y,w,h, or plain x,y,w,h text.
RECT.HFunctionGeometry functionsReturns the rectangle height in pixels.
RECT.INTERSECTFunctionGeometry functionsReturns the half-open intersection of two rectangles, or an empty rectangle when they do not overlap.
RECT.TO_TEXTFunctionGeometry functionsSerializes a rectangle as RECT(x,y,w,h).
RECT.UNIONFunctionGeometry functionsReturns the smallest half-open rectangle containing both valid rectangles.
RECT.VALIDFunctionGeometry functionsReturns TRUE when rect has strictly positive width and height.
RECT.WFunctionGeometry functionsReturns the rectangle width in pixels.
RECT.XFunctionGeometry functionsReturns the first included X pixel coordinate.
RECT.XENDFunctionGeometry functionsReturns the exclusive end X coordinate x+w.
RECT.YFunctionGeometry functionsReturns the first included Y pixel coordinate.
RECT.YENDFunctionGeometry functionsReturns the exclusive end Y coordinate y+h.
REMKeywordLanguage keywordsStarts a BASIC-style comment. Text after REM is ignored when REM is used as a standalone token.
REPORT.ADD_CODEFunctionReport functionsAdds escaped preformatted code or log text.
REPORT.ADD_DIVIDERFunctionReport functionsAdds a horizontal divider.
REPORT.ADD_HTMLFunctionReport functionsReturns a report with a raw HTML block appended. Use only for trusted/generated HTML.
REPORT.ADD_IMAGEFunctionReport functionsReturns a report with an image embedded as PNG/base64. For stacks, frame selects the frame to embed.
REPORT.ADD_IMAGE_FILEFunctionReport functionsEmbeds an existing PNG/JPEG/GIF/WEBP/SVG image file as base64 in the report.
REPORT.ADD_KVFunctionReport functionsAdds one key/value row as a compact table.
REPORT.ADD_LISTFunctionReport functionsAdds a bullet list from a newline separated string or an array.
REPORT.ADD_METRICFunctionReport functionsAdds a metric card suitable for summaries and dashboards.
REPORT.ADD_NOTEFunctionReport functionsAdds an emphasized note block. Kind may be INFO, SUCCESS, WARNING or DANGER.
REPORT.ADD_SECTIONFunctionReport functionsReturns a report with a section heading appended. Level is clamped to H2..H4.
REPORT.ADD_TABLEFunctionReport functionsReturns a report with a 1D/2D ARRAY/TABLE rendered as an HTML table. Optional headers may be a comma/pipe separated string or a 1D array.
REPORT.ADD_TABLE_HEADERSFunctionReport functionsAdds a table with explicit column headers. Headers may be a comma/pipe/semicolon separated string or an array.
REPORT.ADD_TEXTFunctionReport functionsReturns a report with an escaped text paragraph appended.
REPORT.CREATEFunctionReport functionsCreates a closed HTML report object represented as text. Use REPORT.ADD_* to append items and REPORT.SAVE_HTML to write it.
REPORT.FROM_TEXTFunctionReport functionsReads a report back from text, wrapping plain fragments in a valid report document if needed.
REPORT.ITEM_COUNTFunctionReport functionsReturns the number of appended report items.
REPORT.SAVEFunctionReport functionsAlias of REPORT.SAVE_HTML(report,path).
REPORT.SAVE_HTMLFunctionReport functionsWrites the closed report to a UTF-8 HTML file and returns TRUE on success. REPORT.SAVE is an alias.
REPORT.TITLEFunctionReport functionsReturns the report title extracted from the H1 heading.
REPORT.TO_TEXTFunctionReport functionsSerializes a report to text. In the current implementation the report is already an HTML text object.
RETURNKeywordLanguage keywordsExits the current SUB or returns expr from the current FUNCTION.
ROI.AREAFunctionROI functionsReturns the ROI area in pixels.
ROI.CHANGEFunctionROI functionsReturns the last ROI change kind, such as set, clear, from_desktop, explicit, create, move, resize or frame. For image objects this metadata remains readable after ROI.CLEAR.
ROI.CLEARFunctionROI functionsClears a programmatic image ROI, or clears a GUI window ROI when source is a title string.
ROI.EXTRACTFunctionROI functionsExtracts the stored, explicit or RECT-based ROI as a new single-image patch. Works with image objects and, when a GUI host exists, desktop window titles.
ROI.FRAMEFunctionROI functionsReturns the frame index associated with the ROI.
ROI.FROM_DESKTOPFunctionROI functionsCopies the current interactive GUI ROI from a named window into an image/stack object.
ROI.HFunctionROI functionsReturns the ROI height in pixels.
ROI.MAXFunctionROI functionsReturns the maximum sample value inside a stored or temporary ROI.
ROI.MEANFunctionROI functionsReturns the mean of all samples inside a stored or temporary ROI.
ROI.MINFunctionROI functionsReturns the minimum sample value inside a stored or temporary ROI.
ROI.RECTFunctionROI functionsReturns the current or temporary ROI as a RECT-compatible value [x,y,w,h]. This closes the ROI/RECT geometry loop.
ROI.REVISIONFunctionROI functionsReturns the monotonic ROI revision counter for stored programmatic/GUI ROIs. Explicit temporary ROIs return 0. For image objects this metadata remains readable after ROI.CLEAR.
ROI.SETFunctionROI functionsStores a programmatic ROI inside an image/stack object and returns the same object. This is headless-safe.
ROI.SET_RECTFunctionROI functionsStores a programmatic ROI using a RECT value returned by RECT.CREATE, RECT.FROM_TEXT, RECT.CLIP, RECT.INTERSECT or ROI.RECT. The RECT is clipped to image bounds and the same image object is returned.
ROI.STDDEVFunctionROI functionsReturns the standard deviation of all samples inside a stored or temporary ROI.
ROI.SUMFunctionROI functionsReturns the sum of all samples inside a stored or temporary ROI.
ROI.VALIDFunctionROI functionsReturns TRUE if a ROI is available or if the explicit ROI coordinates are valid. Source may be an image/stack object or a GUI window title.
ROI.WFunctionROI functionsReturns the ROI width in pixels.
ROI.XFunctionROI functionsReturns the ROI left coordinate.
ROI.X2FunctionROI functionsReturns the Qt-style inclusive right ROI coordinate. Prefer ROI.XEND for the half-open exclusive end coordinate.
ROI.XENDFunctionROI functionsReturns the exclusive half-open end coordinate x+w, aligned with RECT.XEND and OpenCV cv::Rect.
ROI.YFunctionROI functionsReturns the ROI top coordinate.
ROI.Y2FunctionROI functionsReturns the Qt-style inclusive bottom ROI coordinate. Prefer ROI.YEND for the half-open exclusive end coordinate.
ROI.YENDFunctionROI functionsReturns the exclusive half-open end coordinate y+h, aligned with RECT.YEND and OpenCV cv::Rect.
SERIAL.ADDFunctionOpenCV / media functionsLibrary: Serial user library 1.0.0 Returns a + b.
SERIAL.HELLOCommandOther image / stack statementsLibrary: Serial user library 1.0.0 Prints a greeting from the DLL.
SERIAL.VERSIONFunctionOpenCV / media functionsLibrary: Serial user library 1.0.0 Returns the library version string.
SIGNAL.SPECTRUMFunctionSignal functionsComputes a Hann-windowed DFT magnitude spectrum from a numeric signal. Returns an Nx2 array: frequency Hz, magnitude.
STACKKeywordLanguage keywordsLogical type returned by TYPE(x) for frame stacks.
STACK.ABSDIFF_PREVCommandStack / frame statementsBuilds a stack of absolute differences between consecutive frames. Output frames = input frames - 1.
STACK.APPENDCommandStack / frame statementsAppends one image or all frames from another stack to an existing stack. All frames must have the same size and OpenCV type.
STACK.AVERAGECommandStack / frame statementsReduces a stack to a single average image.
STACK.DELETECommandStack / frame statementsRemoves one zero-based frame and returns a new stack. The command refuses to produce an empty stack.
STACK.FPSFunctionStack / frame functionsFPS associated with the video stack.
STACK.FRAMEFunctionStack / frame functionsExtracts a stack frame as a single image.
STACK.FRAMESFunctionStack / frame functionsNumber of frames in the stack, or 1 for a single image.
STACK.FROM_IMAGESCommandStack / frame statementsCreates a stack directly from images generated or loaded at runtime. All frames must have the same size and OpenCV type.
STACK.INSERTCommandStack / frame statementsInserts one image, or all frames from another stack, at zero-based index. Index 0 inserts before the first frame; index STACK.FRAMES(st) appends at the end.
STACK.INTERPOLATECommandStack / frame statementsUpsamples a stack by inserting interpolated frames between each original pair. Methods: LINEAR/BLEND or NEAREST. Output FPS is source FPS multiplied by factor when source FPS is known.
STACK.MAX_IMAGECommandStack / frame statementsReduces a stack to a per-pixel temporal maximum image.
STACK.MEAN_SIGNALFunctionStack / frame functionsReturns one temporal sample per frame, computed as frame mean. mode defaults to GRAY; also supports ALL, B, G, R and A.
STACK.MEDIANCommandStack / frame statementsReduces a stack to a robust per-pixel median image.
STACK.MIN_IMAGECommandStack / frame statementsReduces a stack to a per-pixel temporal minimum image.
STACK.PIXEL_SERIESFunctionStack / frame functionsReturns the temporal series of one pixel/channel as a numeric array.
STACK.RANGECommandStack / frame statementsExtracts a sub-stack starting at zero-based frame index first and containing up to count frames.
STACK.RESAMPLE_FPSCommandStack / frame statementsResamples a stack to a requested FPS using temporal interpolation. Requires a valid source FPS greater than zero. Methods: LINEAR/BLEND or NEAREST.
STACK.SET_FPSCommandStack / frame statementsSets FPS metadata on a stack without changing pixels. Useful for synthetic/image-sequence stacks before STACK.RESAMPLE_FPS.
STACK.STABILIZECommandStack / frame statementsStabilizes all frames onto one reference frame. Methods: TRANSLATION, AFFINE, ORB_HOMOGRAPHY. A second output variable receives a transform table: frame, methodCode, quality, inliers, and 3x3 matrix coefficients.
STACK.STDDEV_IMAGECommandStack / frame statementsReduces a stack to a 32/64-bit standard-deviation image that maps temporal variability per pixel.
STACK.TEMPORAL_FILTERCommandStack / frame statementsApplies a centered temporal moving-window filter to each frame. Methods: MEAN/AVG, MEDIAN, MIN, MAX. Edges use the available clipped window.
STEPKeywordLanguage keywordsIncrement of the numeric FOR loop.
SUBKeywordLanguage keywordsStarts a named subroutine block. The block is skipped during normal flow and executed only by CALL.
SWITCHKeywordLanguage keywordsStarts a multi-branch selection block. The expression is evaluated once and compared with each CASE value, range or numeric comparison.
SYS.ARGFunctionSystem functionsReturns one zero-based positional command-line argument, or an empty string when out of range.
SYS.ARGCFunctionSystem functionsReturns the number of positional arguments passed after the script name on the command line.
SYS.CWDFunctionSystem functionsReturns the current process working directory.
SYS.GETFunctionSystem functionsReturns a named parameter passed with --set name=value; optional second argument is the default value.
SYS.HASFunctionSystem functionsTRUE if a named parameter was passed with --set name=value.
SYS.SCRIPT_DIRFunctionSystem functionsAbsolute directory containing the currently loaded .cvb script.
SYS.SCRIPT_PATHFunctionSystem functionsAbsolute path of the currently loaded .cvb script.
TABLE.CELLFunctionTable functionsReads one zero-based table cell.
TABLE.COLSFunctionTable functionsReturns the number of columns in a 2D array table.
TABLE.COLUMNFunctionTable functionsAlias of ARRAY.COLUMN for table-like 2D arrays.
TABLE.ROWFunctionTable functionsAlias of ARRAY.ROW for table-like 2D arrays.
TABLE.ROWSFunctionTable functionsReturns the number of rows in a 2D array table.
TEXT.CONTAINSFunctionText functionsReturns TRUE if value contains the requested text fragment.
TEXT.INDEX_OFFunctionText functionsReturns the zero-based index of fragment in value, or -1 when absent.
TEXT.LEFTFunctionText functionsReturns the first N characters.
TEXT.LENFunctionText functionsLength of the value converted to text.
TEXT.LINE_COUNTFunctionText functionsCounts lines in a text block. Empty text returns 0; both LF and CRLF are supported.
TEXT.LINE_ITEMFunctionText functionsReturns one zero-based line from a text block. Out-of-range indices return an empty string.
TEXT.LOWERFunctionText functionsConverts text to lowercase.
TEXT.MIDFunctionText functionsExtracts a substring starting at a given position.
TEXT.REPLACEFunctionText functionsReplaces one substring with another.
TEXT.RIGHTFunctionText functionsReturns the last N characters.
TEXT.STRFunctionText functionsConverts the value to string.
TEXT.TRIMFunctionText functionsRemoves leading and trailing spaces.
TEXT.UPPERFunctionText functionsConverts text to uppercase.
THENKeywordLanguage keywordsSeparates the condition from the true branch. A statement after THEN creates a one-line IF.
TIME.DELAY_MSCommandTime statementsPauses script execution for the requested number of milliseconds while keeping STOP responsive.
TIME.ELAPSED_MSFunctionTime functionsReturns monotonic milliseconds elapsed since TIMER_RESET was called for the named timer.
TIME.TICK_MSFunctionTime functionsReturns monotonic milliseconds elapsed since the current script runtime started or was cleared.
TIME.TIMER_RESETCommandTime statementsCreates or resets a named monotonic timer inside the current script runtime.
TOKeywordLanguage keywordsSpecifies the final value of the FOR loop.
TRUEKeywordLanguage keywordsBoolean true constant.
TRYKeywordLanguage keywordsStarts a protected block. Runtime errors raised before CATCH are intercepted instead of stopping the script.
USINGKeywordLanguage keywordsIncludes another cvBasic source file before execution. Relative paths are resolved from the current script or included file directory; recursive include cycles are rejected. INCLUDE is an exact alias of USING. Rev 10.0 also supports ':' between simple statements and '_' as a line-continuation marker.
VEC.ANIM.CIRCLECommandVector animation statementsAlias of VEC.ANIM.ORBIT.
VEC.ANIM.MOVECommandVector animation statementsAnimates the item position. loops=1 runs once; loops=0 loops forever; yoyo=TRUE reverses every other loop.
VEC.ANIM.OPACITYCommandVector animation statementsAnimates item opacity between two values in range 0..1.
VEC.ANIM.OPACITY_KEYFRAMESCommandVector animation statementsAnimates item opacity using absolute time/value keyframes. This is useful for discrete states: switches, traffic lights, phase indicators, etc. loops=0 loops forever.
VEC.ANIM.OPACITY_PATHCommandVector animation statementsAlias of VEC.ANIM.OPACITY_KEYFRAMES.
VEC.ANIM.ORBITCommandVector animation statementsAnimates an item on a circular orbit around a center point. Alias: VEC.ANIM.CIRCLE.
VEC.ANIM.PATHCommandVector animation statementsAnimates an item along a polyline trajectory. Very useful for physics/mathematics demonstrations. Alias: VEC.ANIM.TRAJECTORY.
VEC.ANIM.ROTATECommandVector animation statementsAnimates the item rotation in degrees.
VEC.ANIM.ROTATE_PATHCommandVector animation statementsAnimates item rotation through a list of angle keyframes. This is more useful than linear rotation for physics, because the angle can come from a numerical simulation. Alias: VEC.ANIM.ROTATION_PATH.
VEC.ANIM.ROTATION_PATHCommandVector animation statementsAlias of VEC.ANIM.ROTATE_PATH.
VEC.ANIM.SCALECommandVector animation statementsAnimates uniform scale, useful for pulsating markers or attention cues.
VEC.ANIM.STATECommandVector animation statementsAlias of VEC.ANIM.OPACITY_KEYFRAMES, intended for visibility/state timelines.
VEC.ANIM.STOPCommandVector animation statementsStops animations. Omit itemId or pass 0 to stop all animations on the canvas.
VEC.ANIM.TRAJECTORYCommandVector animation statementsAlias of VEC.ANIM.PATH.
VEC.ANIM.VISIBLE_TIMELINECommandVector animation statementsAlias of VEC.ANIM.OPACITY_KEYFRAMES.
VEC.ARROWCommandVector canvas statementsAdds a line with a simple arrow head, useful for annotations and motion/vector diagrams.
VEC.ARROW_IDFunctionVector canvas functionsFunction form of VEC.ARROW. It returns the item id.
VEC.AXESCommandVector canvas statementsDraws X/Y axes with optional ticks. This is intentionally simple and script-friendly.
VEC.BATCHCommandVector canvas statementsTemporarily freezes viewport repaints/info-label updates while many vector items are created. Use VEC.BATCH v, TRUE before a heavy plot block and VEC.BATCH v, FALSE after it. Alias: VEC.FREEZE.
VEC.BRUSHCommandVector canvas statementsSets the fill brush for rectangles and ellipses. Use TRANSPARENT/NONE to draw outlines only.
VEC.CAPTURE_AVICommandVector export and capture statementsCaptures the animated vector canvas directly to an AVI file. Default codec is MJPG; aliases: VEC.SAVE_AVI and VEC.EXPORT_AVI.
VEC.CAPTURE_FRAMESCommandVector export and capture statementsAlias of VEC.CAPTURE_PNG.
VEC.CAPTURE_PNGCommandVector export and capture statementsCaptures a sequence of PNG frames from the current canvas while active animations are running. Aliases: VEC.CAPTURE_FRAMES and VEC.EXPORT_FRAMES.
VEC.CAPTURE_STACKFunctionVector canvas functionsCaptures the animated vector canvas into a stack/image-sequence object that can be passed to GUI.SHOW or saved by the normal image/stack pipeline. Alias: VEC.STACK.
VEC.CLEARCommandVector canvas statementsRemoves all vector items from the selected canvas without destroying the window.
VEC.CLOSECommandVector canvas statementsCloses a vector canvas window.
VEC.CREATEFunctionVector canvas functionsCreates an interactive vector canvas and returns a numeric handle. The canvas is a scriptable QGraphicsScene-based whiteboard that can be exported to SVG or rasterized back to a Mat.
VEC.ELLIPSECommandVector canvas statementsAdds an ellipse inscribed in the rectangle x,y,w,h using the current pen and brush.
VEC.ELLIPSE_IDFunctionVector canvas functionsFunction form of VEC.ELLIPSE. It adds the ellipse and returns its item id.
VEC.EXPORT_AVICommandVector export and capture statementsAlias of VEC.CAPTURE_AVI.
VEC.EXPORT_FRAMESCommandVector export and capture statementsAlias of VEC.CAPTURE_PNG.
VEC.FLUSHCommandVector canvas statementsAlias of VEC.SYNC.
VEC.FONTCommandVector canvas statementsSets the current font used by VEC.TEXT.
VEC.FRAMEFunctionVector canvas functionsAlias of VEC.MAT, named for animated/capture workflows: returns the current canvas frame as Mat.
VEC.FRAME_PNGCommandVector export and capture statementsAlias of VEC.SAVE_FRAME.
VEC.FREEZECommandVector canvas statementsAlias of VEC.BATCH.
VEC.GRIDCommandVector canvas statementsDraws a lightweight grid as one vector item. It is useful as a plotting/geometry reference layer.
VEC.IMAGECommandVector canvas statementsInserts the first frame of an image/stack into the vector canvas. If w and h are positive the image is scaled; opacity is 0..1.
VEC.IMAGE_IDFunctionVector canvas functionsFunction form of VEC.IMAGE. It adds the image layer and returns its item id.
VEC.ITEM.CENTER_XFunctionVector item query functionsReturns the current scene-center x coordinate of a vector item.
VEC.ITEM.CENTER_YFunctionVector item query functionsReturns the current scene-center y coordinate of a vector item.
VEC.ITEM.DRAGGABLECommandVector item statementsAlias of VEC.ITEM.MOVABLE.
VEC.ITEM.MOVABLECommandVector item statementsMakes an item draggable with the mouse inside the vector canvas. Movable items are also made selectable. Alias: VEC.ITEM.DRAGGABLE.
VEC.ITEM.MOVECommandVector item statementsAlias of VEC.ITEM.POS.
VEC.ITEM.OPACITYCommandVector item statementsSets opacity 0..1 for one existing item.
VEC.ITEM.OPACITY_VALUEFunctionVector item query functionsReturns the current opacity value of a vector item.
VEC.ITEM.ORIGINCommandVector item statementsSets the local transform origin/pivot for rotation and scale. Alias: VEC.ITEM.PIVOT. This is important for physical systems such as pendulums, levers and rotating arms.
VEC.ITEM.PIVOTCommandVector item statementsAlias of VEC.ITEM.ORIGIN.
VEC.ITEM.POSCommandVector item statementsSets the position transform of an existing vector item. Alias: VEC.ITEM.MOVE.
VEC.ITEM.ROTATECommandVector item statementsRotates an existing vector item around its local bounding-box center.
VEC.ITEM.ROTATIONFunctionVector item query functionsReturns the current rotation angle of a vector item in degrees.
VEC.ITEM.SCALECommandVector item statementsScales an existing item around its local bounding-box center. If sy is omitted, sx is used for both axes.
VEC.ITEM.SELECTABLECommandVector item statementsEnables or disables mouse selection for an existing vector item.
VEC.ITEM.XFunctionVector item query functionsReturns the current x position transform of a vector item.
VEC.ITEM.YFunctionVector item query functionsReturns the current y position transform of a vector item.
VEC.ITEM.ZCommandVector item statementsChanges the z-order of an existing item.
VEC.ITEM_COUNTFunctionVector canvas functionsReturns the number of registered vector items in the canvas.
VEC.LAST_ITEMFunctionVector canvas functionsReturns the numeric id of the last vector item created on the canvas. This id can be used by VEC.ITEM.* and VEC.ANIM.* commands.
VEC.LAYERCommandVector layer statementsAlias of VEC.LAYER.SELECT.
VEC.LAYER.CLEARCommandVector layer statementsDeletes all vector items assigned to the selected layer. Useful for interactive redraw loops where a dynamic overlay is recalculated.
VEC.LAYER.SELECTCommandVector layer statementsSelects the current drawing layer. New vector items are assigned to that layer. The default layer is named default.
VEC.LAYER.SHOWCommandVector layer statementsAlias of VEC.LAYER.VISIBLE.
VEC.LAYER.VISIBLECommandVector layer statementsShows or hides all items belonging to a layer. Alias: VEC.LAYER.SHOW.
VEC.LINECommandVector canvas statementsAdds a line using the current pen.
VEC.LINE_IDFunctionVector canvas functionsFunction form of VEC.LINE. It adds the line and returns its item id.
VEC.MATFunctionVector canvas functionsRasterizes the current vector canvas and returns it as an image/Mat value. By default it produces a normal 3-channel BGR Mat; with transparent=TRUE it keeps an alpha channel and makes the background transparent.
VEC.NEWFunctionVector canvas functionsAlias of VEC.CREATE.
VEC.OPACITYCommandVector canvas statementsSets the default opacity for following vector items. Opacity is 0..1.
VEC.PENCommandVector canvas statementsSets the current stroke color, width and style for following vector primitives. Colors are Qt names or #RRGGBB. Styles: SOLID, DASH, DOT, DASHDOT, DASHDOTDOT, NONE.
VEC.PLOT.AREACommandVector plot statementsDraws a filled area under a data polyline down to a baseline. Use VEC.BRUSH before the command to choose the fill color; alias: VEC.PLOT.FILL.
VEC.PLOT.AXESCommandVector plot statementsDraws a scientific plot frame in the given rectangle, including border, tick marks, optional grid and zero axes when visible in range.
VEC.PLOT.BARCommandVector plot statementsAlias of VEC.PLOT.BARS.
VEC.PLOT.BARSCommandVector plot statementsDraws a categorical bar plot from a numeric list. The current brush fills the bars, and the current pen outlines them.
VEC.PLOT.FILLCommandVector plot statementsAlias of VEC.PLOT.AREA.
VEC.PLOT.FUNCTIONCommandVector plot statementsEvaluates a function of x and plots it as a polyline. The expression can use normal math functions such as SIN, COS, EXP, SQRT, etc. When autoScale is TRUE the y range is estimated from the sampled values.
VEC.PLOT.FUNCTION_IDFunctionVector plot functionsFunction form of VEC.PLOT.FUNCTION. It returns the created item id of the plotted curve.
VEC.PLOT.HISTCommandVector plot statementsAlias of VEC.PLOT.HISTOGRAM.
VEC.PLOT.HISTOGRAMCommandVector plot statementsBuilds a histogram from a numeric list. If xMin=xMax the range is auto-estimated; if yMax<=0 the histogram height is auto-scaled. Alias: VEC.PLOT.HIST.
VEC.PLOT.LABELSCommandVector plot statementsAdds title, X label and Y label to a plot rectangle. The Y label is rotated vertically.
VEC.PLOT.LEGENDCommandVector plot statementsDraws a small legend box. Each item uses color|label syntax; comma is also accepted as separator.
VEC.PLOT.PARAMETRICCommandVector plot statementsEvaluates a parametric curve using variable t and plots it in the selected rectangle. Useful for circles, spirals, Lissajous figures and many mathematical curves.
VEC.PLOT.PARAMETRIC_IDFunctionVector plot functionsFunction form of VEC.PLOT.PARAMETRIC. It returns the created item id of the plotted curve.
VEC.PLOT.POINTSCommandVector plot statementsAlias of VEC.PLOT.XY.
VEC.PLOT.SCATTERCommandVector plot statementsPlots a list of data-space points as vector point markers in the selected plot rectangle.
VEC.PLOT.TICKSCommandVector plot statementsAdds numeric tick labels around a VEC.PLOT.AXES rectangle. decimals=-1 uses compact general formatting.
VEC.PLOT.XYCommandVector plot statementsPlots a polyline from data-space points into the specified plot rectangle. Alias: VEC.PLOT.POINTS.
VEC.PLOT.XY_IDFunctionVector plot functionsFunction form of VEC.PLOT.XY. It plots the data polyline and returns the created item id.
VEC.PNGCommandVector export and capture statementsAlias of VEC.SAVE_PNG.
VEC.POINTCommandVector canvas statementsAdds a small circular point marker using the current pen color.
VEC.POINT_IDFunctionVector canvas functionsFunction form of VEC.POINT. It adds the point marker and returns its item id.
VEC.POLYGONCommandVector canvas statementsAdds a closed polygon using the current pen and brush.
VEC.POLYGON_IDFunctionVector canvas functionsFunction form of VEC.POLYGON. It returns the item id.
VEC.POLYLINECommandVector canvas statementsAdds an open polyline. The point list is a compact string using semicolon-separated x,y pairs.
VEC.POLYLINE_IDFunctionVector canvas functionsFunction form of VEC.POLYLINE. It returns the item id.
VEC.RECTCommandVector canvas statementsAdds a rectangle using the current pen and brush.
VEC.RECT_IDFunctionVector canvas functionsFunction form of VEC.RECT. It adds the rectangle and returns its item id.
VEC.SAVE_AVICommandVector export and capture statementsAlias of VEC.CAPTURE_AVI.
VEC.SAVE_FRAMECommandVector export and capture statementsCaptures the current animated canvas state to a PNG frame. With transparent=TRUE the background is transparent. Alias: VEC.FRAME_PNG.
VEC.SAVE_PNGCommandVector export and capture statementsRasterizes and saves the current vector canvas as a PNG preview.
VEC.SAVE_SVGCommandVector export and capture statementsExports the vector canvas to SVG. This keeps vector primitives scalable and is ideal for reports/documentation.
VEC.STACKFunctionVector canvas functionsAlias of VEC.CAPTURE_STACK.
VEC.SVGCommandVector export and capture statementsAlias of VEC.SAVE_SVG.
VEC.SYNCCommandVector canvas statementsProcesses pending Qt GUI events for a bounded time. Use it after heavy vector scene creation and before export/animation when a script builds many items continuously. maxMs is clamped to 1..250 ms. Alias: VEC.FLUSH.
VEC.TEXTCommandVector canvas statementsAdds a text item using the current pen color and current font.
VEC.TEXT_IDFunctionVector canvas functionsFunction form of VEC.TEXT. It adds the text and returns its item id.
VEC.TO_MATFunctionVector canvas functionsAlias of VEC.MAT.
VEC.ZCommandVector canvas statementsSets the default z-order for following vector items. Higher values are drawn above lower values.
VM.COLORCommandVideo magnification statementsEulerian color magnification on an image stack/video. It amplifies subtle chromatic variations in the temporal band lowHz..highHz and returns a new stack.
VM.LAPLACECommandVideo magnification statementsEulerian motion magnification using the Laplacian-pyramid path of EulerianVideoMagnifier. VM.MOTION is an alias with the same implementation.
VM.MAX_LEVELSFunctionOpenCV / media functionsReturns the maximum pyramid level count usable by EulerianVideoMagnifier for an image/stack or for width,height.
VM.MOTIONCommandVideo magnification statementsFriendly alias of VM.LAPLACE for motion magnification.
VM.RIESZCommandVideo magnification statementsEulerian phase/motion magnification using the Riesz-pyramid path. phaseThreshold is expressed as a percentage of pi in the underlying tested class. The 8th parameter is accepted as chromAttenuation/reserved for compatibility with VM.MOTION examples; the current Riesz path works on luminance and merges original chroma back.
WENDKeywordLanguage keywordsCloses the WHILE loop.
WHILEKeywordLanguage keywordsStarts a conditional loop.

AND

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

expr AND expr

Logical AND operator.

Minimal example

IF NOT CV.IS_STACK(img) AND CV.WIDTH(img) > 0 THEN
    PRINT "single image"
ENDIF

AP.ABS

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.ABS dst, a

Absolute value.

Minimal example

AP.ABS aa, a

AP.ADD

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.ADD dst, a, b

Adds AP operands and stores the result.

Minimal example

AP.ADD c, a, b

AP.CBRT

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.CBRT dst, a [, digits]

Computes the cube root.

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

Minimal example

AP.CBRT r3, "3", 100

AP.CEIL

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.CEIL dst, a

Ceiling of an AP value.

Minimal example

AP.CEIL c, x

AP.CLEAR

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.CLEAR

Deletes all AP variables from the current runtime.

Minimal example

AP.CLEAR

AP.COMPARE

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.COMPARE(a, b)

Compares two AP variables or literals. Returns -1, 0 or +1.

Minimal example

cmp = AP.COMPARE("a", "b")

AP.COPY

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.COPY dst, src

Copies an AP variable or numeric literal into another AP variable.

Minimal example

AP.COPY backup, result

AP.COS

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.COS dst, a [, digits]

Computes cosine.

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

Minimal example

AP.COS c, pi, 120

AP.COUNT

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.COUNT()

Returns how many AP variables are currently stored.

Minimal example

PRINT AP.COUNT()

AP.DELETE

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.DELETE name

Deletes one AP variable.

Minimal example

AP.DELETE tmp

AP.DIGITS

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.DIGITS(name)

Returns the number of significant digits currently stored in the AP value.

Minimal example

PRINT AP.DIGITS("x")

AP.DIV

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.DIV dst, a, b [, digits]

Divides a by b using the given digit precision, or the current AP.PRECISION setting.

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

Minimal example

AP.DIV q, one, seven, 120

AP.DOUBLE

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.DOUBLE(name)

Converts an AP value to a normal Basic double. This is an explicit lossy bridge back to ordinary expressions.

Minimal example

x = AP.DOUBLE("result")

AP.E

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.E dst

Stores Euler's number into an AP variable.

Minimal example

AP.E e

AP.EVAL

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.EVAL dst, "expression"

Evaluates a compact arbitrary-precision expression inside the AP world. Supports AP variables, numeric literals, pi/e, + - * / ^, parentheses and functions such as sqrt, sin, cos, log, exp, pow, fact, gcd, mod. AP.LET is the friendly alias.

Minimal example

AP.EVAL y, "sin(pi/7)^2 + cos(pi/7)^2"
PRINT AP.STR("y", 100)

AP.EXISTS

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.EXISTS(name)

Returns TRUE if an AP variable exists.

Minimal example

IF AP.EXISTS("c") THEN PRINT AP.STR("c")

AP.EXP

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.EXP dst, a [, digits]

Computes e^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
digitsOptional parameter. If omitted, the command uses its internal default.

Minimal example

AP.EXP ex, x, 100

AP.EXPONENT

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.EXPONENT(name)

Returns the MAPM decimal exponent of the AP value.

Minimal example

PRINT AP.EXPONENT("x")

AP.FACT

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.FACT dst, a

Computes factorial for integer AP values. AP.FACTORIAL is the long alias.

Minimal example

AP.FACT f100, "100"

AP.FACTORIAL

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.FACTORIAL dst, a

Long alias of AP.FACT.

Minimal example

AP.FACTORIAL f100, "100"

AP.FIXED

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.FIXED(name [, decimals])

Returns an AP value as fixed-point decimal text.

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

Minimal example

PRINT AP.FIXED("pi", 80)

AP.FLOOR

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.FLOOR dst, a

Floor of an AP value.

Minimal example

AP.FLOOR f, x

AP.GCD

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.GCD dst, a, b

Greatest common divisor for integer AP values.

Minimal example

AP.GCD g, a, b

AP.IDIV

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.IDIV dst, a, b

Integer division quotient.

Minimal example

AP.IDIV q, a, b

AP.INTSTR

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.INTSTR(name)

Returns the integer part as a string.

Minimal example

PRINT AP.INTSTR("f100")

AP.IPOW

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.IPOW dst, a, integerExponent [, digits]

Computes an integer exponent power. Useful for exact or near-exact high-precision power series tests.

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

Minimal example

AP.IPOW p, x, 12

AP.LCM

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.LCM dst, a, b

Least common multiple for integer AP values.

Minimal example

AP.LCM l, a, b

AP.LET

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.LET dst, "expression"

Alias of AP.EVAL, useful when the AP expression reads like an assignment into the AP variable table.

Minimal example

AP.LET r, "(sqrt(2)+sqrt(3))^2"

AP.LOG

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.LOG dst, a [, digits]

Computes the natural logarithm.

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

Minimal example

AP.LOG lx, x, 100

AP.LOG10

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.LOG10 dst, a [, digits]

Computes the base-10 logarithm.

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

Minimal example

AP.LOG10 l10, x, 100

AP.MOD

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.MOD dst, a, b

Integer remainder.

Minimal example

AP.MOD r, a, b

AP.MUL

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.MUL dst, a, b

Multiplies AP operands and stores the result.

Minimal example

AP.MUL p, a, b

AP.NEG

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.NEG dst, a

Changes sign of an AP value.

Minimal example

AP.NEG n, a

AP.PI

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.PI dst

Stores pi into an AP variable.

Minimal example

AP.PI pi

AP.POW

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.POW dst, a, b [, digits]

Computes a raised to b with arbitrary precision.

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

Minimal example

AP.POW y, x, "0.5", 100

AP.PRECISION

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.PRECISION digits

Sets the global decimal digit precision used by AP arithmetic. AP variables live in a separate namespace and are not normal Basic numeric variables.

Minimal example

AP.PRECISION 120

AP.PRECISION_VALUE

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.PRECISION_VALUE()

Returns the current AP precision setting.

Minimal example

PRINT AP.PRECISION_VALUE()

AP.PROD

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.PROD dst, index, start, end, "expression" [, step]

Evaluates an AP expression repeatedly while index is an AP integer variable, accumulating the product.

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.

Minimal example

AP.PROD p, k, 1, 20, "1 + 1 / k^2"
PRINT AP.STR("p", 80)

AP.RANDOM

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.RANDOM dst

Stores a MAPM random value in [0,1).

Minimal example

AP.RANDOM rnd

AP.ROUND

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.ROUND dst, a, digits

Rounds an AP value.

Minimal example

AP.ROUND r, pi, 40

AP.SET

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.SET name, value

Creates or replaces an arbitrary-precision variable. Prefer quoted numeric strings for exact decimal input; numeric Basic values already have double precision.

Minimal example

AP.SET a, "0.1"
AP.SET b, "0.2"

AP.SIGN

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.SIGN(name)

Returns -1, 0 or +1 depending on the AP value sign.

Minimal example

PRINT AP.SIGN("x")

AP.SIN

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.SIN dst, a [, digits]

Computes sine.

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

Minimal example

AP.SIN s, pi, 120

AP.SQRT

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.SQRT dst, a [, digits]

Computes the square root.

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

Minimal example

AP.SQRT r2, "2", 120

AP.STR

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.STR(name [, digits])

Returns an AP value as a string. In expressions, pass the AP variable name as a string, for example AP.STR("c", 80).

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

Minimal example

PRINT AP.STR("c", 80)

AP.SUB

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.SUB dst, a, b

Subtracts b from a and stores the result.

Minimal example

AP.SUB d, a, b

AP.SUM

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.SUM dst, index, start, end, "expression" [, step]

Evaluates an AP expression repeatedly while index is an AP integer variable, accumulating the sum. The previous index variable is restored after the loop.

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.

Minimal example

AP.PRECISION 120
AP.SUM eApprox, k, 0, 80, "1 / fact(k)"
PRINT AP.STR("eApprox", 100)

AP.TAN

STATEMENTAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Command   Category: Arbitrary precision statements   Namespace: AP

AP.TAN dst, a [, digits]

Computes tangent.

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

Minimal example

AP.TAN t, angle, 100

AP.VERSION

FUNCTIONAPBATCH-FRIENDLYARBITRARY PRECISION
Kind: Function   Category: Arbitrary precision functions   Namespace: AP

AP.VERSION()

Returns the underlying MAPM library version.

Minimal example

PRINT AP.VERSION()

ARRAY

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ARRAY

Logical type returned by TYPE(x) for arrays.

Minimal example

ARRAY

ARRAY.COLUMN

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.COLUMN(array2d, column)

Extracts one column from a 2D array and returns a 1D array.

Minimal example

x = ARRAY.COLUMN(points, 0)

ARRAY.DIMS

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.DIMS(array)

Returns the number of dimensions.

Minimal example

value = ARRAY.DIMS(array)

ARRAY.DIMSIZE

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.DIMSIZE(array, dimension)

Returns the size of one zero-based dimension.

Minimal example

value = ARRAY.DIMSIZE(array, dimension)

ARRAY.EQUAL

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.EQUAL(a, b [, eps])

Returns TRUE when two arrays have the same shape and equal values, with optional numeric tolerance.

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

Minimal example

value = ARRAY.EQUAL(a, b [, eps])

ARRAY.FROM_TEXT

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.FROM_TEXT(text [, delimiter [, numeric]])

Reads an array from ARRAY.TO_TEXT output or plain delimited rows.

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
delimiterCSV delimiter override; omit it for auto-detection where supported.
numericWhen true, forces numeric conversion of CSV values.

Minimal example

b = ARRAY.FROM_TEXT(ARRAY.TO_TEXT(a))

ARRAY.GET

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.GET(array, indexOrRow [, column]) or array[indexOrRow[,column]]

Reads an array element. For vector-like 2D arrays n x 1 or 1 x n, one-index access is accepted: v[0] or ARRAY.GET(v,0).

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

Minimal example

value = ARRAY.GET(array, indexOrRow [, column]) or array[indexOrRow[,column]]

ARRAY.IS_ARRAY

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.IS_ARRAY(value)

Returns TRUE when the value is a script array.

Minimal example

value = ARRAY.IS_ARRAY(value)

ARRAY.MAX

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.MAX(array)

Returns the maximum numeric element.

Minimal example

value = ARRAY.MAX(array)

ARRAY.MEAN

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.MEAN(array)

Returns the mean of all numeric elements in the array.

Minimal example

value = ARRAY.MEAN(array)

ARRAY.MIN

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.MIN(array)

Returns the minimum numeric element.

Minimal example

value = ARRAY.MIN(array)

ARRAY.ROW

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.ROW(array2d, row)

Extracts one row from a 2D array and returns a 1D array.

Minimal example

value = ARRAY.ROW(array2d, row)

ARRAY.SET

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.SET(array, index, value) or ARRAY.SET(array, row, column, value)

Writes an array element and returns the same array object. Vector-like 2D arrays n x 1 or 1 x n also accept one-index writes.

Minimal example

value = ARRAY.SET(array, index, value) or ARRAY.SET(array, row, column, value)

ARRAY.SIZE

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.SIZE(array)

Returns the total number of elements.

Minimal example

value = ARRAY.SIZE(array)

ARRAY.STDDEV

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.STDDEV(array)

Returns the population standard deviation of all numeric elements.

Minimal example

value = ARRAY.STDDEV(array)

ARRAY.SUM

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.SUM(array)

Returns the sum of all numeric elements in the array.

Minimal example

value = ARRAY.SUM(array)

ARRAY.TO_TEXT

FUNCTIONARRAYBATCH-FRIENDLY
Kind: Function   Category: Array functions   Namespace: ARRAY

ARRAY.TO_TEXT(array [, delimiter])

Serializes a 1D/2D array to a compact CVB_ARRAY text block.

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
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

value = ARRAY.TO_TEXT(array [, delimiter])

AS

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

... AS name

Assigns the result of a command to a variable, or names the local return variable in FUNCTION ... AS result.

Minimal example

CV.GRAY img AS gray

ASSERT

STATEMENTBATCH-FRIENDLY
Kind: Command   Category: Diagnostics statements   Namespace: CORE

ASSERT condition [, message]

Stops the script with a clear error if condition is false. Useful for diagnostic and regression scripts.

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

Minimal example

ASSERT CV.WIDTH(img) = 64, "Unexpected image width"

CALL

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

CALL name([arg1 [, arg2 ...]])

Executes a SUB block. Simple variable arguments are copied back after the 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
arg1Optional parameter. If omitted, the command uses its internal default.
arg2Optional parameter. If omitted, the command uses its internal default.

Minimal example

SUB PROCESS_IMAGE(src, dst)
    CV.GRAY src AS g
    CV.CLAHE g, 2.0, 8 AS dst
ENDSUB

CALL PROCESS_IMAGE(img, enhanced)

FUNCTION DOUBLE_VALUE(x)
    RETURN x * 2
ENDFUNCTION

CASE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

CASE expression [, expression ...] | CASE low TO high | CASE > expr

Introduces one SWITCH branch. Multiple comma-separated values are allowed. Numeric ranges and comparisons are supported. Only the first matching branch is executed.

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

Minimal example

SWITCH score
CASE 0 TO 30
    PRINT "low"
CASE 31 TO 70
    PRINT "medium"
CASE > 70
    PRINT "high"
DEFAULT
    PRINT "invalid"
ENDSWITCH

CATCH

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

CATCH [errVar [, lineVar]]

Handles a runtime error from the preceding TRY block. Optional variables receive the message and source line.

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

Minimal example

TRY
    IO.LOAD "missing.png" AS img
CATCH err, line
    PRINT "Error at line "; line; ": "; err
ENDTRY

COUNT_NONZERO

FUNCTIONBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: CORE

MASK.COUNT_NONZERO(mask)

Compatibility alias for COUNT_NONZERO / MASK.COUNT.

Minimal example

n = MASK.COUNT_NONZERO(mask)

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)

CX.ABS

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.ABS result, z

Stores the modulus |z| in a normal numeric variable.

Minimal example

CX.ABS r, z

CX.ADD

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.ADD dst, a, b

Computes dst = a + b for two scalar complex variables.

Minimal example

CX.ADD

CX.ADD_REAL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.ADD_REAL dst, z, x

Computes dst = z + x where x is a normal real expression.

Minimal example

CX.ADD_REAL

CX.ARG

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.ARG result, z

Stores the phase angle arg(z), in radians, in a normal numeric variable.

Minimal example

CX.ARG phi, z

CX.CLEAR

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.CLEAR

Clears all scalar complex variables stored in the CX runtime table.

Minimal example

CX.CLEAR

CX.CONJ

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.CONJ dst, z

Computes the complex conjugate of z.

Minimal example

CX.CONJ zc, z
CX.MUL power, z, zc

CX.COPY

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.COPY dst, src

Copies a scalar complex variable.

Minimal example

CX.COPY z2, z

CX.COS

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.COS dst, z

Computes the complex cosine.

Minimal example

CX.COS

CX.DELETE

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.DELETE name

Deletes one scalar complex variable if it exists.

Minimal example

CX.DELETE

CX.DIV

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.DIV dst, a, b

Computes dst = a / b for two scalar complex variables. Division by a zero complex value is rejected.

Minimal example

CX.DIV

CX.DIV_REAL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.DIV_REAL dst, z, x

Computes dst = z / x where x is a normal real expression. Division by zero is rejected.

Minimal example

CX.DIV_REAL

CX.EXISTS

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.EXISTS name, result

Writes 1 to result when the named scalar complex variable exists, otherwise 0.

Minimal example

CX.EXISTS z, ok
ASSERT ok = 1

CX.EXP

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.EXP dst, z

Computes the complex exponential exp(z).

Minimal example

CX.SET ipi, 0, 3.141592653589793
CX.EXP euler, ipi

CX.FROM_POLAR

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.FROM_POLAR dst, radius, angle

Creates a scalar complex variable from polar coordinates. The radius must be non-negative and the angle is in radians.

Minimal example

CX.FROM_POLAR z, 5, 0.927295218

CX.FROM_RE_IM

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.FROM_RE_IM dst, re, im

Creates a scalar complex variable from rectangular coordinates. Alias-friendly companion of CX.SET.

Minimal example

CX.FROM_RE_IM z, 3, 4

CX.IM

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.IM result, z

Stores the imaginary part of z in a normal numeric variable.

Minimal example

CX.IM im, z

CX.INV

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.INV dst, z

Computes dst = 1/z. Division by a zero complex value is rejected.

Minimal example

CX.INV

CX.LIST

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.LIST

Prints all scalar complex variables currently stored in the CX runtime table.

Minimal example

CX.LIST

CX.LOG

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.LOG dst, z

Computes the principal complex logarithm log(z).

Minimal example

CX.LOG

CX.MUL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.MUL dst, a, b

Computes dst = a * b for two scalar complex variables.

Minimal example

CX.MUL p, z, zc

CX.MUL_REAL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.MUL_REAL dst, z, x

Computes dst = z * x where x is a normal real expression.

Minimal example

CX.MUL_REAL

CX.NEG

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.NEG dst, z

Computes dst = -z.

Minimal example

CX.NEG

CX.NORM

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.NORM result, z

Stores squared modulus re*re + im*im in a normal numeric variable.

Minimal example

CX.NORM n2, z

CX.POLAR

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.POLAR dst, radius, angle

Alias of CX.FROM_POLAR.

Minimal example

CX.POLAR z, 5, 0.927295218

CX.POW_REAL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.POW_REAL dst, z, exponent

Raises z to a real-valued exponent. Complex exponents are intentionally not parsed in this first CX layer.

Minimal example

CX.POW_REAL

CX.PRINT

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.PRINT name

Prints a scalar complex variable in readable real/imaginary form.

Minimal example

CX.SET z, 3, 4
CX.PRINT z

CX.RE

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.RE result, z

Stores the real part of z in a normal numeric variable.

Minimal example

CX.RE re, z

CX.SET

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.SET name, re, im

Creates or replaces a scalar complex variable from real and imaginary parts.

Minimal example

CX.SET z, 3, 4
CX.PRINT z

CX.SIN

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.SIN dst, z

Computes the complex sine.

Minimal example

CX.SIN

CX.SQRT

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.SQRT dst, z

Computes the principal complex square root.

Minimal example

CX.SET z, 3, 4
CX.SQRT root, z

CX.SUB

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.SUB dst, a, b

Computes dst = a - b for two scalar complex variables.

Minimal example

CX.SUB

CX.SUB_REAL

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.SUB_REAL dst, z, x

Computes dst = z - x where x is a normal real expression.

Minimal example

CX.SUB_REAL

CX.TAN

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.TAN dst, z

Computes the complex tangent.

Minimal example

CX.TAN

CX.TO_POLAR

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.TO_POLAR z, radiusResult, angleResult

Stores modulus and phase angle, in radians, in two normal numeric variables.

Minimal example

CX.TO_POLAR z, r, phi

CX.TO_RE_IM

STATEMENTCXBATCH-FRIENDLY
Kind: Command   Category: Complex number statements   Namespace: CX

CX.TO_RE_IM z, reResult, imResult

Stores real and imaginary parts of z in two normal numeric variables.

Minimal example

CX.TO_RE_IM z, re, im

DEBUG.EXPR_CACHE_COMPILE_ATTEMPTS

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_COMPILE_ATTEMPTS()

Public cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

value = DEBUG.EXPR_CACHE_COMPILE_ATTEMPTS()

DEBUG.EXPR_CACHE_COMPILE_FAILURES

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_COMPILE_FAILURES()

Public cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

value = DEBUG.EXPR_CACHE_COMPILE_FAILURES()

DEBUG.EXPR_CACHE_COMPILED

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_COMPILED()

Public cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

value = DEBUG.EXPR_CACHE_COMPILED()

DEBUG.EXPR_CACHE_EVALS

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_EVALS()

Public cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

value = DEBUG.EXPR_CACHE_EVALS()

DEBUG.EXPR_CACHE_FALLBACKS

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_FALLBACKS()

Returns how many expression evaluations fell back to the classic ExpressionParser.

Minimal example

value = DEBUG.EXPR_CACHE_FALLBACKS()

DEBUG.EXPR_CACHE_HIT_RATE

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_HIT_RATE()

Returns the expression-cache hit rate as a percentage over hits + misses.

Minimal example

value = DEBUG.EXPR_CACHE_HIT_RATE()

DEBUG.EXPR_CACHE_HITS

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_HITS()

Returns the number of expression-cache hits in the current run since the last reset.

Minimal example

value = DEBUG.EXPR_CACHE_HITS()

DEBUG.EXPR_CACHE_LIMIT_CLEARS

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_LIMIT_CLEARS()

Public cvBasic function exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

value = DEBUG.EXPR_CACHE_LIMIT_CLEARS()

DEBUG.EXPR_CACHE_MISSES

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_MISSES()

Returns the number of expression-cache misses in the current run since the last reset.

Minimal example

value = DEBUG.EXPR_CACHE_MISSES()

DEBUG.EXPR_CACHE_RESET_STATS

STATEMENTDEBUGBATCH-FRIENDLY
Kind: Command   Category: Diagnostics statements   Namespace: DEBUG

DEBUG.EXPR_CACHE_RESET_STATS

Resets the expression-cache diagnostic counters without clearing the cached expression tree.

Minimal example

DEBUG.EXPR_CACHE_RESET_STATS

DEBUG.EXPR_CACHE_SIZE

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_SIZE()

Returns the current number of compiled expressions stored in the cache.

Minimal example

value = DEBUG.EXPR_CACHE_SIZE()

DEBUG.EXPR_CACHE_SUMMARY

FUNCTIONDEBUGBATCH-FRIENDLY
Kind: Function   Category: Diagnostics functions   Namespace: DEBUG

DEBUG.EXPR_CACHE_SUMMARY()

Returns a compact string with expression-cache size, evaluations, hits, misses, compiled expressions, fallbacks and limit clears.

Minimal example

PRINT DEBUG.EXPR_CACHE_SUMMARY()

DEFAULT

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

DEFAULT

Optional fallback branch of a SWITCH block. It must appear after all CASE branches.

Minimal example

SWITCH score
CASE 0 TO 30
    PRINT "low"
CASE 31 TO 70
    PRINT "medium"
CASE > 70
    PRINT "high"
DEFAULT
    PRINT "invalid"
ENDSWITCH

DEMO.ADD

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.ADD(a, b)

Library: DemoStats user library 2.0.0 Returns a + b.

Minimal example

value = DEMO.ADD(a, b)

DEMO.ARGSINFO

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.ARGSINFO([args...])

Library: DemoStats user library 2.0.0 Returns a compact description of all received argument types.

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

Minimal example

value = DEMO.ARGSINFO([args...])

DEMO.ARRAY_INFO

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.ARRAY_INFO(array)

Library: DemoStats user library 2.0.0 Returns shape and total size of a cvBasic array using SDK v2 array access.

Minimal example

value = DEMO.ARRAY_INFO(array)

DEMO.ARRAY_SCALE

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.ARRAY_SCALE(array, factor)

Library: DemoStats user library 2.0.0 Returns a numeric array with every element multiplied by factor.

Minimal example

value = DEMO.ARRAY_SCALE(array, factor)

DEMO.ARRAY_SUM

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.ARRAY_SUM(array)

Library: DemoStats user library 2.0.0 Returns the sum of all numeric array elements.

Minimal example

value = DEMO.ARRAY_SUM(array)

DEMO.CLAMP

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.CLAMP(x, lo, hi)

Library: DemoStats user library 2.0.0 Clamps x into the [lo, hi] range.

Minimal example

value = DEMO.CLAMP(x, lo, hi)

DEMO.HELLO

STATEMENTDEMOBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Other image / stack statements   Namespace: DEMO

DEMO.HELLO [name]

Library: DemoStats user library 2.0.0 Prints a greeting from the DLL.

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

Minimal example

DEMO.HELLO

DEMO.IMAGE_INFO

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.IMAGE_INFO(image)

Library: DemoStats user library 2.0.0 Returns width, height, channels, depth, type and frame count for an image/stack.

Minimal example

value = DEMO.IMAGE_INFO(image)

DEMO.INVERT8

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.INVERT8(image)

Library: DemoStats user library 2.0.0 Returns an inverted copy of an 8-bit image using SDK v2 image view access.

Minimal example

value = DEMO.INVERT8(image)

DEMO.MAX

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.MAX(v1 [, v2 ...])

Library: DemoStats user library 2.0.0 Returns the maximum numeric argument.

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

Minimal example

value = DEMO.MAX(v1 [, v2 ...])

DEMO.MEAN

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.MEAN(v1 [, v2 ...])

Library: DemoStats user library 2.0.0 Returns the arithmetic mean of all numeric arguments.

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

Minimal example

value = DEMO.MEAN(v1 [, v2 ...])

DEMO.MIN

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.MIN(v1 [, v2 ...])

Library: DemoStats user library 2.0.0 Returns the minimum numeric argument.

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

Minimal example

value = DEMO.MIN(v1 [, v2 ...])

DEMO.MUL

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.MUL(a, b [, ...])

Library: DemoStats user library 2.0.0 Returns the product of all numeric arguments.

Minimal example

value = DEMO.MUL(a, b [, ...])

DEMO.RAMP

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.RAMP(n)

Library: DemoStats user library 2.0.0 Returns a 1D numeric array containing 0..n-1.

Minimal example

value = DEMO.RAMP(n)

DEMO.REPEAT

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.REPEAT(text, count)

Library: DemoStats user library 2.0.0 Repeats text count times, capped at 1024 repetitions.

Minimal example

value = DEMO.REPEAT(text, count)

DEMO.STDDEV

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.STDDEV(v1, v2 [, ...])

Library: DemoStats user library 2.0.0 Returns the population standard deviation of the numeric arguments.

Minimal example

value = DEMO.STDDEV(v1, v2 [, ...])

DEMO.TYPEOF

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.TYPEOF(value)

Library: DemoStats user library 2.0.0 Returns the external SDK value type name of the argument.

Minimal example

value = DEMO.TYPEOF(value)

DEMO.TYPES

STATEMENTDEMOBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Other image / stack statements   Namespace: DEMO

DEMO.TYPES

Library: DemoStats user library 2.0.0 Prints the SDK data types supported by this demo library.

Minimal example

DEMO.TYPES

DEMO.UPPER

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.UPPER(text)

Library: DemoStats user library 2.0.0 Returns an upper-case copy of text.

Minimal example

value = DEMO.UPPER(text)

DEMO.VERSION

FUNCTIONDEMOBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: DEMO

DEMO.VERSION()

Library: DemoStats user library 2.0.0 Returns the library version string.

Minimal example

value = DEMO.VERSION()

DIM

STATEMENTBATCH-FRIENDLY
Kind: Command   Category: Language keywords   Namespace: CORE

DIM name(size1 [, size2 ...])

Declares a zero-based one or multi-dimensional array. Variable names are case-insensitive, so DIM v(10) and later V refer to the same variable. Compact literals are also supported: v = [1,2,3] and A = [[1,2],[3,4]].

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

Minimal example

v = [10, 20, 30]
A = [[1, 2], [3, 4]]
PRINT v[1], A[1,0]

DIM

STATEMENTBATCH-FRIENDLY
Kind: Command   Category: Core statements   Namespace: CORE

DIM name(size1 [, size2 ...])

Declares a zero-based one or multi-dimensional array. Variable names are case-insensitive, so DIM v(10) and later V refer to the same variable. Compact literals are also supported: v = [1,2,3] and A = [[1,2],[3,4]].

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

Minimal example

v = [10, 20, 30]
A = [[1, 2], [3, 4]]
PRINT v[1], A[1,0]

DPLOT.ADDXY

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.ADDXY handle, channelName, xValues, yValues [, color]

Adds an X/Y numeric channel to an interactive DataPlot window. xValues and yValues can be arrays or numeric text lists and must have the same length.

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
colorOptional plot/drawing color value.

Minimal example

DIM x(100)
DIM y(100)
FOR i = 0 TO 99
    x(i) = i * 0.05
    y(i) = MATH.EXP(-x(i) * 0.05) * MATH.SIN(x(i))
NEXT
p = DPLOT.CREATE("XY signal")
DPLOT.ADDXY p, "damped sine", x, y

DPLOT.ADDY

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.ADDY handle, channelName, yValues [, color]

Adds a Y-only numeric channel to an interactive DataPlot window. The X axis is generated as 0..N-1. yValues can be an array, numeric text list, or single numeric 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
colorOptional plot/drawing color value.

Minimal example

DIM y(100)
FOR i = 0 TO 99
    y(i) = MATH.SIN(i * 0.1)
NEXT
p = DPLOT.CREATE("Y signal")
DPLOT.ADDY p, "sin(i)", y, "#ff0000"

DPLOT.BINS

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.BINS handle, bins

Changes the number of bins used by the DataPlot histogram panel.

Minimal example

DPLOT.BINS p, 256

DPLOT.CLEAR

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.CLEAR handle

Removes all channels from an interactive DataPlot window.

Minimal example

DPLOT.CLEAR p

DPLOT.COMMON_RANGE

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.COMMON_RANGE handle, enabled

Enables or disables a common histogram range across all DataPlot channels.

Minimal example

DPLOT.COMMON_RANGE p, 1

DPLOT.CREATE

FUNCTIONDPLOTGUI / INTERACTIVE
Kind: Function   Category: Interactive DataPlot functions   Namespace: DPLOT

DPLOT.CREATE(title [, bins [, normalize [, commonRange]]])

Creates an interactive DataPlot MDI window and returns a numeric handle used by DPLOT.ADDY, DPLOT.ADDXY and the other DPLOT commands.

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

Minimal example

p = DPLOT.CREATE("Interactive signal", 128, 0, 1)

DPLOT.MODE

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.MODE handle, mode

Sets the interactive DataPlot mode: READOUT, ZOOM, or PAN.

Minimal example

DPLOT.MODE p, "READOUT"

DPLOT.NORMALIZE

STATEMENTDPLOTGUI / INTERACTIVE
Kind: Command   Category: Interactive DataPlot statements   Namespace: DPLOT

DPLOT.NORMALIZE handle, enabled

Enables or disables normalized histogram display in a DataPlot window.

Minimal example

DPLOT.NORMALIZE p, 1

DRAW.CIRCLE

STATEMENTDRAWBATCH-FRIENDLY
Kind: Command   Category: Drawing statements   Namespace: DRAW

DRAW.CIRCLE src, cx, cy, radius [, value [, thickness]] AS dst

Draws or fills a circle over an 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

DRAW.CIRCLE src, cx, cy, radius [, value [, thickness]] AS dst

DRAW.LINE

STATEMENTDRAWBATCH-FRIENDLY
Kind: Command   Category: Drawing statements   Namespace: DRAW

DRAW.LINE src, x1, y1, x2, y2 [, value [, thickness]] AS dst

Draws a line over an image or over every frame of a stack and returns the modified media.

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

DRAW.LINE src, x1, y1, x2, y2 [, value [, thickness]] AS dst

DRAW.RECT

STATEMENTDRAWBATCH-FRIENDLY
Kind: Command   Category: Drawing statements   Namespace: DRAW

DRAW.RECT src, x, y, w, h [, value [, thickness]] AS dst

Draws or fills a rectangle over an 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

DRAW.RECT src, x, y, w, h [, value [, thickness]] AS dst

DRAW.TEXT

STATEMENTDRAWBATCH-FRIENDLY
Kind: Command   Category: Drawing statements   Namespace: DRAW

DRAW.TEXT src, x, y, text [, value [, scale [, thickness]]] AS dst

Draws text using an OpenCV Hershey font over an 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.
scaleMultiplicative scale factor; for geometric transforms it may mean image scale around the center.
thicknessOptional parameter. If omitted, the command uses its internal default.

Minimal example

DRAW.TEXT src, x, y, text [, value [, scale [, thickness]]] AS dst

ELSE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ELSE

Alternative branch of an IF block.

Minimal example

IF CV.WIDTH(img) > 512 THEN
    PRINT "large image"
ELSE
    PRINT "small image"
ENDIF

ENDFUNCTION

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ENDFUNCTION

Closes a FUNCTION block.

Minimal example

FUNCTION CONTRAST_SCORE(img)
    RETURN CV.STDDEV(img)
ENDFUNCTION

score = CONTRAST_SCORE(gray)

ENDIF

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ENDIF

Closes the IF block.

Minimal example

IF CV.WIDTH(img) > 512 THEN
    PRINT "large image"
ELSE
    PRINT "small image"
ENDIF

ENDSUB

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ENDSUB

Closes a SUB block.

Minimal example

SUB PROCESS_IMAGE(src, dst)
    CV.GRAY src AS g
    CV.CLAHE g, 2.0, 8 AS dst
ENDSUB

CALL PROCESS_IMAGE(img, enhanced)

FUNCTION DOUBLE_VALUE(x)
    RETURN x * 2
ENDFUNCTION

ENDSWITCH

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ENDSWITCH

Closes a SWITCH block.

Minimal example

SWITCH score
CASE 0 TO 30
    PRINT "low"
CASE 31 TO 70
    PRINT "medium"
CASE > 70
    PRINT "high"
DEFAULT
    PRINT "invalid"
ENDSWITCH

ENDTRY

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

ENDTRY

Closes a TRY/CATCH block.

Minimal example

TRY
    IO.LOAD "missing.png" AS img
CATCH err, line
    PRINT "Error at line "; line; ": "; err
ENDTRY

EXIT

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

EXIT

Terminates the current script cleanly. Useful in interactive scripts after a cancelled dialog or an explicit user choice.

Minimal example

path = GUI.GET_OPEN_FILE_NAME("Open image")
IF path = "" THEN
    EXIT
ENDIF

FALSE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FALSE

Boolean false constant.

Minimal example

FALSE

FOR

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FOR var = start TO end [STEP step] | FOR elem IN arrayExpr

Starts either a numeric loop or a FOR IN iteration over all elements of an array/string.

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.

Minimal example

FOR i = 0 TO 9 STEP 1
    PRINT i
NEXT

FOR value IN samples
    PRINT value
NEXT

FUNCTION

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FUNCTION name([param1 [, param2 ...]]) [AS returnVar]

Starts a user-defined function block. The function can be used inside expressions and returns either RETURN expr or the AS return variable.

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

Minimal example

FUNCTION CONTRAST_SCORE(img)
    RETURN CV.STDDEV(img)
ENDFUNCTION

score = CONTRAST_SCORE(gray)

GL.ARROW

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.ARROW handle, x, y, z, dx, dy, dz [, color [, width [, headScale]]]

Adds a 3D vector arrow starting at x,y,z and pointing by dx,dy,dz.

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
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.
headScaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.ARROW g, 0, 0, 0, 0, 50, 0, "#50dcff", 2, 0.18

GL.AUTOROTATE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.AUTOROTATE handle [, enabled]

Starts or stops the GL viewer internal autorotation timer.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

GL.AUTOROTATE g, TRUE

GL.AXES

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.AXES handle [, length [, width]]

Adds RGB XYZ axes: X red, Y green, Z blue.

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

Minimal example

GL.AXES g, 100, 2

GL.BACKGROUND

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.BACKGROUND handle [, color]

Sets the GL viewer background color. Accepts Qt color names or #RRGGBB values.

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
colorOptional plot/drawing color value.

Minimal example

GL.BACKGROUND g, "#101018"

GL.BOUNDS

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.BOUNDS(handle)

Returns scene bounds as minX,minY,minZ;maxX,maxY,maxZ, useful for reports and sanity checks.

Minimal example

PRINT GL.BOUNDS(g)

GL.CAPTION

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CAPTION handle, caption

Sets a scene caption shown in the GL overlay and included in GL.INFO/GL.REPORT.

Minimal example

GL.CAPTION g, "Potential field with diagnostic bounds"

GL.CAPTURE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CAPTURE handle, pathPattern [, frameIndex]

Alias of GL.CAPTURE_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
frameIndexOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.CAPTURE

GL.CAPTURE_FRAME

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CAPTURE_FRAME handle, pathPattern [, frameIndex]

Saves a frame snapshot. pathPattern may contain %04d, %03d, %02d, %d or {frame}. Alias: GL.CAPTURE.

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

Minimal example

GL.CAPTURE_FRAME g, "frames/orbit_%04d.png", frame

GL.CENTER

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CENTER handle

Recenters the camera on current bounds without changing rotation.

Minimal example

GL.CENTER g

GL.CLEAR

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CLEAR handle

Removes all geometry from a GL scene and resets its automatic bounds.

Minimal example

GL.CLEAR g

GL.CLOSE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.CLOSE handle

Closes a GL viewer by handle.

Minimal example

GL.CLOSE g

GL.COLOR

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_COLOR handle, objectId, color

Changes object color. For gradient surfaces this switches the object to a flat color.

Minimal example

GL.COLOR

GL.COLORMAP

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.COLORMAP handle, mode

Applies a preview colormap to all gradient GL.SURFACE/GL.HEIGHTFIELD objects. Supported modes: gray, hot, blue-red, jet, viridis, thermal, custom.

Minimal example

GL.COLORMAP g, "viridis"

GL.CREATE

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.CREATE([title [, width [, height [, background]]]])

Creates an interactive OpenGL MDI viewer for scientific 3D geometry and returns a numeric handle. The viewer supports mouse/keyboard rotation, pan, zoom, fit, grid/axes toggle and snapshot.

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.
widthOptional parameter. If omitted, the command uses its internal default.
heightOptional parameter. If omitted, the command uses its internal default.
backgroundInitial canvas background value.

Minimal example

g = GL.CREATE("3D scene", 900, 700, "#101018")

GL.DELETE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.DELETE handle, objectId

Deletes a GL object previously identified through GL.LAST_ID.

Minimal example

GL.DELETE g, id

GL.EXPORT_CSV

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_CSV handle, path [, objectId]

Exports GL geometry as a simple CSV table of VERTEX and TRI records. It is easier to inspect than OBJ/PLY and complements GL.SAVE_SCENE.

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

Minimal example

GL.EXPORT_CSV g, "out/scene_geometry.csv"

GL.EXPORT_OBJ

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_OBJ handle, path [, objectId]

Exports visible GL geometry to Wavefront OBJ. If objectId is supplied, only that GL object is exported. Lines are written as OBJ l records; triangle meshes/surfaces are written as faces.

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

Minimal example

GL.EXPORT_OBJ g, "out/scene.obj"

GL.EXPORT_OBJECT_CSV

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_OBJECT_CSV handle, objectId, path

Exports one selected GL object to a compact CSV geometry table.

Minimal example

GL.EXPORT_OBJECT_CSV g, id, "out/object.csv"

GL.EXPORT_OBJECT_OBJ

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_OBJECT_OBJ handle, objectId, path

Exports one selected GL object to Wavefront OBJ.

Minimal example

GL.EXPORT_OBJECT_OBJ g, id, "out/object.obj"

GL.EXPORT_OBJECT_PLY

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_OBJECT_PLY handle, objectId, path

Exports one selected GL object to ASCII PLY.

Minimal example

GL.EXPORT_OBJECT_PLY g, id, "out/object.ply"

GL.EXPORT_PLY

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.EXPORT_PLY handle, path [, objectId]

Exports visible GL vertices and triangular faces to ASCII PLY. Point clouds are exported as vertices; lines are not represented as edges in this first lightweight exporter.

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

Minimal example

GL.EXPORT_PLY g, "out/scene.ply"

GL.EXPORT_SCENE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SAVE_SCENE handle, path

Public cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

GL.EXPORT_SCENE

GL.FIT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.FIT handle

Recomputes scene bounds, recenters the camera and resets zoom/pan while preserving the current rotation.

Minimal example

GL.FIT g

GL.FLUSH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.FLUSH handle [, maxMs]

Alias of GL.SYNC.

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

Minimal example

GL.FLUSH

GL.FRAME

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.FRAME handle [, maxMs]

Processes GUI events for one animation frame. Without maxMs it uses the delay configured by GL.SET_FPS.

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

Minimal example

GL.FRAME g

GL.GRID

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.GRID handle [, plane [, extent [, step [, color [, width]]]]]

Adds a scientific reference grid on plane XY, XZ or YZ.

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
planeOptional parameter. If omitted, the command uses its internal default.
extentOptional parameter. If omitted, the command uses its internal default.
stepOptional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.GRID g, "XZ", 100, 10, "#454552", 1

GL.HEIGHTFIELD

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.HEIGHTFIELD handle, image [, zMin [, zMax [, lowColor [, highColor [, wireframe [, sampleStep [, frame]]]]]]]

Converts an image or stack frame into a shaded 3D heightfield. X/Y are image coordinates centered around the origin; Z is normalized luminance mapped between zMin and zMax. sampleStep reduces large images.

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
zMinOptional parameter. If omitted, the command uses its internal default.
zMaxOptional parameter. If omitted, the command uses its internal default.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

GL.HEIGHTFIELD g, gray, 0, 80, "#2030a0", "#ffff80", FALSE, 4

GL.HIDE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.HIDE handle, objectId

Temporarily hides a GL object without deleting it.

Minimal example

GL.HIDE g, id

GL.IMAGE_POINTS

STATEMENTGLGUI / INTERACTIVEIMAGE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.IMAGE_POINTS handle, image [, threshold01 [, color [, size [, sampleStep [, frame [, zScale [, maxPoints]]]]]]]

Alias of GL.POINTCLOUD_FROM_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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.
zScaleOptional parameter. If omitted, the command uses its internal default.
maxPointsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.IMAGE_POINTS g, img, 0.70, "yellow", 3

GL.IMAGE_SURFACE

STATEMENTGLGUI / INTERACTIVEIMAGE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.IMAGE_SURFACE handle, image [, zMin [, zMax [, lowColor [, highColor [, wireframe [, sampleStep [, frame]]]]]]]

Alias of GL.HEIGHTFIELD, intended for OpenCV image-to-surface visualizations.

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
zMinOptional parameter. If omitted, the command uses its internal default.
zMaxOptional parameter. If omitted, the command uses its internal default.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

GL.IMAGE_SURFACE g, img, 0, 60, "#204080", "#ffe080", FALSE, 6

GL.IMPORT_OBJ

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.IMPORT_OBJ handle, path [, color [, wireframe]]

Imports a simple Wavefront OBJ mesh. v and f records are supported; polygonal faces are triangulated as fans. If the OBJ has vertices but no faces, it is imported as a point cloud.

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
colorOptional plot/drawing color value.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.IMPORT_OBJ g, "out/scene.obj", "#b4dcff", TRUE

GL.INFO

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.INFO(handle)

Returns a multi-line diagnostic summary of the GL scene: title, caption, bounds, camera, renderer, item/object counts and visible primitive totals.

Minimal example

PRINT GL.INFO(g)

GL.ISOSURFACE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.ISOSURFACE handle, stack [, threshold01 [, color [, sampleStepXY [, sampleStepT [, zStep [, wireframe [, maxTriangles]]]]]]]

Extracts a lightweight triangulated isosurface from a W x H x T stack using a marching-tetrahedra pass. threshold01 is normalized over the sampled volume.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.
maxTrianglesOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.ISOSURFACE g, stack, 0.50, "#80d8ff", 1, 1, 4, FALSE, 200000

GL.ITEM_COUNT

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.ITEM_COUNT(handle)

Returns the number of internal GL items currently stored in a scene, including grids, axes and labels.

Minimal example

PRINT GL.ITEM_COUNT(g)

GL.LABEL

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.LABEL handle, x, y, z, text [, color [, size]]

Alias of GL.TEXT.

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
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.LABEL

GL.LAST_ID

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.LAST_ID(handle)

Returns the object id assigned to the last GL object added to the scene. Useful before GL.HIDE, GL.SHOW, GL.DELETE or style changes.

Minimal example

id = GL.LAST_ID(g)

GL.LINE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.LINE handle, x1, y1, z1, x2, y2, z2 [, color [, width]]

Adds one 3D line segment to the scene.

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
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.LINE g, 0, 0, 0, 100, 0, 0, "red", 2

GL.LOAD_OBJ

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.IMPORT_OBJ handle, path [, color [, wireframe]]

Imports a simple Wavefront OBJ mesh. v and f records are supported; polygonal faces are triangulated as fans. If the OBJ has vertices but no faces, it is imported as a point cloud.

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
colorOptional plot/drawing color value.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.LOAD_OBJ

GL.MARCHING_CUBES

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.MARCHING_CUBES handle, stack [, threshold01 [, color [, sampleStepXY [, sampleStepT [, zStep [, wireframe [, maxTriangles]]]]]]]

Alias of GL.ISOSURFACE. The current implementation uses marching tetrahedra internally to avoid large lookup tables while still producing triangular isosurfaces.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.
maxTrianglesOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.MARCHING_CUBES g, stack, 0.62, "#ff9060", 1, 1, 4, TRUE, 160000

GL.MARCHING_TETRAHEDRA

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.ISOSURFACE handle, stack [, threshold01 [, color [, sampleStepXY [, sampleStepT [, zStep [, wireframe [, maxTriangles]]]]]]]

Extracts a lightweight triangulated isosurface from a W x H x T stack using a marching-tetrahedra pass. threshold01 is normalized over the sampled volume.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.
maxTrianglesOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.MARCHING_TETRAHEDRA

GL.MESH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.MESH handle, "x,y,z;...", "i,j,k;i,j,k;..." [, color [, wireframe]]

Adds a triangular mesh from a vertex list and a face list. Face indices may be 0-based or 1-based; polygons with more than three indices are triangulated as fans.

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
colorOptional plot/drawing color value.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.MESH g, vertices, faces, "#b4dcff", FALSE

GL.NEW

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.NEW([title [, width [, height [, background]]]])

Alias of GL.CREATE.

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.
widthOptional parameter. If omitted, the command uses its internal default.
heightOptional parameter. If omitted, the command uses its internal default.
backgroundInitial canvas background value.

Minimal example

value = GL.NEW([title [, width [, height [, background]]]])

GL.OBJECT_COUNT

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.OBJECT_COUNT(handle)

Returns the number of user geometry objects, excluding helper grids and axes.

Minimal example

PRINT GL.OBJECT_COUNT(g)

GL.POINT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.POINT handle, x, y, z [, color [, size]]

Adds one 3D point to the scene.

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
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.POINT g, 0, 0, 0, "yellow", 6

GL.POINTCLOUD_FROM_IMAGE

STATEMENTGLGUI / INTERACTIVEIMAGE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.POINTCLOUD_FROM_IMAGE handle, image [, threshold01 [, color [, size [, sampleStep [, frame [, zScale [, maxPoints]]]]]]]

Converts bright pixels of an image frame into a sparse 3D point cloud. X/Y come from image coordinates, Z comes from normalized luminance times zScale.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.
zScaleOptional parameter. If omitted, the command uses its internal default.
maxPointsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.POINTCLOUD_FROM_IMAGE g, img, 0.65, "#ffcc40", 3, 2, 0, 70

GL.POINTCLOUD_FROM_STACK

STATEMENTGLGUI / INTERACTIVESTACK / VIDEO
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.POINTCLOUD_FROM_STACK handle, stack [, threshold01 [, color [, size [, sampleStepXY [, sampleStepT [, zStep [, maxPoints]]]]]]]

Alias of GL.VOXELS.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
maxPointsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.POINTCLOUD_FROM_STACK g, stack, 0.65, "#ffcc40", 3

GL.POINTS

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.POINTS handle, "x,y,z;x,y,z;..." [, color [, size]]

Adds a batch of independent 3D points, useful for point clouds, samples and phase-space scatter plots.

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
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.POINTS g, "0,0,0;10,20,5;30,10,15", "yellow", 5

GL.POLYLINE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.POLYLINE handle, "x,y,z;x,y,z;..." [, color [, width]]

Adds a connected 3D polyline from a semicolon/newline-separated list of x,y,z points.

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
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.POLYLINE g, "0,0,0;10,20,5;30,10,15", "#ffc040", 2

GL.RAYMARCH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.RAYMARCH handle, stack [, mode [, threshold01 [, opacity [, sampleStepXY [, sampleStepT [, zStep [, colormap [, maxQuads]]]]]]]]

Alias of GL.VOLUME. Practical slice/ray-sampling preview before heavier GPU 3D-texture ray marching.

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.
threshold01Optional parameter. If omitted, the command uses its internal default.
opacityOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
colormapOptional parameter. If omitted, the command uses its internal default.
maxQuadsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.RAYMARCH g, stack, "mip", 0.22, 0.75, 2, 1, 4, "viridis", 60000

GL.RENDER_MODE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.RENDER_MODE handle, mode

Selects the GL renderer path. Modes: AUTO uses shader/VBO when available; MODERN requests the shader/VBO path; LEGACY forces the fixed-pipeline fallback.

Minimal example

GL.RENDER_MODE g, "modern"

GL.RENDERER

FUNCTIONGLGUI / INTERACTIVE
Kind: Function   Category: OpenGL 3D functions   Namespace: GL

GL.RENDERER(handle)

Returns the requested renderer mode, active renderer and shader/VBO initialization status.

Minimal example

PRINT GL.RENDERER(g)

GL.REPORT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.REPORT handle, htmlPath [, snapshotPath]

Public cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

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

Minimal example

GL.REPORT

GL.RESET_VIEW

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.RESET_VIEW handle

Alias of GL.RESETVIEW.

Minimal example

GL.RESET_VIEW

GL.RESETVIEW

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.RESETVIEW handle

Resets the GL viewer orientation, pan and zoom.

Minimal example

GL.RESETVIEW g

GL.ROTATE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.ROTATE handle [, dRotX [, dRotY [, dRotZ]]]

Adds incremental camera rotation deltas to the current GL view. Useful inside animation loops.

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

Minimal example

GL.ROTATE g, 0, 1.5, 0

GL.SAVE_SCENE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SAVE_SCENE handle, path

Public cvBasic command exported from the live interpreter registry. Documentation entry auto-generated from runtime metadata.

Minimal example

GL.SAVE_SCENE

GL.SET_COLOR

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_COLOR handle, objectId, color

Changes object color. For gradient surfaces this switches the object to a flat color.

Minimal example

GL.SET_COLOR g, id, "#ffcc00"

GL.SET_FPS

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_FPS handle, fps

Sets the default frame delay used by GL.FRAME for this viewer.

Minimal example

GL.SET_FPS g, 30

GL.SET_SIZE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_SIZE handle, objectId, size

Changes point size or text size for compatible GL objects.

Minimal example

GL.SET_SIZE g, id, 8

GL.SET_TITLE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_TITLE handle, title

Changes the GL MDI window title. Alias: GL.TITLE.

Minimal example

GL.SET_TITLE g, "Final scene"

GL.SET_WIDTH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_WIDTH handle, objectId, width

Changes line width for line, polyline, grid, axes, arrow, wireframe and mesh-outline objects.

Minimal example

GL.SET_WIDTH g, id, 3

GL.SHADED

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SHADED handle [, enabled]

Toggles the simple face-normal shading used by GL.SURFACE and GL.MESH.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

GL.SHADED g, TRUE

GL.SHOW

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SHOW handle, objectId

Shows a previously hidden GL object.

Minimal example

GL.SHOW g, id

GL.SIZE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_SIZE handle, objectId, size

Changes point size or text size for compatible GL objects.

Minimal example

GL.SIZE

GL.SLICE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SLICE handle, stack, axis, index [, scale [, lowColor [, highColor [, sampleStep [, zStep [, wireframe]]]]]]

Displays an orthogonal X/Y/Z section of a stack as a triangulated relief surface. X/Y are image axes and Z is frame/time; scale extrudes luminance along the slice normal.

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.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.SLICE g, stack, "Z", 8, 24, "#2050c0", "#ffe070", 1, 4, TRUE

GL.SLICE_X

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SLICE_X handle, stack, xIndex [, scale [, lowColor [, highColor [, sampleStep [, zStep [, wireframe]]]]]]

Displays the Y/T section at a fixed image column xIndex, useful for temporal stack inspection.

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.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.SLICE_X g, stack, 32, 20, "#203080", "#ffdf70", 1, 4, TRUE

GL.SLICE_Y

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SLICE_Y handle, stack, yIndex [, scale [, lowColor [, highColor [, sampleStep [, zStep [, wireframe]]]]]]

Displays the X/T section at a fixed image row yIndex, revealing temporal trajectories and rotating/moving patterns.

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.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.SLICE_Y g, stack, 32, 20, "#203080", "#ffdf70", 1, 4, TRUE

GL.SLICE_Z

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SLICE_Z handle, stack, frameIndex [, scale [, lowColor [, highColor [, sampleStep [, zStep [, wireframe]]]]]]

Displays one normal image frame of the stack as a relief slice positioned at its temporal Z coordinate.

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.
lowColorOptional parameter. If omitted, the command uses its internal default.
highColorOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
wireframeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.SLICE_Z g, stack, 8, 22, "#2050c0", "#ffe070", 1, 4, TRUE

GL.SNAPSHOT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SNAPSHOT handle, path

Saves the current GL framebuffer to an image file such as PNG/JPG/BMP.

Minimal example

GL.SNAPSHOT g, "gl_scene.png"

GL.STACK_POINTS

STATEMENTGLGUI / INTERACTIVESTACK / VIDEO
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.VOXELS handle, stack [, threshold01 [, color [, size [, sampleStepXY [, sampleStepT [, zStep [, maxPoints]]]]]]]

Displays a stack/image as a thresholded voxel-like point cloud. X/Y are image coordinates, Z is frame index times zStep.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
maxPointsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.STACK_POINTS

GL.SURFACE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SURFACE handle, "x,y,z;x,y,z;...", cols, rows [, lowColor [, highColor [, wireframe]]]

Adds a shaded triangulated surface from a row-major cols x rows grid of 3D points. The surface uses a simple z-gradient between lowColor and highColor.

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

Minimal example

GL.SURFACE g, pts, 64, 64, "#2060ff", "#ffe060", FALSE

GL.SYNC

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SYNC handle [, maxMs]

Processes pending GUI events briefly after heavy GL scene construction.

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

Minimal example

GL.SYNC g, 50

GL.TEXT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.TEXT handle, x, y, z, text [, color [, size]]

Adds a projected 3D label anchored at x,y,z. The label follows camera rotation and zoom.

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
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.TEXT g, 0, 0, 0, "origin", "white", 12

GL.TITLE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.TITLE handle, title

Alias of GL.SET_TITLE.

Minimal example

GL.TITLE

GL.UPDATE_LINE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_LINE handle, objectId, x1, y1, z1, x2, y2, z2

Updates the endpoints of an existing line-segment object.

Minimal example

GL.UPDATE_LINE g, lineId, 0,0,0, x,y,z

GL.UPDATE_MESH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_MESH handle, objectId, "x,y,z;...", "i,j,k;..."

Replaces vertices/faces of an existing GL.MESH/GL.ISOSURFACE mesh object.

Minimal example

GL.UPDATE_MESH g, meshId, verts, faces

GL.UPDATE_POINTS

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_POINTS handle, objectId, "x,y,z;x,y,z;..."

Replaces the vertex list of an existing GL.POINT/GL.POINTS object without creating a new object. Useful for particle animation.

Minimal example

GL.UPDATE_POINTS g, pid, pts

GL.UPDATE_POLYLINE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_POLYLINE handle, objectId, "x,y,z;x,y,z;..."

Replaces the points of an existing GL.POLYLINE object while preserving its color/width.

Minimal example

GL.UPDATE_POLYLINE g, trailId, trailPts

GL.UPDATE_SURFACE

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_SURFACE handle, objectId, "x,y,z;x,y,z;...", cols, rows

Replaces the grid geometry of an existing GL.SURFACE/heightfield/slice object. Style and colormap are preserved.

Minimal example

GL.UPDATE_SURFACE g, surfId, pts, cols, rows

GL.UPDATE_TEXT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.UPDATE_TEXT handle, objectId, x, y, z, text

Moves and rewrites an existing GL.TEXT/GL.LABEL object.

Minimal example

GL.UPDATE_TEXT g, labelId, x, y, z, "t=" + STR(t)

GL.VIEW

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.VIEW handle, rotX, rotY, rotZ [, zoom]

Sets the initial 3D camera orientation and zoom. Users can still rotate/pan/zoom interactively.

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

Minimal example

GL.VIEW g, 28, -35, 0, 1.0

GL.VOLUME

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.VOLUME handle, stack [, mode [, threshold01 [, opacity [, sampleStepXY [, sampleStepT [, zStep [, colormap [, maxQuads]]]]]]]]

Adds a CPU-built transparent volume-render mesh from a stack. Modes: alpha, threshold, mip. It uses per-vertex color/alpha and the GL alpha-blending renderer.

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.
threshold01Optional parameter. If omitted, the command uses its internal default.
opacityOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
colormapOptional parameter. If omitted, the command uses its internal default.
maxQuadsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.VOLUME g, stack, "alpha", 0.18, 0.08, 2, 1, 4, "thermal", 80000

GL.VOLUME_RENDER

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.VOLUME_RENDER handle, stack [, mode [, threshold01 [, opacity [, sampleStepXY [, sampleStepT [, zStep [, colormap [, maxQuads]]]]]]]]

Alias of GL.VOLUME.

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.
threshold01Optional parameter. If omitted, the command uses its internal default.
opacityOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
colormapOptional parameter. If omitted, the command uses its internal default.
maxQuadsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.VOLUME_RENDER g, stack, "threshold", 0.45, 0.20, 2, 1, 4, "blue-red", 50000

GL.VOXELS

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.VOXELS handle, stack [, threshold01 [, color [, size [, sampleStepXY [, sampleStepT [, zStep [, maxPoints]]]]]]]

Displays a stack/image as a thresholded voxel-like point cloud. X/Y are image coordinates, Z is frame index times zStep.

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
threshold01Optional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
sizeOptional parameter. If omitted, the command uses its internal default.
sampleStepXYOptional parameter. If omitted, the command uses its internal default.
sampleStepTOptional parameter. If omitted, the command uses its internal default.
zStepOptional parameter. If omitted, the command uses its internal default.
maxPointsOptional parameter. If omitted, the command uses its internal default.

Minimal example

GL.VOXELS g, stack, 0.60, "#ffb030", 3, 1, 1, 4, 100000

GL.WAIT

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.WAIT handle [, maxMs]

Processes pending GUI events for animation pacing with an explicit millisecond delay.

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

Minimal example

GL.WAIT g, 16

GL.WIDTH

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.SET_WIDTH handle, objectId, width

Changes line width for line, polyline, grid, axes, arrow, wireframe and mesh-outline objects.

Minimal example

GL.WIDTH

GL.WIREFRAME

STATEMENTGLGUI / INTERACTIVE
Kind: Command   Category: OpenGL 3D commands   Namespace: GL

GL.WIREFRAME handle [, enabled]

Toggles global wireframe display for GL.SURFACE and GL.MESH objects.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

GL.WIREFRAME g, TRUE

GUI.CLEAR_ROI

STATEMENTGUIGUI / INTERACTIVEROI
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.CLEAR_ROI windowTitle

Clears the current ROI from the selected image/stack window.

Minimal example

GUI.CLEAR_ROI "Input image"

GUI.CLOSE

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.CLOSE [windowTitle]

Closes an image or stack window in the GUI MDI area. Without arguments it closes the active image/stack 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
windowTitleOptional parameter. If omitted, the command uses its internal default.

Minimal example

GUI.CLOSE "Preview"
GUI.CLOSE

GUI.CONFIRM

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.CONFIRM(text [, title])

Shows a Yes/No confirmation dialog and returns TRUE for Yes, FALSE for No.

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

IF NOT GUI.CONFIRM("Continue?", "Confirm") THEN
    EXIT
ENDIF

GUI.CREATE_TRACKBAR

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.TRACKBAR name, panelTitle, min, max [, value]

Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().

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

GUI.CREATE_TRACKBAR

GUI.DRAWING

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_DRAWING(windowTitle [, shape [, pointMode]])

Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].

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

Minimal example

value = GUI.GET_DRAWING(windowTitle [, shape [, pointMode]])

GUI.GET_COLOR

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_COLOR([initialColor [, title]])

Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.

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
initialColorOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

color = GUI.GET_COLOR("#FF8000", "Pick overlay color")
IF color = "" THEN
    EXIT
ENDIF

GUI.GET_DRAWING

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_DRAWING(windowTitle [, shape [, pointMode]])

Generic drawing query. RECT/ROI/BOX returns [x,y,w,h]; POINT/CENTER/TOPLEFT/BOTTOMRIGHT returns [x,y].

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

Minimal example

rect = GUI.GET_DRAWING("Source", "RECT")
p = GUI.GET_DRAWING("Source", "POINT")

GUI.GET_EXISTING_DIRECTORY

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_EXISTING_DIRECTORY([title [, dir]])

Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.

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

Minimal example

dir = GUI.GET_EXISTING_DIRECTORY("Select dataset folder")
IF dir = "" THEN
    EXIT
ENDIF

GUI.GET_OPEN_FILE_NAME

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])

Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.

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

Minimal example

file = GUI.GET_OPEN_FILE_NAME("Open image", "", "Images (*.png *.jpg *.tif *.tiff *.fit *.fits *.fts);;All files (*)")
IF file = "" THEN
    EXIT
ENDIF

GUI.GET_OPEN_FILE_NAMES

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])

Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.

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

Minimal example

files = GUI.GET_OPEN_FILE_NAMES("Open images", "", "Images (*.png *.jpg *.tif *.tiff *.fit *.fits *.fts);;All files (*)")
PRINT files

GUI.GET_POINT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_POINT(windowTitle [, mode])

Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

p = GUI.GET_POINT("Source")
PRINT ARRAY.GET(p,0), ARRAY.GET(p,1)

GUI.GET_RECT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_RECT(windowTitle)

Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].

Minimal example

rect = GUI.GET_RECT("Source")
PRINT ARRAY.GET(rect,0), ARRAY.GET(rect,1)

GUI.GET_ROI_RECT

FUNCTIONGUIGUI / INTERACTIVEROI
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_RECT(windowTitle)

Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].

Minimal example

value = GUI.GET_RECT(windowTitle)

GUI.GET_SAVE_FILE_NAME

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])

Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.

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

Minimal example

outPath = GUI.GET_SAVE_FILE_NAME("Save result", "result.png", "PNG (*.png);;All files (*)")
IF outPath = "" THEN
    EXIT
ENDIF

GUI.GET_TRACKBAR_POS

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.TRACKBAR_POS(name, panelTitle)

Returns the current integer value of a GUI trackbar.

Minimal example

value = GUI.TRACKBAR_POS(name, panelTitle)

GUI.GETCOLOR

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_COLOR([initialColor [, title]])

Shows a QColorDialog::getColor-style dialog and returns the chosen color as #RRGGBB. Returns an empty string if the user cancels.

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
initialColorOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

value = GUI.GET_COLOR([initialColor [, title]])

GUI.GETEXISTINGDIRECTORY

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_EXISTING_DIRECTORY([title [, dir]])

Shows a QFileDialog::getExistingDirectory-style dialog and returns the selected directory. Returns an empty string if the user cancels.

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

Minimal example

value = GUI.GET_EXISTING_DIRECTORY([title [, dir]])

GUI.GETOPENFILENAME

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])

Shows a QFileDialog::getOpenFileName-style dialog and returns one selected file path. Returns an empty string if the user cancels.

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

Minimal example

value = GUI.GET_OPEN_FILE_NAME([title [, dir [, filter]]])

GUI.GETOPENFILENAMES

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])

Shows a QFileDialog::getOpenFileNames-style dialog and returns selected file paths separated by newline characters. Returns an empty string if the user cancels.

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

Minimal example

value = GUI.GET_OPEN_FILE_NAMES([title [, dir [, filter]]])

GUI.GETSAVEFILENAME

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])

Shows a QFileDialog::getSaveFileName-style dialog and returns the destination path. Returns an empty string if the user cancels.

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

Minimal example

value = GUI.GET_SAVE_FILE_NAME([title [, dir [, filter]]])

GUI.HISTOGRAM

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.HISTOGRAM mode, image, bins [, title]

Creates an interactive DataPlot histogram from an image. Modes include GRAY, RGB, BGR, R, G, B and A.

Optional parameters

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

ParameterMeaning
titleOptional GUI/DataPlot window title.

Minimal example

p = GUI.HISTOGRAM "GRAY", img, 256
pRgb = GUI.HISTOGRAM "RGB", img, 256

GUI.INPUT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.INPUT(prompt [, defaultText [, title]])

Shows a modal text input dialog and returns the entered string.

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
defaultTextDefault text shown by the input dialog.
titleOptional GUI/DataPlot window title.

Minimal example

name = GUI.INPUT("Dataset name", "test", "Input")

GUI.INPUT_NUMBER

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])

Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.

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
defaultValueOptional parameter. If omitted, the command uses its internal default.
minValueLower numeric range limit.
maxValueUpper numeric range limit.
decimalsOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

thr = GUI.INPUT_NUMBER("Threshold", 128, 0, 255, 0, "Input")
IF thr = "" THEN
    EXIT
ENDIF

GUI.INPUT_TEXT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.INPUT_TEXT(prompt [, defaultText [, title]])

Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels.

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
defaultTextDefault text shown by the input dialog.
titleOptional GUI/DataPlot window title.

Minimal example

name = GUI.INPUT_TEXT("Operator name", "Manuele", "Input")
IF name = "" THEN
    EXIT
ENDIF

GUI.MESSAGE

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.MESSAGE text [, title]

Alias of GUI.MSGBOX with a clearer name for script-driven user messages.

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

GUI.MESSAGE "Processing complete", "cvBasic"

GUI.MSGBOX

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.MSGBOX text [, title]

Shows a Qt information message 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
titleOptional GUI/DataPlot window title.

Minimal example

GUI.MSGBOX "Processing complete", "cvBasic"

GUI.NUMBER_INPUT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])

Shows a numeric input dialog. Returns the selected number, or an empty string if the user cancels.

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
defaultValueOptional parameter. If omitted, the command uses its internal default.
minValueLower numeric range limit.
maxValueUpper numeric range limit.
decimalsOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

value = GUI.INPUT_NUMBER(prompt [, defaultValue [, minValue [, maxValue [, decimals [, title]]]]])

GUI.POINT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_POINT(windowTitle [, mode])

Returns a picked point as [x,y], derived from the current ROI. mode can be CENTER, TOPLEFT or BOTTOMRIGHT.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

value = GUI.GET_POINT(windowTitle [, mode])

GUI.PROFILE

FUNCTIONGUIGUI / INTERACTIVEFILE I/O
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.PROFILE mode, image, coord OR GUI.PROFILE mode, image, sx, sy, dx, dy [, title]

Creates an interactive DataPlot profile from an image. Modes: H row profile, V column profile, XY arbitrary line profile with bilinear sampling.

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

p = GUI.PROFILE "H", img, 120
pLine = GUI.PROFILE "XY", img, 10, 10, 250, 180

GUI.RECT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.GET_RECT(windowTitle)

Returns the current interactive ROI rectangle from a GUI image/stack window as an array [x,y,w,h].

Minimal example

value = GUI.GET_RECT(windowTitle)

GUI.RELEASE_TRACKBARS

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.RELEASE_TRACKBARS [panelTitle]

Removes all trackbars, or only those belonging to the selected panel.

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

Minimal example

GUI.RELEASE_TRACKBARS "Controls"

GUI.ROI_HISTOGRAM

FUNCTIONGUIGUI / INTERACTIVEROI
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.ROI_HISTOGRAM mode, image, x, y, w, h, bins [, title]

Creates an interactive DataPlot histogram from a ROI using x,y,w,h and the selected histogram mode.

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

p = GUI.ROI_HISTOGRAM "GRAY", img, 100, 80, 200, 120, 256

GUI.ROI_PROFILE

FUNCTIONGUIGUI / INTERACTIVEFILE I/OROI
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.ROI_PROFILE mode, image, x, y, w, h [, title]

Creates an interactive DataPlot profile from a ROI using x,y,w,h. H averages vertically per column; V averages horizontally per row.

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

p = GUI.ROI_PROFILE "H", img, 100, 80, 200, 40

GUI.SET_TRACKBAR_POS

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.SET_TRACKBAR_POS name, panelTitle, value

Sets an existing trackbar position from script.

Minimal example

GUI.SET_TRACKBAR_POS "Brightness", "Controls", 0

GUI.SHOW

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.SHOW imageOrStack [, title]

Displays an image or stack in the GUI MDI area. If a title is provided and an image window with the same title already exists, that window is updated instead of opening a new one.

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

GUI.SHOW img, "Preview"

GUI.TEXT_INPUT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.INPUT_TEXT(prompt [, defaultText [, title]])

Shows a text input dialog and returns the entered string. Returns an empty string if the user cancels.

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
defaultTextDefault text shown by the input dialog.
titleOptional GUI/DataPlot window title.

Minimal example

value = GUI.INPUT_TEXT(prompt [, defaultText [, title]])

GUI.TRACKBAR

STATEMENTGUIGUI / INTERACTIVE
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.TRACKBAR name, panelTitle, min, max [, value]

Creates or updates a Qt slider similar in spirit to OpenCV createTrackbar. Read it with GUI.TRACKBAR_POS().

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

GUI.TRACKBAR "Brightness", "Controls", -100, 100, 0

GUI.TRACKBAR_POS

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.TRACKBAR_POS(name, panelTitle)

Returns the current integer value of a GUI trackbar.

Minimal example

b = GUI.TRACKBAR_POS("Brightness", "Controls")

GUI.TRACKBAR_VALUE

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.TRACKBAR_POS(name, panelTitle)

Returns the current integer value of a GUI trackbar.

Minimal example

value = GUI.TRACKBAR_POS(name, panelTitle)

GUI.WAIT_DRAWING

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.WAIT_DRAWING(windowTitle [, shape [, pointMode]])

Generic interactive drawing wait. It waits for a GUI ROI change and returns either a rectangle array or point 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
shapeOptional parameter. If omitted, the command uses its internal default.
pointModeOptional parameter. If omitted, the command uses its internal default.

Minimal example

rect = GUI.WAIT_DRAWING("Source", "RECT")

GUI.WAIT_KEY

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.WAIT_KEY([delayMs])

Processes GUI events for delayMs milliseconds and returns the last pressed key as uppercase text, or an empty string when no key was pressed. delayMs=0 waits indefinitely.

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

Minimal example

key = GUI.WAIT_KEY(10)
IF key = "Q" OR key = "X" THEN
    running = FALSE
ENDIF

GUI.WAIT_POINT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.WAIT_POINT(windowTitle [, mode])

Waits for a ROI/pick and returns the selected point as [x,y]. The default point is the ROI center.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

p = GUI.WAIT_POINT("Source", "CENTER")

GUI.WAIT_RECT

FUNCTIONGUIGUI / INTERACTIVE
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.WAIT_RECT(windowTitle)

Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].

Minimal example

rect = GUI.WAIT_RECT("Source")
patch = ROI.EXTRACT(img, rect)

GUI.WAIT_ROI

STATEMENTGUIGUI / INTERACTIVEROI
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.WAIT_ROI windowTitle

Waits until the user creates, moves or resizes a ROI in the selected image/stack window.

Minimal example

GUI.WAIT_ROI "Input image"

GUI.WAIT_ROI_CHANGE

STATEMENTGUIGUI / INTERACTIVEROI
Kind: Command   Category: GUI interaction statements   Namespace: GUI

GUI.WAIT_ROI_CHANGE windowTitle

Waits for any committed desktop ROI change. Use ROI.FROM_DESKTOP(img,title) to copy it into an image object, or ROI.CHANGE(title)/ROI.REVISION(title) to inspect the GUI state.

Minimal example

GUI.WAIT_ROI_CHANGE "Input image"
PRINT ROI.CHANGE("Input image"), ROI.REVISION("Input image")

GUI.WAIT_ROI_RECT

FUNCTIONGUIGUI / INTERACTIVEROI
Kind: Function   Category: Hybrid GUI functions   Namespace: GUI

GUI.WAIT_RECT(windowTitle)

Waits until the user draws/changes a ROI, then returns the rectangle as [x,y,w,h].

Minimal example

value = GUI.WAIT_RECT(windowTitle)

IF

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

IF condition THEN [statement]

Starts a conditional block. If a statement follows THEN on the same line, it is executed as a one-line IF without requiring ENDIF.

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

Minimal example

IF CV.WIDTH(img) > 512 THEN
    PRINT "large image"
ELSE
    PRINT "small image"
ENDIF

IF v < 0 THEN v = 0

IMAGE

KEYWORDBATCH-FRIENDLYIMAGE
Kind: Keyword   Category: Language keywords   Namespace: CORE

IMAGE

Logical type returned by TYPE(x) for single images.

Minimal example

IMAGE

IN

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FOR elem IN arrayExpr

Introduces the collection expression in a FOR IN loop. Arrays are iterated in row-major linear order; strings are iterated character by character.

Minimal example

FOR i = 0 TO 9 STEP 1
    PRINT i
NEXT

DIM values(3)
values(0) = 10
values(1) = 20
values(2) = 30
FOR v IN values
    PRINT v
NEXT

INCLUDE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

INCLUDE "library.cvb"

Alias of USING. Includes another cvBasic source file before execution, with the same path resolution, nested include support and recursive cycle protection.

Minimal example

INCLUDE "lib/algebra_utils.cvb"

PRINT VEC2_NORM([3, 4])

IO.ABS_PATH

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.ABS_PATH(path)

Returns the absolute version of a path.

Minimal example

value = IO.ABS_PATH(path)

IO.APPEND_TEXT

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.APPEND_TEXT(path,text)

Appends UTF-8 text to a file and returns TRUE on success.

Minimal example

value = IO.APPEND_TEXT(path,text)

IO.BASE_NAME

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.BASE_NAME(path)

File name without the final extension.

Minimal example

value = IO.BASE_NAME(path)

IO.CAMERA_GET

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File / media IO statements   Namespace: IO

IO.CAMERA_GET cameraIndex, property AS value

Reads an OpenCV VideoCapture property and assigns the numeric value.

Minimal example

IO.CAMERA_GET 0, FPS AS fps
PRINT fps

IO.CAMERA_GET

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CAMERA_GET cameraIndex, property AS value

Reads an OpenCV VideoCapture property and assigns the numeric value.

Minimal example

IO.CAMERA_GET 0, FPS AS fps
PRINT fps

IO.CAMERA_IS_OPEN

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CAMERA_IS_OPEN([cameraIndex])

Returns TRUE when the selected camera index is currently open inside the script runtime.

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

Minimal example

PRINT IO.CAMERA_IS_OPEN(0)

IO.CAMERA_PROP_ID

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CAMERA_PROP_ID(property)

Returns the numeric OpenCV CAP_PROP id for a known friendly property name, or -1 if unknown.

Minimal example

PRINT IO.CAMERA_PROP_ID("EXPOSURE")

IO.CAMERA_PROPS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File / media IO statements   Namespace: IO

IO.CAMERA_PROPS [cameraIndex] AS table

Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.

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

Minimal example

IO.CAMERA_PROPS 0 AS props
PRINT ARRAY.DIMSIZE(props, 0)

IO.CAMERA_PROPS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CAMERA_PROPS [cameraIndex] AS table

Returns a diagnostic table with columns: name, OpenCV property id, current value, writable flag.

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

Minimal example

IO.CAMERA_PROPS 0 AS props
PRINT ARRAY.DIMSIZE(props, 0)

IO.CAMERA_RELEASE

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.CAMERA_RELEASE [cameraIndex]

Releases an opened camera handle. Use this when a script has finished acquiring 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
cameraIndexOptional parameter. If omitted, the command uses its internal default.

Minimal example

IO.CAMERA_RELEASE 0

IO.CAMERA_SET

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.CAMERA_SET cameraIndex, property, value

Sets an OpenCV VideoCapture property. Property can be a friendly name such as FPS, WIDTH, HEIGHT, EXPOSURE or GAIN, quoted or bare.

Minimal example

IO.CAMERA_SET 0, WIDTH, 1280
IO.CAMERA_SET 0, HEIGHT, 720
IO.CAMERA_SET 0, FPS, 30

IO.CANONICAL_PATH

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CANONICAL_PATH(path)

Returns the canonical existing path with symlinks resolved when possible.

Minimal example

value = IO.CANONICAL_PATH(path)

IO.CAPTURE_FRAME

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.CAPTURE_FRAME [cameraIndex] AS img

Captures one BGR frame from a camera. The camera is opened lazily and kept open for following captures until IO.CAMERA_RELEASE is called.

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

Minimal example

IO.CAPTURE_FRAME 0 AS frame
GUI.SHOW frame

IO.CLEAR_ERROR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CLEAR_ERROR()

Clears the stored non-fatal runtime error and returns TRUE.

Minimal example

ok = IO.CLEAR_ERROR()

IO.COPY_FILE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.COPY_FILE(source,target[,overwrite])

Copies a file and returns TRUE on success.

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

Minimal example

value = IO.COPY_FILE(source,target[,overwrite])

IO.CSV_COLS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_COLS(path [, header [, delimiter]])

Returns the number of columns in a CSV/text table.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

n = IO.CSV_COLS("measurements.csv")

IO.CSV_COLUMN

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_COLUMN(path, field [, header [, delimiter]])

Returns one selected CSV column as newline-separated text. The selector may be a header name or a zero-based index.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

values = IO.CSV_COLUMN("measurements.csv", "temperature")

IO.CSV_COLUMN_ARRAY

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_COLUMN_ARRAY(path, field [, header [, numeric [, delimiter]]])

Loads a selected CSV column into a script array. Pass numeric=TRUE to force numeric conversion.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
numericWhen true, forces numeric conversion of CSV values.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

temps = IO.CSV_COLUMN_ARRAY("measurements.csv", "temperature", "AUTO", TRUE)

IO.CSV_FIELD

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_FIELD(path, row, field [, header [, delimiter]])

Returns one CSV cell as text. The field selector may be a header name or a zero-based column index.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

v = IO.CSV_FIELD("measurements.csv", 0, "temperature")

IO.CSV_HEADERS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_HEADERS(path [, header [, delimiter]])

Returns available CSV field names as newline-separated text. If no header exists, synthetic Column N names are returned.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

PRINT IO.CSV_HEADERS("measurements.csv")

IO.CSV_INFO

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_INFO(path [, header [, delimiter]])

Analyzes and loads a CSV/text table using auto-detected delimiter and header by default, then returns a diagnostic text summary.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

PRINT IO.CSV_INFO("measurements.csv")

IO.CSV_NUMBER

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_NUMBER(path, row, field [, header [, delimiter]])

Returns one CSV cell parsed as a flexible number, supporting decimal comma and decimal point.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

t = IO.CSV_NUMBER("measurements.csv", 0, "temperature")

IO.CSV_ROWS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_ROWS(path [, header [, delimiter]])

Returns the number of data rows in a CSV/text table.

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
headerCSV header policy, usually AUTO, TRUE or FALSE.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

n = IO.CSV_ROWS("measurements.csv")

IO.CSV_TABLE_ARRAY

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CSV_TABLE_ARRAY(path [, header [, numeric [, delimiter]]])

Loads the whole CSV data table into a two-dimensional script 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
headerCSV header policy, usually AUTO, TRUE or FALSE.
numericWhen true, forces numeric conversion of CSV values.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

table = IO.CSV_TABLE_ARRAY("measurements.csv", "AUTO", TRUE)

IO.CURRENT_DIR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.CURRENT_DIR()

Returns the current working directory.

Minimal example

value = IO.CURRENT_DIR()

IO.DIR_EXISTS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.DIR_EXISTS(path)

TRUE if a path exists and is a directory.

Minimal example

value = IO.DIR_EXISTS(path)

IO.DIR_LIST

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.DIR_LIST(path[,pattern[,mode]])

Returns a newline-separated directory listing.

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
patternOptional parameter. If omitted, the command uses its internal default.
modeMode selector; accepted values are described in the command text.

Minimal example

value = IO.DIR_LIST(path[,pattern[,mode]])

IO.DIR_NAME

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.DIR_NAME(path)

Parent directory component of a path.

Minimal example

value = IO.DIR_NAME(path)

IO.EXT

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.EXT(path)

Final file extension without the dot.

Minimal example

value = IO.EXT(path)

IO.FCLOSE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FCLOSE(handle)

Closes a file handle and returns TRUE on success.

Minimal example

value = IO.FCLOSE(handle)

IO.FEOF

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FEOF(handle)

Returns TRUE when the file handle is invalid or at end-of-file.

Minimal example

value = IO.FEOF(handle)

IO.FFLUSH

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FFLUSH(handle)

Flushes pending writes on an open file handle.

Minimal example

value = IO.FFLUSH(handle)

IO.FILE_EXISTS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FILE_EXISTS(path)

TRUE if a path exists and is a file.

Minimal example

value = IO.FILE_EXISTS(path)

IO.FILE_NAME

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FILE_NAME(path)

Final file or directory name component.

Minimal example

value = IO.FILE_NAME(path)

IO.FILE_SIZE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FILE_SIZE(path)

Size in bytes, or -1 when unavailable.

Minimal example

value = IO.FILE_SIZE(path)

IO.FOPEN

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FOPEN(path[,mode])

Opens a file and returns a numeric runtime handle. Modes follow fopen-style strings such as r, w, a, rb, wb, r+, w+.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

value = IO.FOPEN(path[,mode])

IO.FPRINTF

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FPRINTF(handle,format[,v1[,v2...v8]])

Writes formatted text to an open file handle using simple %s, %d, %f, %g placeholders.

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

Minimal example

value = IO.FPRINTF(handle,format[,v1[,v2...v8]])

IO.FREAD

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FREAD(handle,byteCount)

Reads a byte block from an open file handle and returns it as text.

Minimal example

value = IO.FREAD(handle,byteCount)

IO.FREADLINE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FREADLINE(handle)

Reads one text line from an open file handle without the trailing newline.

Minimal example

value = IO.FREADLINE(handle)

IO.FSCANF

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FSCANF(handle[,format])

Reads the next whitespace-separated token, optionally converting it using %s, %d, %f or %g.

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

Minimal example

value = IO.FSCANF(handle[,format])

IO.FSEEK

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FSEEK(handle,offset[,origin])

Moves the current file position. Origin can be SET, CUR or END.

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

Minimal example

value = IO.FSEEK(handle,offset[,origin])

IO.FTELL

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FTELL(handle)

Returns the current byte position of an open file handle.

Minimal example

value = IO.FTELL(handle)

IO.FWRITE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.FWRITE(handle,value)

Writes text/raw UTF-8 bytes to an open file handle and returns the number of bytes written.

Minimal example

value = IO.FWRITE(handle,value)

IO.HOME_DIR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.HOME_DIR()

Returns the user's home directory.

Minimal example

value = IO.HOME_DIR()

IO.IS_ABSOLUTE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.IS_ABSOLUTE(path)

TRUE if the path is absolute.

Minimal example

value = IO.IS_ABSOLUTE(path)

IO.LAST_ERROR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.LAST_ERROR()

Returns the last non-fatal runtime error text, currently set by IO.TRY_LOAD and IO.TRY_LOAD_WITH_META.

Minimal example

PRINT IO.LAST_ERROR()

IO.LAST_ERROR_LINE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.LAST_ERROR_LINE()

Returns the source line associated with IO.LAST_ERROR(), or -1 when unavailable.

Minimal example

PRINT IO.LAST_ERROR_LINE()

IO.LOAD

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.LOAD pathExpr AS variable // images, OT RAW, FITS, TIFF stacks, video

Loads an image, a FITS image/stack, a TIFF/TIFF stack, or a video; videos, multipage TIFF files and multi-HDU FITS files become in-memory stacks.

Minimal example

IO.LOAD pathExpr AS variable  // images, OT RAW, FITS, TIFF stacks, video

IO.LOAD_WITH_META

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File / media IO statements   Namespace: IO

IO.LOAD_WITH_META path AS image

Loads an image/stack and applies the optional path.cvbmeta sidecar when present.

Minimal example

IO.LOAD_WITH_META "out.png" AS img2

IO.LOAD_WITH_META

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.LOAD_WITH_META path AS image

Loads an image/stack and applies the optional path.cvbmeta sidecar when present.

Minimal example

IO.LOAD_WITH_META "out.png" AS img2

IO.META_PATH

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.META_PATH(mediaPath)

Returns the metadata sidecar path used by IO.SAVE_WITH_META.

Minimal example

sidecar = IO.META_PATH("out.png")

IO.MKDIR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.MKDIR(path)

Creates a single directory level and returns TRUE on success.

Minimal example

value = IO.MKDIR(path)

IO.MKPATH

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.MKPATH(path)

Creates a directory tree and returns TRUE on success.

Minimal example

value = IO.MKPATH(path)

IO.MOVE_FILE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.MOVE_FILE(source,target[,overwrite])

Moves or renames a file and returns TRUE on success.

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

Minimal example

value = IO.MOVE_FILE(source,target[,overwrite])

IO.PATH_EXISTS

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.PATH_EXISTS(path)

TRUE if a path exists.

Minimal example

value = IO.PATH_EXISTS(path)

IO.PATH_JOIN

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.PATH_JOIN(base,child)

Joins a base path and a child component.

Minimal example

value = IO.PATH_JOIN(base,child)

IO.READ_CSV_ARRAY

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.READ_CSV_ARRAY(path [, numeric [, delimiter]])

Reads a CSV written by IO.WRITE_CSV_ARRAY, preserving 1D/2D shape when the #CVB_ARRAY header is present.

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
numericWhen true, forces numeric conversion of CSV values.
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

b = IO.READ_CSV_ARRAY("array.csv", TRUE)

IO.READ_TEXT

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.READ_TEXT(path)

Reads a text file as UTF-8, returning an empty string on failure.

Minimal example

value = IO.READ_TEXT(path)

IO.REMOVE_DIR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.REMOVE_DIR(path)

Removes an empty directory and returns TRUE on success.

Minimal example

value = IO.REMOVE_DIR(path)

IO.REMOVE_DIR_TREE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.REMOVE_DIR_TREE(path)

Removes a directory tree recursively and returns TRUE on success.

Minimal example

value = IO.REMOVE_DIR_TREE(path)

IO.REMOVE_FILE

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.REMOVE_FILE(path)

Deletes a file and returns TRUE on success.

Minimal example

value = IO.REMOVE_FILE(path)

IO.SAVE

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.SAVE media, path

Saves a single image to common image formats, or saves a stack to multipage TIFF when the target extension is .tif/.tiff.

Minimal example

IO.SAVE

IO.SAVE_WITH_META

STATEMENTIOBATCH-FRIENDLYFILE I/O
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.SAVE_WITH_META media, path

Saves an image or stack and writes a path.cvbmeta sidecar containing ROI state and user metadata.

Minimal example

IO.SAVE_WITH_META img, "out.png"

IO.TEMP_DIR

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.TEMP_DIR()

Returns the system temporary directory.

Minimal example

value = IO.TEMP_DIR()

IO.TRY_LOAD

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.TRY_LOAD path AS image

Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.

Minimal example

IO.TRY_LOAD "input.png" AS img
IF NOT CV.IS_VALID(img) THEN
    PRINT "Load failed: "; IO.LAST_ERROR()
    EXIT
ENDIF

IO.TRY_LOAD

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File / media IO statements   Namespace: IO

IO.TRY_LOAD path AS image

Loads an image/stack/video without stopping the script on failure. On failure the destination becomes NULL and IO.LAST_ERROR() contains the reason.

Minimal example

IO.TRY_LOAD "input.png" AS img
IF NOT CV.IS_VALID(img) THEN
    PRINT "Load failed: "; IO.LAST_ERROR()
    EXIT
ENDIF

IO.TRY_LOAD_WITH_META

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.TRY_LOAD_WITH_META path AS image

Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().

Minimal example

IO.TRY_LOAD_WITH_META "out.png" AS img2
ASSERT CV.IS_VALID(img2), IO.LAST_ERROR()

IO.TRY_LOAD_WITH_META

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File / media IO statements   Namespace: IO

IO.TRY_LOAD_WITH_META path AS image

Non-fatal variant of IO.LOAD_WITH_META. It restores metadata when possible, otherwise stores the reason in IO.LAST_ERROR().

Minimal example

IO.TRY_LOAD_WITH_META "out.png" AS img2
ASSERT CV.IS_VALID(img2), IO.LAST_ERROR()

IO.WRITE_CSV_ARRAY

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.WRITE_CSV_ARRAY(path, array [, delimiter])

Writes a 1D/2D array to CSV with a small #CVB_ARRAY shape header and returns TRUE.

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
delimiterCSV delimiter override; omit it for auto-detection where supported.

Minimal example

ok = IO.WRITE_CSV_ARRAY("array.csv", a)

IO.WRITE_TEXT

FUNCTIONIOBATCH-FRIENDLYFILE I/O
Kind: Function   Category: File and path functions   Namespace: IO

IO.WRITE_TEXT(path,text)

Writes UTF-8 text to a file and returns TRUE on success.

Minimal example

value = IO.WRITE_TEXT(path,text)

IO.WRITE_VIDEO

STATEMENTIOBATCH-FRIENDLYFILE I/OSTACK / VIDEO
Kind: Command   Category: File / media IO statements   Namespace: IO

IO.WRITE_VIDEO stack, path [, fps]

Writes a stack as an AVI/MJPG video.

Optional parameters

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

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

Minimal example

IO.WRITE_VIDEO

LA.ADD

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ADD(A, B)

Element-wise matrix addition; A and B must have the same shape.

Minimal example

value = LA.ADD(A, B)

LA.COL

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COL(v0 [, v1 ...])

Creates an n x 1 column vector. It can still be read with one index, for example c[0].

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

Minimal example

c = LA.COL(3, 2, 1)
PRINT LA.SHAPE(c), c[1]

LA.COLS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COLS(A)

Returns the number of columns. A 1D vector reports cols = 1.

Minimal example

value = LA.COLS(A)

LA.COS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.COS(A)

Element-wise cosine.

Minimal example

value = LA.COS(A)

LA.CROSS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.CROSS(a, b)

Cross product between two 3D vectors.

Minimal example

value = LA.CROSS(a, b)

LA.DET

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DET(A)

Returns the determinant of a square matrix.

Minimal example

value = LA.DET(A)

LA.DIAG

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DIAG(vectorOrMatrix)

Vector input creates a diagonal matrix; matrix input extracts the diagonal.

Minimal example

value = LA.DIAG(vectorOrMatrix)

LA.DOT

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.DOT(a, b)

Dot product between same-size vectors.

Minimal example

value = LA.DOT(a, b)

LA.EIGSYM_VALS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGSYM_VALS(A)

Returns real eigenvalues for symmetric matrices.

Minimal example

value = LA.EIGSYM_VALS(A)

LA.EIGSYM_VECS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGSYM_VECS(A)

Returns real eigenvectors for symmetric matrices.

Minimal example

value = LA.EIGSYM_VECS(A)

LA.EIGVALS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGVALS(A)

Returns eigenvalues as an N x 2 table: real and imaginary part.

Minimal example

value = LA.EIGVALS(A)

LA.EIGVECS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EIGVECS(A)

Returns real eigenvectors when the decomposition has negligible imaginary components.

Minimal example

value = LA.EIGVECS(A)

LA.EXP

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.EXP(A)

Element-wise exponential.

Minimal example

value = LA.EXP(A)

LA.FROM_IMAGE

FUNCTIONLABATCH-FRIENDLYIMAGELINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.FROM_IMAGE(image [, channel])

Converts the first frame of an image/stack to a numeric matrix. channel=-1 uses grayscale/luminance.

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

value = LA.FROM_IMAGE(image [, channel])

LA.GRID_X

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.GRID_X(xVector, yVector)

Builds the X coordinate matrix for a regular grid.

Minimal example

value = LA.GRID_X(xVector, yVector)

LA.GRID_Y

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.GRID_Y(xVector, yVector)

Builds the Y coordinate matrix for a regular grid.

Minimal example

value = LA.GRID_Y(xVector, yVector)

LA.HADAMARD

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.HADAMARD(A, B)

Element-wise matrix product.

Minimal example

value = LA.HADAMARD(A, B)

LA.IDENTITY

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.IDENTITY(n)

Creates an n x n identity matrix.

Minimal example

I = LA.IDENTITY(4)

LA.INV

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.INV(A)

Returns the inverse of a non-singular square matrix.

Minimal example

value = LA.INV(A)

LA.LINSPACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.LINSPACE(a, b, n)

Creates a 1D vector with n evenly spaced samples from a to b.

Minimal example

xVec = LA.LINSPACE(-8, 8, 220)

LA.LSQ

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.LSQ(A, b)

Least-squares solution for overdetermined systems.

Minimal example

value = LA.LSQ(A, b)

LA.MUL

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.MUL(A, B)

Matrix product using Eigen.

Minimal example

C = LA.MUL(A, B)

LA.NORM

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.NORM(A)

Returns the Frobenius/vector norm.

Minimal example

value = LA.NORM(A)

LA.NULLSPACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.NULLSPACE(A [, tolerance])

Returns a matrix whose columns form a numerical basis of the null space of A. Full-rank matrices return one zero column because zero-width arrays are not supported.

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

Minimal example

value = LA.NULLSPACE(A [, tolerance])

LA.ONES

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ONES(rows [, cols])

Creates a numeric matrix initialized to one.

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

Minimal example

value = LA.ONES(rows [, cols])

LA.PINV

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.PINV(A [, tolerance])

Returns the Moore-Penrose pseudoinverse computed from the SVD. The optional tolerance controls which singular values are inverted.

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

Minimal example

Aplus = LA.PINV(A)
x = LA.MUL(Aplus, b)

LA.QR_Q

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.QR_Q(A)

Returns the Q factor of the Householder QR decomposition.

Minimal example

value = LA.QR_Q(A)

LA.QR_R

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.QR_R(A)

Returns the R factor of the Householder QR decomposition, with Q*R reconstructing A.

Minimal example

value = LA.QR_R(A)

LA.RANK

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.RANK(A [, tolerance])

Returns the numerical rank of A using its singular values.

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

Minimal example

value = LA.RANK(A [, tolerance])

LA.ROW

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ROW(v0 [, v1 ...])

Creates a 1 x n row vector. It can still be read with one index, for example r[0].

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

Minimal example

r = LA.ROW(3, 2, 1)
PRINT LA.SHAPE(r), r[2]

LA.ROWS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ROWS(A)

Returns the number of rows. A 1D vector reports rows = length.

Minimal example

value = LA.ROWS(A)

LA.SCALE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SCALE(A, s)

Multiplies all matrix elements by scalar s.

Minimal example

value = LA.SCALE(A, s)

LA.SHAPE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SHAPE(A)

Returns the array shape as text, such as 3, 3 x 1, 1 x 3 or 2 x 2.

Minimal example

PRINT LA.SHAPE([[1,2],[3,4]])

LA.SIN

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SIN(A)

Element-wise sine.

Minimal example

value = LA.SIN(A)

LA.SINC

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SINC(A)

Element-wise sin(x)/x with the correct value 1 near zero.

Minimal example

value = LA.SINC(A)

LA.SOLVE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SOLVE(A, b)

Solves A*x=b with Eigen QR decomposition.

Minimal example

value = LA.SOLVE(A, b)

LA.SQRT

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SQRT(A)

Element-wise square root.

Minimal example

value = LA.SQRT(A)

LA.SUB

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SUB(A, B)

Element-wise matrix subtraction; A and B must have the same shape.

Minimal example

value = LA.SUB(A, B)

LA.SVD_S

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_S(A)

Returns the singular values of A.

Minimal example

value = LA.SVD_S(A)

LA.SVD_U

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_U(A)

Returns the thin U matrix from the singular value decomposition A = U*S*V^T.

Minimal example

value = LA.SVD_U(A)

LA.SVD_V

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.SVD_V(A)

Returns the thin V matrix from the singular value decomposition A = U*S*V^T.

Minimal example

value = LA.SVD_V(A)

LA.TO_IMAGE

FUNCTIONLABATCH-FRIENDLYIMAGELINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TO_IMAGE(A [, normalize])

Converts a numeric matrix to a grayscale image, optionally normalized to 0..255.

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

img = LA.TO_IMAGE(Z, TRUE)
GUI.SHOW img, "Matrix image"

LA.TRACE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TRACE(A)

Returns the sum of the diagonal of A.

Minimal example

value = LA.TRACE(A)

LA.TRANSPOSE

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.TRANSPOSE(A)

Returns the transpose of a vector or matrix.

Minimal example

value = LA.TRANSPOSE(A)

LA.VEC

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.VEC(v0 [, v1 ...])

Creates a compact 1D numeric vector. Direct indexing works as v[0].

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

Minimal example

v = LA.VEC(3, 2, 1)
PRINT LA.SHAPE(v), v[0]

LA.VERSION

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.VERSION()

Returns the Eigen version detected at compile time.

Minimal example

PRINT LA.VERSION()

LA.ZEROS

FUNCTIONLABATCH-FRIENDLYLINEAR ALGEBRA
Kind: Function   Category: Linear algebra / Eigen   Namespace: LA

LA.ZEROS(rows [, cols])

Creates a numeric matrix initialized 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
colsOptional parameter. If omitted, the command uses its internal default.

Minimal example

A = [[2, 1], [1, 3]]
b = [5, 6]
x = LA.SOLVE(A, b)
PRINT x[0], x[1]

LANG.CATALOG_WARNINGS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.CATALOG_WARNINGS()

Returns a 1D array with registry/catalog drift diagnostics. Empty array means no warnings.

Minimal example

value = LANG.CATALOG_WARNINGS()

LANG.CATEGORY

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.CATEGORY(name)

Returns the documentation/help category for a public symbol.

Minimal example

value = LANG.CATEGORY(name)

LANG.COMMANDS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.COMMANDS()

Returns a 1D array containing all public command names.

Minimal example

cmds = LANG.COMMANDS()
PRINT ARRAY.SIZE(cmds)

LANG.EXISTS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.EXISTS(name)

Returns TRUE if name is a public command, function, keyword, or documented catalog symbol.

Minimal example

ASSERT LANG.EXISTS("ROI.SET"), "ROI.SET missing"

LANG.FUNCTIONS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.FUNCTIONS()

Returns a 1D array containing all public function names.

Minimal example

value = LANG.FUNCTIONS()

LANG.HEADLESS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.HEADLESS(name)

Returns TRUE for symbols that can be used safely in batch/headless scripts, and FALSE for explicit GUI/interactive symbols.

Minimal example

value = LANG.HEADLESS(name)

LANG.HELP

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.HELP(name)

Returns a compact multi-line help block with name, kind, signature and description.

Minimal example

value = LANG.HELP(name)

LANG.KIND

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.KIND(name)

Returns Command, Function, Keyword, or an empty string when the symbol is unknown.

Minimal example

value = LANG.KIND(name)

LANG.SIGNATURE

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.SIGNATURE(name)

Returns the documented or registry-derived signature of a public symbol.

Minimal example

value = LANG.SIGNATURE(name)

LANG.SYMBOLS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.SYMBOLS()

Returns a 1D array containing public commands, public functions and language keywords.

Minimal example

value = LANG.SYMBOLS()

LANG.USERLIB_REPORT

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.USERLIB_REPORT()

Returns a multi-line diagnostic report with loaded user libraries, exported symbols, argument ranges, SDK data types and warnings.

Minimal example

value = LANG.USERLIB_REPORT()

LANG.USERLIB_SYMBOLS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.USERLIB_SYMBOLS()

Returns a 1D array with public symbols registered by external user libraries.

Minimal example

value = LANG.USERLIB_SYMBOLS()

LANG.USERLIB_TYPES

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.USERLIB_TYPES()

Returns a 1D array describing the data types currently exposed by the external user-library SDK.

Minimal example

value = LANG.USERLIB_TYPES()

LANG.USERLIBS

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.USERLIBS()

Returns a 1D array with the loaded external cvBasic user libraries.

Minimal example

value = LANG.USERLIBS()

LANG.VERSION

FUNCTIONLANGBATCH-FRIENDLY
Kind: Function   Category: Language introspection   Namespace: LANG

LANG.VERSION()

Returns the cvBasic language/runtime version string.

Minimal example

value = LANG.VERSION()

LET

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

LET var = expr

Explicit assignment; equivalent to using =. Variables are case-insensitive: k and K are the same variable, so scientific scripts should prefer descriptive names such as springK and kinEnergy. Array elements may be assigned with A[i,j] = value or legacy A(i,j) = value.

Minimal example

A = [[1, 2], [3, 4]]
A[0,1] = 9
PRINT A[0,1]

MASK.APPLY

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.APPLY(image,mask[,background])

Returns image/stack pixels inside the mask unchanged and replaces outside pixels with background. Single images/masks 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
backgroundInitial canvas background value.

Minimal example

inside = MASK.APPLY(img, mask, 0)

MASK.AREA

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.AREA(mask)

Alias-style semantic count of foreground pixels. For a rectangular single-frame mask it equals RECT.AREA(rect).

Minimal example

ASSERT MASK.AREA(mask) = RECT.AREA(r), "area mismatch"

MASK.BBOX

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.BBOX(mask[,frame])

Returns the half-open RECT bounding box of all non-zero mask pixels in the selected 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
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

r = MASK.BBOX(mask)

MASK.COUNT

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.COUNT(mask)

Counts foreground pixels, where any non-zero channel marks a foreground pixel. For stacks, counts all frames.

Minimal example

n = MASK.COUNT(mask)

MASK.COUNT_NONZERO

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.COUNT_NONZERO(mask)

Compatibility alias for COUNT_NONZERO / MASK.COUNT.

Minimal example

n = MASK.COUNT_NONZERO(mask)

MASK.EMPTY

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.EMPTY(mask)

Returns TRUE if the mask has no foreground pixels.

Minimal example

ASSERT NOT MASK.EMPTY(mask), "mask unexpectedly empty"

MASK.FROM_ROI

FUNCTIONMASKBATCH-FRIENDLYROI
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.FROM_ROI(image[,value])

Creates a mask from the programmatic ROI stored on an 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.

Minimal example

img = ROI.SET_RECT(img, r)
mask = MASK.FROM_ROI(img)

MASK.INVERT

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.INVERT(mask)

Returns the binary inverse of a mask, using 0 for foreground and 255 for background.

Minimal example

inv = MASK.INVERT(mask)

MASK.RECT

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.RECT(width,height,rect[,value]) OR MASK.RECT(width,height,x,y,w,h[,value])

Creates a binary mask image from a RECT geometry or explicit x,y,w,h coordinates. The rectangle is clipped to the mask bounds.

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

r = RECT.CREATE(10,12,20,15)
mask = MASK.RECT(80,60,r)

MASK.TO_ROI

FUNCTIONMASKBATCH-FRIENDLYROI
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.TO_ROI(mask[,frame]) OR MASK.TO_ROI(image,mask[,frame])

With one mask returns MASK.BBOX. With image+mask returns a copy of the image with ROI set to the mask bounding 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
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

img2 = MASK.TO_ROI(img, mask)
r = ROI.RECT(img2)

MASK.VALID

FUNCTIONMASKBATCH-FRIENDLY
Kind: Function   Category: Mask geometry functions   Namespace: MASK

MASK.VALID(mask)

Returns TRUE when the argument is a non-empty image/stack that can be treated as a mask.

Minimal example

ASSERT MASK.VALID(mask), "mask not valid"

MAT3D.CLOSE

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.CLOSE handle

Closes a Mat3D window by handle.

Minimal example

MAT3D.CLOSE m3

MAT3D.CREATE

FUNCTIONMAT3DGUI / INTERACTIVE
Kind: Function   Category: Hybrid 3D functions   Namespace: MAT3D

MAT3D.CREATE([title])

Creates an interactive Mat3D MDI window and returns a numeric handle. X/Y are pixels and Z is luminance.

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

m3 = MAT3D.CREATE("Luminance surface")

MAT3D.OPTIONS

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.OPTIONS handle [, normalizeZ [, invertZ [, flipY [, sampleStep [, zScale [, zOffset [, legend]]]]]]]

Controls Z normalization, inversion, Y flip, decimation, Z scale/offset and the color legend.

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
normalizeZOptional parameter. If omitted, the command uses its internal default.
invertZOptional parameter. If omitted, the command uses its internal default.
flipYOptional parameter. If omitted, the command uses its internal default.
sampleStepOptional parameter. If omitted, the command uses its internal default.
zScaleOptional parameter. If omitted, the command uses its internal default.
zOffsetOptional parameter. If omitted, the command uses its internal default.
legendOptional parameter. If omitted, the command uses its internal default.

Minimal example

MAT3D.OPTIONS m3, TRUE, FALSE, TRUE, 2, 1.0, 0.0, FALSE

MAT3D.PALETTE

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.PALETTE handle [, paletteFile]

Applies a QwtPlot3D .map palette file, or resets to the standard palette when omitted.

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

Minimal example

MAT3D.PALETTE m3, "STANDARD"

MAT3D.SET

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.SET handle, imageOrStack [, frameIndex [, caption]]

Updates an existing Mat3D window with a new image or with one selected frame from a 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
frameIndexOptional parameter. If omitted, the command uses its internal default.
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

MAT3D.SET m3, filtered, 0, "Filtered luminance"

MAT3D.SHOW

FUNCTIONMAT3DGUI / INTERACTIVE
Kind: Function   Category: Hybrid 3D functions   Namespace: MAT3D

MAT3D.SHOW(imageOrStack [, title [, sampleStep [, zScale]]])

Creates a Mat3D window, displays the first frame of an image/stack, and returns the Mat3D handle.

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

Minimal example

m3 = MAT3D.SHOW(gray, "3D luminance", 2, 1.0)

MAT3D.SNAPSHOT

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.SNAPSHOT handle, path

Saves the current Mat3D view as PNG/JPG/BMP/PDF/EPS/TIF according to file extension.

Minimal example

MAT3D.SNAPSHOT m3, "surface.png"

MAT3D.STYLE

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.STYLE handle [, plotStyle [, floorStyle [, coordStyle]]]

Sets surface style. plotStyle: POINTS, WIREFRAME, HIDDENLINE, POLYGON, FILLEDMESH. floorStyle: NONE, DATA, ISO. coordStyle: NONE, FRAME, 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
plotStyleOptional parameter. If omitted, the command uses its internal default.
floorStyleOptional parameter. If omitted, the command uses its internal default.
coordStyleOptional parameter. If omitted, the command uses its internal default.

Minimal example

MAT3D.STYLE m3, "FILLEDMESH", "ISO", "FRAME"

MAT3D.VIEW

STATEMENTMAT3DGUI / INTERACTIVE
Kind: Command   Category: Hybrid 3D commands   Namespace: MAT3D

MAT3D.VIEW handle, rotX, rotY, rotZ [, zoom]

Sets the 3D view rotation and optional zoom.

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

Minimal example

MAT3D.VIEW m3, 35, 0, 25, 0.95

MATH.ABS

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ABS(value)

Absolute numeric value.

Minimal example

value = MATH.ABS(value)

MATH.ACOS

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ACOS(value)

Inverse cosine, returning radians.

Minimal example

value = MATH.ACOS(value)

MATH.ACOSH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ACOSH(value)

Inverse hyperbolic cosine.

Minimal example

value = MATH.ACOSH(value)

MATH.ASIN

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ASIN(value)

Inverse sine, returning radians.

Minimal example

value = MATH.ASIN(value)

MATH.ASINH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ASINH(value)

Inverse hyperbolic sine.

Minimal example

value = MATH.ASINH(value)

MATH.ATAN

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ATAN(value)

Inverse tangent, returning radians.

Minimal example

value = MATH.ATAN(value)

MATH.ATAN2

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ATAN2(y,x)

Two-argument inverse tangent, returning radians.

Minimal example

value = MATH.ATAN2(y,x)

MATH.ATANH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ATANH(value)

Inverse hyperbolic tangent.

Minimal example

value = MATH.ATANH(value)

MATH.CBRT

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.CBRT(value)

Cube root.

Minimal example

value = MATH.CBRT(value)

MATH.CEIL

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.CEIL(value)

Rounds toward positive infinity.

Minimal example

value = MATH.CEIL(value)

MATH.COS

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.COS(value)

Cosine of the angle in radians.

Minimal example

value = MATH.COS(value)

MATH.COSH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.COSH(value)

Hyperbolic cosine.

Minimal example

value = MATH.COSH(value)

MATH.DOUBLE

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.DOUBLE(value)

Converts the value to double.

Minimal example

value = MATH.DOUBLE(value)

MATH.EXP

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.EXP(value)

Natural exponential e^x.

Minimal example

value = MATH.EXP(value)

MATH.EXP2

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.EXP2(value)

Base-2 exponential 2^x.

Minimal example

value = MATH.EXP2(value)

MATH.EXPM1

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.EXPM1(value)

Computes e^x - 1 with improved small-value accuracy.

Minimal example

value = MATH.EXPM1(value)

MATH.FLOOR

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.FLOOR(value)

Rounds toward negative infinity.

Minimal example

value = MATH.FLOOR(value)

MATH.FMOD

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.FMOD(a,b)

Floating-point remainder with truncation-based quotient.

Minimal example

value = MATH.FMOD(a,b)

MATH.HYPOT

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.HYPOT(a,b)

Euclidean norm sqrt(a*a + b*b).

Minimal example

value = MATH.HYPOT(a,b)

MATH.INT

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.INT(value)

Converts the value to a truncated integer.

Minimal example

value = MATH.INT(value)

MATH.LOG

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.LOG(value)

Natural logarithm.

Minimal example

value = MATH.LOG(value)

MATH.LOG10

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.LOG10(value)

Base-10 logarithm.

Minimal example

value = MATH.LOG10(value)

MATH.LOG1P

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.LOG1P(value)

Computes log(1+x) with improved small-value accuracy.

Minimal example

value = MATH.LOG1P(value)

MATH.LOG2

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.LOG2(value)

Base-2 logarithm.

Minimal example

value = MATH.LOG2(value)

MATH.MAX

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.MAX(a,b)

Returns the larger of two numeric values.

Minimal example

value = MATH.MAX(a,b)

MATH.MIN

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.MIN(a,b)

Returns the smaller of two numeric values.

Minimal example

value = MATH.MIN(a,b)

MATH.POW

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.POW(base,exponent)

Raises a base to an exponent.

Minimal example

value = MATH.POW(base,exponent)

MATH.REMAINDER

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.REMAINDER(a,b)

IEEE-style floating-point remainder.

Minimal example

value = MATH.REMAINDER(a,b)

MATH.ROUND

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.ROUND(value)

Rounds to the nearest integer, half away from zero.

Minimal example

value = MATH.ROUND(value)

MATH.SIN

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.SIN(value)

Sine of the angle in radians.

Minimal example

value = MATH.SIN(value)

MATH.SINH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.SINH(value)

Hyperbolic sine.

Minimal example

value = MATH.SINH(value)

MATH.SQRT

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.SQRT(value)

Square root.

Minimal example

value = MATH.SQRT(value)

MATH.TAN

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.TAN(value)

Tangent of the angle in radians.

Minimal example

value = MATH.TAN(value)

MATH.TANH

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.TANH(value)

Hyperbolic tangent.

Minimal example

value = MATH.TANH(value)

MATH.TRUNC

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.TRUNC(value)

Truncates the fractional part.

Minimal example

value = MATH.TRUNC(value)

MATH.TYPE

FUNCTIONMATHBATCH-FRIENDLY
Kind: Function   Category: Math and numeric functions   Namespace: MATH

MATH.TYPE(value)

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

Minimal example

value = MATH.TYPE(value)

META.CLEAR

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.CLEAR(image[,key])

Clears all user metadata, or only the selected key when key is provided.

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

Minimal example

value = META.CLEAR(image[,key])

META.FROM_TEXT

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.FROM_TEXT(image,text)

Applies cvBasic sidecar text back to an existing image or stack object and returns it.

Minimal example

value = META.FROM_TEXT(image,text)

META.GET

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.GET(image)

Returns user metadata as readable key=value lines.

Minimal example

value = META.GET(image)

META.HAS

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.HAS(image,key)

Returns TRUE when a metadata key exists on the image or stack.

Minimal example

value = META.HAS(image,key)

META.KEYS

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.KEYS(image)

Returns all user metadata keys as newline-separated text.

Minimal example

value = META.KEYS(image)

META.SET

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.SET(image,key,value)

Stores a user key/value metadata pair directly in an image or stack object and returns the same object.

Minimal example

img = META.SET(img, "author", "cvBasic")

META.TO_TEXT

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.TO_TEXT(image)

Serializes image dimensions, ROI state and user metadata into cvBasic sidecar text.

Minimal example

value = META.TO_TEXT(image)

META.VALUE

FUNCTIONMETABATCH-FRIENDLY
Kind: Function   Category: Metadata functions   Namespace: META

META.VALUE(image,key[,fallback])

Returns the metadata value for key, or fallback when the key is absent.

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

Minimal example

author = META.VALUE(img, "author", "unknown")

NEXT

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

NEXT

Closes the FOR loop.

Minimal example

FOR i = 0 TO 9 STEP 1
    PRINT i
NEXT

DIM values(3)
values(0) = 10
values(1) = 20
values(2) = 30
FOR v IN values
    PRINT v
NEXT

NOT

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

NOT expr

Logical negation.

Minimal example

IF NOT CV.IS_STACK(img) AND CV.WIDTH(img) > 0 THEN
    PRINT "single image"
ENDIF

OR

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

expr OR expr

Logical OR operator.

Minimal example

IF NOT CV.IS_STACK(img) AND CV.WIDTH(img) > 0 THEN
    PRINT "single image"
ENDIF

PARAMS.ADD_BOOL

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_BOOL handle, tab, variable, label [, help]

Adds a checkbox bound to an already-defined script variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_BOOL

PARAMS.ADD_COLOR

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_COLOR handle, tab, variable, label [, help]

Adds a color selector bound to an already-defined string variable such as #00ff00.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_COLOR

PARAMS.ADD_COMBO

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_COMBO handle, tab, variable, label, optionsText [, help]

Adds a combo box bound to an already-defined script variable. String variables receive the selected text; numeric variables receive the selected index.

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
helpOptional help text shown by the parameter editor.

Minimal example

method = "GAUSSIAN"\nPARAMS.ADD_COMBO pe, tab, method, "Metodo", "GAUSSIAN|MEDIAN|BILATERAL"

PARAMS.ADD_DIR

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_DIR handle, tab, variable, label [, help]

Adds a directory selector bound to an already-defined string variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_DIR

PARAMS.ADD_DOUBLE

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_DOUBLE handle, tab, variable, label, min, max, step [, help]

Adds a double spin box bound to an already-defined script variable. The variable name is passed without quotes.

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
helpOptional help text shown by the parameter editor.

Minimal example

sigma = 1.5
PARAMS.ADD_DOUBLE pe, tab, sigma, "Sigma", 0.1, 20.0, 0.1

PARAMS.ADD_FILE

STATEMENTPARAMSGUI / INTERACTIVEFILE I/O
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_FILE handle, tab, variable, label [, help]

Adds an open-file path selector bound to an already-defined string variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_FILE

PARAMS.ADD_INT

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_INT handle, tab, variable, label, min, max, step [, help]

Adds an integer spin box bound to an already-defined script variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_INT

PARAMS.ADD_SAVEFILE

STATEMENTPARAMSGUI / INTERACTIVEFILE I/O
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_SAVEFILE handle, tab, variable, label [, help]

Adds a save-file path selector bound to an already-defined string variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_SAVEFILE

PARAMS.ADD_STRING

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.ADD_STRING handle, tab, variable, label [, help]

Adds a line edit bound to an already-defined script variable.

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
helpOptional help text shown by the parameter editor.

Minimal example

PARAMS.ADD_STRING

PARAMS.CLEAR_DIRTY

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.CLEAR_DIRTY handle

Clears the dirty flag of a LIVE ParamsEditor panel.

Minimal example

PARAMS.CLEAR_DIRTY

PARAMS.CLOSE

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.CLOSE handle

Closes and destroys a ParamsEditor panel.

Minimal example

PARAMS.CLOSE

PARAMS.CREATE

FUNCTIONPARAMSGUI / INTERACTIVE
Kind: Function   Category: Parameter editor functions   Namespace: PARAMS

PARAMS.CREATE(title [, mode])

Creates a ParamsEditor panel and returns a numeric handle. Mode is DIALOG by default or LIVE for a non-modal panel.

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

pe = PARAMS.CREATE("Filtro", "LIVE")

PARAMS.DIRTY

FUNCTIONPARAMSGUI / INTERACTIVE
Kind: Function   Category: Parameter editor functions   Namespace: PARAMS

PARAMS.DIRTY(handle)

TRUE when the user has modified at least one widget since the last PARAMS.CLEAR_DIRTY.

Minimal example

value = PARAMS.DIRTY(handle)

PARAMS.EXEC

FUNCTIONPARAMSGUI / INTERACTIVE
Kind: Function   Category: Parameter editor functions   Namespace: PARAMS

PARAMS.EXEC(handle)

Runs the panel as a modal dialog. Variables are updated only if OK is pressed; the dialog session is destroyed on exit.

Minimal example

IF PARAMS.EXEC(pe) THEN
    PRINT sigma
ENDIF

PARAMS.HELP

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.HELP handle, htmlText

Adds or replaces the ParamsEditor Help tab with HTML text.

Minimal example

PARAMS.HELP

PARAMS.IS_OPEN

FUNCTIONPARAMSGUI / INTERACTIVE
Kind: Function   Category: Parameter editor functions   Namespace: PARAMS

PARAMS.IS_OPEN(handle)

TRUE while a LIVE ParamsEditor window is visible.

Minimal example

value = PARAMS.IS_OPEN(handle)

PARAMS.LOAD

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.LOAD handle, path

Loads widget values from a ParamsEditor XML file.

Minimal example

PARAMS.LOAD

PARAMS.SAVE

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.SAVE handle, path

Saves widget values to a ParamsEditor XML file.

Minimal example

PARAMS.SAVE

PARAMS.SHOW

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.SHOW handle

Shows a LIVE ParamsEditor panel as a non-modal always-on-top window.

Minimal example

PARAMS.SHOW

PARAMS.SYNC

STATEMENTPARAMSGUI / INTERACTIVE
Kind: Command   Category: Parameter editor commands   Namespace: PARAMS

PARAMS.SYNC handle

Copies current LIVE widget values back into the bound script variables.

Minimal example

PARAMS.SYNC

PARAMS.TAB

FUNCTIONPARAMSGUI / INTERACTIVE
Kind: Function   Category: Parameter editor functions   Namespace: PARAMS

PARAMS.TAB(handle, title)

Adds a tab to a ParamsEditor panel and returns its zero-based index.

Minimal example

tab = PARAMS.TAB(pe, "Base")

PLOT.BAR

STATEMENTPLOTBATCH-FRIENDLY
Kind: Command   Category: Static plot statements   Namespace: PLOT

PLOT.BAR valuesText, width, height AS dst

Creates a bar-chart image from newline-separated numeric values.

Minimal example

PLOT.BAR valuesText, width, height AS dst

PLOT.XY

STATEMENTPLOTBATCH-FRIENDLY
Kind: Command   Category: Static plot statements   Namespace: PLOT

PLOT.XY pointsText, width, height AS dst

Creates a chart image from newline-separated X,Y numeric pairs.

Minimal example

PLOT.XY pointsText, width, height AS dst

PLOT.Y

STATEMENTPLOTBATCH-FRIENDLY
Kind: Command   Category: Static plot statements   Namespace: PLOT

PLOT.Y valuesText, width, height AS dst

Creates a chart image from newline-separated numeric Y values.

Minimal example

PLOT.Y valuesText, width, height AS dst

PRINT

STATEMENTBATCH-FRIENDLY
Kind: Command   Category: Core statements   Namespace: CORE

PRINT expr1 [; expr2 ...] [, exprN ...]

Writes the provided values to the log output.

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

Minimal example

PRINT "Width="; CV.WIDTH(img); " Height="; CV.HEIGHT(img)

RECT.AREA

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.AREA(rect)

Returns w*h for valid rectangles, otherwise 0.

Minimal example

value = RECT.AREA(rect)

RECT.CLIP

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.CLIP(rect, width, height)

Clips a rectangle to image bounds [0,width) x [0,height).

Minimal example

value = RECT.CLIP(rect, width, height)

RECT.CREATE

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.CREATE(x, y, w, h)

Creates a half-open pixel rectangle represented by x,y,w,h. XEND is x+w and YEND is y+h.

Minimal example

r = RECT.CREATE(10, 20, 30, 40)

RECT.EMPTY

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.EMPTY(rect)

Returns TRUE when rect has zero/negative width or height.

Minimal example

value = RECT.EMPTY(rect)

RECT.EQUAL

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.EQUAL(a, b)

Returns TRUE when x,y,w,h are identical.

Minimal example

value = RECT.EQUAL(a, b)

RECT.FROM_TEXT

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.FROM_TEXT(text)

Reads a rectangle from RECT(x,y,w,h), RECT:x,y,w,h, or plain x,y,w,h text.

Minimal example

r2 = RECT.FROM_TEXT(RECT.TO_TEXT(r))

RECT.H

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.H(rect)

Returns the rectangle height in pixels.

Minimal example

value = RECT.H(rect)

RECT.INTERSECT

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.INTERSECT(a, b)

Returns the half-open intersection of two rectangles, or an empty rectangle when they do not overlap.

Minimal example

value = RECT.INTERSECT(a, b)

RECT.TO_TEXT

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.TO_TEXT(rect)

Serializes a rectangle as RECT(x,y,w,h).

Minimal example

value = RECT.TO_TEXT(rect)

RECT.UNION

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.UNION(a, b)

Returns the smallest half-open rectangle containing both valid rectangles.

Minimal example

value = RECT.UNION(a, b)

RECT.VALID

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.VALID(rect)

Returns TRUE when rect has strictly positive width and height.

Minimal example

value = RECT.VALID(rect)

RECT.W

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.W(rect)

Returns the rectangle width in pixels.

Minimal example

value = RECT.W(rect)

RECT.X

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.X(rect)

Returns the first included X pixel coordinate.

Minimal example

value = RECT.X(rect)

RECT.XEND

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.XEND(rect)

Returns the exclusive end X coordinate x+w.

Minimal example

value = RECT.XEND(rect)

RECT.Y

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.Y(rect)

Returns the first included Y pixel coordinate.

Minimal example

value = RECT.Y(rect)

RECT.YEND

FUNCTIONRECTBATCH-FRIENDLY
Kind: Function   Category: Geometry functions   Namespace: RECT

RECT.YEND(rect)

Returns the exclusive end Y coordinate y+h.

Minimal example

value = RECT.YEND(rect)

REM

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

REM text

Starts a BASIC-style comment. Text after REM is ignored when REM is used as a standalone token.

Minimal example

REM

REPORT.ADD_CODE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_CODE(report, code [, language])

Adds escaped preformatted code or log text.

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

Minimal example

rep = REPORT.ADD_CODE(rep, scriptText, "cvbasic")

REPORT.ADD_DIVIDER

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_DIVIDER(report)

Adds a horizontal divider.

Minimal example

rep = REPORT.ADD_DIVIDER(rep)

REPORT.ADD_HTML

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_HTML(report, html)

Returns a report with a raw HTML block appended. Use only for trusted/generated HTML.

Minimal example

value = REPORT.ADD_HTML(report, html)

REPORT.ADD_IMAGE

FUNCTIONREPORTBATCH-FRIENDLYIMAGE
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_IMAGE(report, image [, caption [, frame]])

Returns a report with an image embedded as PNG/base64. For stacks, frame selects the frame to embed.

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
captionOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

rep = REPORT.ADD_IMAGE(rep, img, "Processed image")

REPORT.ADD_IMAGE_FILE

FUNCTIONREPORTBATCH-FRIENDLYFILE I/OIMAGE
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_IMAGE_FILE(report, path [, caption])

Embeds an existing PNG/JPEG/GIF/WEBP/SVG image file as base64 in the report.

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

Minimal example

rep = REPORT.ADD_IMAGE_FILE(rep, "out/plot.png", "Metric plot")

REPORT.ADD_KV

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_KV(report, key, value [, unit])

Adds one key/value row as a compact table.

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

Minimal example

rep = REPORT.ADD_KV(rep, "FPS", STACK.FPS(st), "Hz")

REPORT.ADD_LIST

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_LIST(report, items [, caption])

Adds a bullet list from a newline separated string or an 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
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_LIST(rep, "load ok\nfilter ok\nsave ok", "Pipeline")

REPORT.ADD_METRIC

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_METRIC(report, name, value [, unit [, comment]])

Adds a metric card suitable for summaries and dashboards.

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

Minimal example

rep = REPORT.ADD_METRIC(rep, "SNR", 12.4, "dB", "clear event")

REPORT.ADD_NOTE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_NOTE(report, text [, kind [, title]])

Adds an emphasized note block. Kind may be INFO, SUCCESS, WARNING or DANGER.

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
kindOptional parameter. If omitted, the command uses its internal default.
titleOptional GUI/DataPlot window title.

Minimal example

rep = REPORT.ADD_NOTE(rep, "Low S/N: repeat the measurement", "WARNING", "Diagnostics")

REPORT.ADD_SECTION

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_SECTION(report, title [, level])

Returns a report with a section heading appended. Level is clamped to H2..H4.

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

Minimal example

rep = REPORT.ADD_SECTION(rep, "Summary")

REPORT.ADD_TABLE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TABLE(report, table [, caption [, headers]])

Returns a report with a 1D/2D ARRAY/TABLE rendered as an HTML table. Optional headers may be a comma/pipe separated string or a 1D 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
captionOptional parameter. If omitted, the command uses its internal default.
headersOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_TABLE(rep, metrics, "Metrics", "Name,Value,Unit")

REPORT.ADD_TABLE_HEADERS

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TABLE_HEADERS(report, table, headers [, caption])

Adds a table with explicit column headers. Headers may be a comma/pipe/semicolon separated string or an 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
captionOptional parameter. If omitted, the command uses its internal default.

Minimal example

rep = REPORT.ADD_TABLE_HEADERS(rep, metrics, "Metric,Value", "Summary")

REPORT.ADD_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ADD_TEXT(report, text)

Returns a report with an escaped text paragraph appended.

Minimal example

rep = REPORT.ADD_TEXT(rep, "Result OK")

REPORT.CREATE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.CREATE(title [, subtitle])

Creates a closed HTML report object represented as text. Use REPORT.ADD_* to append items and REPORT.SAVE_HTML to write it.

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

Minimal example

rep = REPORT.CREATE("ROI Analysis")

REPORT.FROM_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.FROM_TEXT(text)

Reads a report back from text, wrapping plain fragments in a valid report document if needed.

Minimal example

value = REPORT.FROM_TEXT(text)

REPORT.ITEM_COUNT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.ITEM_COUNT(report)

Returns the number of appended report items.

Minimal example

value = REPORT.ITEM_COUNT(report)

REPORT.SAVE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.SAVE(report, path)

Alias of REPORT.SAVE_HTML(report,path).

Minimal example

ok = REPORT.SAVE(rep, "report.html")

REPORT.SAVE_HTML

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.SAVE_HTML(report, path)

Writes the closed report to a UTF-8 HTML file and returns TRUE on success. REPORT.SAVE is an alias.

Minimal example

ok = REPORT.SAVE(rep, "report.html")

REPORT.TITLE

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.TITLE(report)

Returns the report title extracted from the H1 heading.

Minimal example

value = REPORT.TITLE(report)

REPORT.TO_TEXT

FUNCTIONREPORTBATCH-FRIENDLY
Kind: Function   Category: Report functions   Namespace: REPORT

REPORT.TO_TEXT(report)

Serializes a report to text. In the current implementation the report is already an HTML text object.

Minimal example

value = REPORT.TO_TEXT(report)

RETURN

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

RETURN [expr]

Exits the current SUB or returns expr from the current FUNCTION.

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

Minimal example

SUB PROCESS_IMAGE(src, dst)
    CV.GRAY src AS g
    CV.CLAHE g, 2.0, 8 AS dst
ENDSUB

CALL PROCESS_IMAGE(img, enhanced)

FUNCTION DOUBLE_VALUE(x)
    RETURN x * 2
ENDFUNCTION

ROI.AREA

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.AREA source [, x, y, w, h [, frame]]

Returns the ROI area in 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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

areaRoi = ROI.AREA(img)

ROI.CHANGE

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.CHANGE source [, x, y, w, h [, frame]]

Returns the last ROI change kind, such as set, clear, from_desktop, explicit, create, move, resize or frame. For image objects this metadata remains readable after ROI.CLEAR.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

kind$ = ROI.CHANGE(img)

ROI.CLEAR

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.CLEAR source

Clears a programmatic image ROI, or clears a GUI window ROI when source is a title string.

Minimal example

img = ROI.CLEAR(img)

ROI.EXTRACT

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.EXTRACT source [, rect [, frame]] OR ROI.EXTRACT source, x, y, w, h [, frame]

Extracts the stored, explicit or RECT-based ROI as a new single-image patch. Works with image objects and, when a GUI host exists, desktop window titles.

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
rectOptional parameter. If omitted, the command uses its internal default.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

patch = ROI.EXTRACT(img)
patch2 = ROI.EXTRACT(img, RECT.CREATE(10,20,30,40))

ROI.FRAME

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.FRAME source [, x, y, w, h [, frame]]

Returns the frame index associated with the ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

f = ROI.FRAME(img)

ROI.FROM_DESKTOP

FUNCTIONROIGUI / INTERACTIVE
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.FROM_DESKTOP image, windowTitle

Copies the current interactive GUI ROI from a named window into an image/stack object.

Minimal example

img = ROI.FROM_DESKTOP(img, "Source")

ROI.H

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.H source [, x, y, w, h [, frame]]

Returns the ROI height in 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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

h = ROI.H(img)

ROI.MAX

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.MAX source [, x, y, w, h [, frame]]

Returns the maximum sample value inside a stored or temporary ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

mx = ROI.MAX(img)

ROI.MEAN

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.MEAN source [, x, y, w, h [, frame]]

Returns the mean of all samples inside a stored or temporary ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

m = ROI.MEAN(img, 100, 80, 200, 120)

ROI.MIN

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.MIN source [, x, y, w, h [, frame]]

Returns the minimum sample value inside a stored or temporary ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

mn = ROI.MIN(img)

ROI.RECT

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.RECT source [, x, y, w, h [, frame]]

Returns the current or temporary ROI as a RECT-compatible value [x,y,w,h]. This closes the ROI/RECT geometry loop.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

r = ROI.RECT(img)
ASSERT RECT.EQUAL(r, RECT.CREATE(100,80,200,120))

ROI.REVISION

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.REVISION source [, x, y, w, h [, frame]]

Returns the monotonic ROI revision counter for stored programmatic/GUI ROIs. Explicit temporary ROIs return 0. For image objects this metadata remains readable after ROI.CLEAR.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

r = ROI.REVISION(img)

ROI.SET

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.SET image, x, y, w, h [, frame]

Stores a programmatic ROI inside an image/stack object and returns the same object. This is headless-safe.

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

img = ROI.SET(img, 100, 80, 200, 120)

ROI.SET_RECT

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.SET_RECT image, rect [, frame]

Stores a programmatic ROI using a RECT value returned by RECT.CREATE, RECT.FROM_TEXT, RECT.CLIP, RECT.INTERSECT or ROI.RECT. The RECT is clipped to image bounds and the same image object is returned.

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

r = RECT.CREATE(100, 80, 200, 120)
img = ROI.SET_RECT(img, r)

ROI.STDDEV

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.STDDEV source [, x, y, w, h [, frame]]

Returns the standard deviation of all samples inside a stored or temporary ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

s = ROI.STDDEV(img)

ROI.SUM

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.SUM source [, x, y, w, h [, frame]]

Returns the sum of all samples inside a stored or temporary ROI.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

sumRoi = ROI.SUM(img)

ROI.VALID

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.VALID source [, x, y, w, h [, frame]]

Returns TRUE if a ROI is available or if the explicit ROI coordinates are valid. Source may be an image/stack object or a GUI window title.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

IF ROI.VALID(img) THEN
    PRINT ROI.MEAN(img)
ENDIF

ROI.W

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.W source [, x, y, w, h [, frame]]

Returns the ROI width in 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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

w = ROI.W(img)

ROI.X

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.X source [, x, y, w, h [, frame]]

Returns the ROI left coordinate.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

x = ROI.X(img)

ROI.X2

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.X2 source [, x, y, w, h [, frame]]

Returns the Qt-style inclusive right ROI coordinate. Prefer ROI.XEND for the half-open exclusive end coordinate.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

x2 = ROI.X2(img)

ROI.XEND

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.XEND source [, x, y, w, h [, frame]]

Returns the exclusive half-open end coordinate x+w, aligned with RECT.XEND and OpenCV cv::Rect.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

xEnd = ROI.XEND(img)

ROI.Y

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.Y source [, x, y, w, h [, frame]]

Returns the ROI top coordinate.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

y = ROI.Y(img)

ROI.Y2

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.Y2 source [, x, y, w, h [, frame]]

Returns the Qt-style inclusive bottom ROI coordinate. Prefer ROI.YEND for the half-open exclusive end coordinate.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

y2 = ROI.Y2(img)

ROI.YEND

FUNCTIONROIBATCH-FRIENDLY
Kind: Function   Category: ROI functions   Namespace: ROI

ROI.YEND source [, x, y, w, h [, frame]]

Returns the exclusive half-open end coordinate y+h, aligned with RECT.YEND and OpenCV cv::Rect.

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
xOptional parameter. If omitted, the command uses its internal default.
yOptional parameter. If omitted, the command uses its internal default.
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.
frameZero-based frame index; some stack commands accept -1 for all frames.

Minimal example

yEnd = ROI.YEND(img)

SERIAL.ADD

FUNCTIONSERIALBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: SERIAL

SERIAL.ADD(a, b)

Library: Serial user library 1.0.0 Returns a + b.

Minimal example

value = SERIAL.ADD(a, b)

SERIAL.HELLO

STATEMENTSERIALBATCH-FRIENDLYIMAGESTACK / VIDEO
Kind: Command   Category: Other image / stack statements   Namespace: SERIAL

SERIAL.HELLO [name]

Library: Serial user library 1.0.0 Prints a greeting from the DLL.

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

Minimal example

SERIAL.HELLO

SERIAL.VERSION

FUNCTIONSERIALBATCH-FRIENDLYIMAGE
Kind: Function   Category: OpenCV / media functions   Namespace: SERIAL

SERIAL.VERSION()

Library: Serial user library 1.0.0 Returns the library version string.

Minimal example

value = SERIAL.VERSION()

SIGNAL.SPECTRUM

FUNCTIONSIGNALBATCH-FRIENDLY
Kind: Function   Category: Signal functions   Namespace: SIGNAL

SIGNAL.SPECTRUM(signal, fps [, removeDc [, hannWindow [, padPow2]]])

Computes a Hann-windowed DFT magnitude spectrum from a numeric signal. Returns an Nx2 array: frequency Hz, 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
removeDcOptional parameter. If omitted, the command uses its internal default.
hannWindowOptional parameter. If omitted, the command uses its internal default.
padPow2Optional parameter. If omitted, the command uses its internal default.

Minimal example

spec = SIGNAL.SPECTRUM(signal, fps, TRUE, TRUE, TRUE)
freq = ARRAY.COLUMN(spec, 0)
mag = ARRAY.COLUMN(spec, 1)

STACK

KEYWORDBATCH-FRIENDLYSTACK / VIDEO
Kind: Keyword   Category: Language keywords   Namespace: CORE

STACK

Logical type returned by TYPE(x) for frame stacks.

Minimal example

STACK

STACK.ABSDIFF_PREV

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

STACK.ABSDIFF_PREV stack AS dst

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

Minimal example

STACK.ABSDIFF_PREV st AS motion

STACK.APPEND

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

STACK.APPEND stack, image AS dst

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

Minimal example

STACK.APPEND st, img AS st2

STACK.AVERAGE

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

STACK.AVERAGE stack AS dst

Reduces a stack to a single average image.

Minimal example

STACK.AVERAGE st AS avg

STACK.DELETE

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

STACK.DELETE stack, index AS dst

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

Minimal example

STACK.DELETE st, 10 AS st2

STACK.FPS

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

STACK.FPS(image)

FPS associated with the video stack.

Minimal example

value = STACK.FPS(image)

STACK.FRAME

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

STACK.FRAME(stack,index)

Extracts a stack frame as a single image.

Minimal example

value = STACK.FRAME(stack,index)

STACK.FRAMES

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

STACK.FRAMES(image)

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

Minimal example

value = STACK.FRAMES(image)

STACK.FROM_IMAGES

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

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

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

Optional parameters

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

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

Minimal example

STACK.FROM_IMAGES img0, img1, img2 AS st

STACK.INSERT

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

STACK.INSERT stack, index, imageOrStack AS dst

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

Minimal example

STACK.INSERT st, 0, firstFrame AS st2

STACK.INTERPOLATE

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

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

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

Optional parameters

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

ParameterMeaning
methodOpenCV method selector accepted by the command.

Minimal example

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

STACK.MAX_IMAGE

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

STACK.MAX_IMAGE stack AS dst

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

Minimal example

STACK.MAX_IMAGE st AS mx

STACK.MEAN_SIGNAL

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

STACK.MEAN_SIGNAL(stack [, mode])

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

Optional parameters

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

ParameterMeaning
modeMode selector; accepted values are described in the command text.

Minimal example

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

STACK.MEDIAN

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

STACK.MEDIAN stack AS dst

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

Minimal example

STACK.MEDIAN st AS med

STACK.MIN_IMAGE

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

STACK.MIN_IMAGE stack AS dst

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

Minimal example

STACK.MIN_IMAGE st AS mn

STACK.PIXEL_SERIES

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

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

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

Optional parameters

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

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

Minimal example

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

STACK.RANGE

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

STACK.RANGE stack, first, count AS dst

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

Minimal example

STACK.RANGE st, 10, 50 AS clip

STACK.RESAMPLE_FPS

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

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

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

Optional parameters

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

ParameterMeaning
methodOpenCV method selector accepted by the command.

Minimal example

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

STACK.SET_FPS

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

STACK.SET_FPS stack, fps AS dst

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

Minimal example

STACK.SET_FPS st, 10.0 AS st10

STACK.STABILIZE

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

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

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

Optional parameters

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

ParameterMeaning
methodOpenCV method selector accepted by the command.
referenceIndexOptional parameter. If omitted, the command uses its internal default.
maxFeaturesOptional parameter. If omitted, the command uses its internal default.
ransacThresholdOptional parameter. If omitted, the command uses its internal default.
borderValueConstant value used to fill pixels outside the source image after a transform.
transformsOptional parameter. If omitted, the command uses its internal default.

Minimal example

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

STACK.STDDEV_IMAGE

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

STACK.STDDEV_IMAGE stack AS dst

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

Minimal example

STACK.STDDEV_IMAGE st AS sigma

STACK.TEMPORAL_FILTER

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

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

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

Optional parameters

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

ParameterMeaning
methodOpenCV method selector accepted by the command.

Minimal example

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

STEP

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FOR var = start TO end [STEP step]

Increment of the numeric FOR loop.

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.

Minimal example

FOR i = 0 TO 9 STEP 1
    PRINT i
NEXT

DIM values(3)
values(0) = 10
values(1) = 20
values(2) = 30
FOR v IN values
    PRINT v
NEXT

SUB

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

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

SUB PROCESS_IMAGE(src, dst)
    CV.GRAY src AS g
    CV.CLAHE g, 2.0, 8 AS dst
ENDSUB

CALL PROCESS_IMAGE(img, enhanced)

SWITCH

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

SWITCH expression

Starts a multi-branch selection block. The expression is evaluated once and compared with each CASE value, range or numeric comparison.

Minimal example

SWITCH score
CASE 0 TO 30
    PRINT "low"
CASE 31 TO 70
    PRINT "medium"
CASE > 70
    PRINT "high"
DEFAULT
    PRINT "invalid"
ENDSWITCH

SYS.ARG

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.ARG(index)

Returns one zero-based positional command-line argument, or an empty string when out of range.

Minimal example

value = SYS.ARG(index)

SYS.ARGC

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.ARGC()

Returns the number of positional arguments passed after the script name on the command line.

Minimal example

value = SYS.ARGC()

SYS.CWD

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.CWD()

Returns the current process working directory.

Minimal example

value = SYS.CWD()

SYS.GET

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.GET(name[, defaultValue])

Returns a named parameter passed with --set name=value; optional second argument is the default 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
defaultValueOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = SYS.GET(name[, defaultValue])

SYS.HAS

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.HAS(name)

TRUE if a named parameter was passed with --set name=value.

Minimal example

value = SYS.HAS(name)

SYS.SCRIPT_DIR

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.SCRIPT_DIR()

Absolute directory containing the currently loaded .cvb script.

Minimal example

value = SYS.SCRIPT_DIR()

SYS.SCRIPT_PATH

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.SCRIPT_PATH()

Absolute path of the currently loaded .cvb script.

Minimal example

value = SYS.SCRIPT_PATH()

TABLE.CELL

FUNCTIONTABLEBATCH-FRIENDLY
Kind: Function   Category: Table functions   Namespace: TABLE

TABLE.CELL(table, row, col)

Reads one zero-based table cell.

Minimal example

value = TABLE.CELL(table, row, col)

TABLE.COLS

FUNCTIONTABLEBATCH-FRIENDLY
Kind: Function   Category: Table functions   Namespace: TABLE

TABLE.COLS(table)

Returns the number of columns in a 2D array table.

Minimal example

value = TABLE.COLS(table)

TABLE.COLUMN

FUNCTIONTABLEBATCH-FRIENDLY
Kind: Function   Category: Table functions   Namespace: TABLE

TABLE.COLUMN(table, column)

Alias of ARRAY.COLUMN for table-like 2D arrays.

Minimal example

value = TABLE.COLUMN(table, column)

TABLE.ROW

FUNCTIONTABLEBATCH-FRIENDLY
Kind: Function   Category: Table functions   Namespace: TABLE

TABLE.ROW(table, row)

Alias of ARRAY.ROW for table-like 2D arrays.

Minimal example

value = TABLE.ROW(table, row)

TABLE.ROWS

FUNCTIONTABLEBATCH-FRIENDLY
Kind: Function   Category: Table functions   Namespace: TABLE

TABLE.ROWS(table)

Returns the number of rows in a 2D array table.

Minimal example

value = TABLE.ROWS(table)

TEXT.CONTAINS

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.CONTAINS(value, fragment [, caseSensitive])

Returns TRUE if value contains the requested text fragment.

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

Minimal example

ASSERT TEXT.CONTAINS(LANG.HELP("ROI.SET"), "ROI")

TEXT.INDEX_OF

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.INDEX_OF(value, fragment [, caseSensitive])

Returns the zero-based index of fragment in value, or -1 when absent.

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

Minimal example

value = TEXT.INDEX_OF(value, fragment [, caseSensitive])

TEXT.LEFT

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.LEFT(value,count)

Returns the first N characters.

Minimal example

value = TEXT.LEFT(value,count)

TEXT.LEN

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.LEN(value)

Length of the value converted to text.

Minimal example

value = TEXT.LEN(value)

TEXT.LINE_COUNT

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.LINE_COUNT(text)

Counts lines in a text block. Empty text returns 0; both LF and CRLF are supported.

Minimal example

value = TEXT.LINE_COUNT(text)

TEXT.LINE_ITEM

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.LINE_ITEM(text,index)

Returns one zero-based line from a text block. Out-of-range indices return an empty string.

Minimal example

value = TEXT.LINE_ITEM(text,index)

TEXT.LOWER

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.LOWER(value)

Converts text to lowercase.

Minimal example

value = TEXT.LOWER(value)

TEXT.MID

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.MID(value,start[,count])

Extracts a substring starting at a given position.

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

Minimal example

value = TEXT.MID(value,start[,count])

TEXT.REPLACE

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.REPLACE(value,before,after)

Replaces one substring with another.

Minimal example

value = TEXT.REPLACE(value,before,after)

TEXT.RIGHT

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.RIGHT(value,count)

Returns the last N characters.

Minimal example

value = TEXT.RIGHT(value,count)

TEXT.STR

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.STR(value)

Converts the value to string.

Minimal example

value = TEXT.STR(value)

TEXT.TRIM

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.TRIM(value)

Removes leading and trailing spaces.

Minimal example

value = TEXT.TRIM(value)

TEXT.UPPER

FUNCTIONTEXTBATCH-FRIENDLY
Kind: Function   Category: Text functions   Namespace: TEXT

TEXT.UPPER(value)

Converts text to uppercase.

Minimal example

value = TEXT.UPPER(value)

THEN

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

IF condition THEN [statement]

Separates the condition from the true branch. A statement after THEN creates a one-line IF.

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

Minimal example

IF CV.WIDTH(img) > 512 THEN
    PRINT "large image"
ELSE
    PRINT "small image"
ENDIF

TIME.DELAY_MS

STATEMENTTIMEBATCH-FRIENDLY
Kind: Command   Category: Time statements   Namespace: TIME

TIME.DELAY_MS milliseconds

Pauses script execution for the requested number of milliseconds while keeping STOP responsive.

Minimal example

TIME.DELAY_MS

TIME.ELAPSED_MS

FUNCTIONTIMEBATCH-FRIENDLY
Kind: Function   Category: Time functions   Namespace: TIME

TIME.ELAPSED_MS(name)

Returns monotonic milliseconds elapsed since TIMER_RESET was called for the named timer.

Minimal example

value = TIME.ELAPSED_MS(name)

TIME.TICK_MS

FUNCTIONTIMEBATCH-FRIENDLY
Kind: Function   Category: Time functions   Namespace: TIME

TIME.TICK_MS()

Returns monotonic milliseconds elapsed since the current script runtime started or was cleared.

Minimal example

value = TIME.TICK_MS()

TIME.TIMER_RESET

STATEMENTTIMEBATCH-FRIENDLY
Kind: Command   Category: Time statements   Namespace: TIME

TIME.TIMER_RESET name

Creates or resets a named monotonic timer inside the current script runtime.

Minimal example

TIME.TIMER_RESET

TO

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

FOR var = start TO end [STEP step]

Specifies the final value of the FOR loop.

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.

Minimal example

FOR i = 0 TO 9 STEP 1
    PRINT i
NEXT

DIM values(3)
values(0) = 10
values(1) = 20
values(2) = 30
FOR v IN values
    PRINT v
NEXT

TRUE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

TRUE

Boolean true constant.

Minimal example

TRUE

TRY

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

TRY

Starts a protected block. Runtime errors raised before CATCH are intercepted instead of stopping the script.

Minimal example

TRY
    IO.LOAD "missing.png" AS img
CATCH err, line
    PRINT "Error at line "; line; ": "; err
ENDTRY

USING

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

USING "library.cvb"

Includes another cvBasic source file before execution. Relative paths are resolved from the current script or included file directory; recursive include cycles are rejected. INCLUDE is an exact alias of USING. Rev 10.0 also supports ':' between simple statements and '_' as a line-continuation marker.

Minimal example

USING "lib/image_quality.cvb"

score = CONTRAST_SCORE(img)

VEC.ANIM.CIRCLE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.CIRCLE handle, itemId, centerX, centerY, radius, durationMs [, startDeg [, endDeg [, loops [, yoyo]]]]

Alias of VEC.ANIM.ORBIT.

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
startDegOptional parameter. If omitted, the command uses its internal default.
endDegOptional parameter. If omitted, the command uses its internal default.
loopsOptional parameter. If omitted, the command uses its internal default.
yoyoOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.ANIM.CIRCLE

VEC.ANIM.MOVE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.MOVE handle, itemId, x1, y1, x2, y2, durationMs [, loops [, yoyo]]

Animates the item position. loops=1 runs once; loops=0 loops forever; yoyo=TRUE reverses every other loop.

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

Minimal example

VEC.ANIM.MOVE v, ball, 40, 180, 600, 180, 2500, 0, TRUE

VEC.ANIM.OPACITY

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.OPACITY handle, itemId, o1, o2, durationMs [, loops [, yoyo]]

Animates item opacity between two values in range 0..1.

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

Minimal example

VEC.ANIM.OPACITY

VEC.ANIM.OPACITY_KEYFRAMES

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.OPACITY_KEYFRAMES handle, itemId, "timeMs,opacity;timeMs,opacity;..." [, loops]

Animates item opacity using absolute time/value keyframes. This is useful for discrete states: switches, traffic lights, phase indicators, etc. loops=0 loops forever.

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

Minimal example

VEC.ANIM.OPACITY_KEYFRAMES v, leverA, "0,1;5200,1;5201,0;10400,0", 0

VEC.ANIM.OPACITY_PATH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.OPACITY_PATH handle, itemId, keyframes [, loops]

Alias of VEC.ANIM.OPACITY_KEYFRAMES.

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

Minimal example

VEC.ANIM.OPACITY_PATH

VEC.ANIM.ORBIT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.ORBIT handle, itemId, centerX, centerY, radius, durationMs [, startDeg [, endDeg [, loops [, yoyo]]]]

Animates an item on a circular orbit around a center point. Alias: VEC.ANIM.CIRCLE.

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
startDegOptional parameter. If omitted, the command uses its internal default.
endDegOptional parameter. If omitted, the command uses its internal default.
loopsOptional parameter. If omitted, the command uses its internal default.
yoyoOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.ANIM.ORBIT v, moon, 400, 260, 120, 3000, 0, 360, 0, FALSE

VEC.ANIM.PATH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.PATH handle, itemId, "x,y;x,y;...", durationMs [, loops [, yoyo]]

Animates an item along a polyline trajectory. Very useful for physics/mathematics demonstrations. Alias: VEC.ANIM.TRAJECTORY.

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

Minimal example

VEC.ANIM.PATH v, particle, "80,320;180,220;320,250;520,160", 4000, 0, TRUE

VEC.ANIM.ROTATE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.ROTATE handle, itemId, a1, a2, durationMs [, loops [, yoyo]]

Animates the item rotation in degrees.

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

Minimal example

VEC.ANIM.ROTATE

VEC.ANIM.ROTATE_PATH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.ROTATE_PATH handle, itemId, "a;a;a;...", durationMs [, loops [, yoyo]]

Animates item rotation through a list of angle keyframes. This is more useful than linear rotation for physics, because the angle can come from a numerical simulation. Alias: VEC.ANIM.ROTATION_PATH.

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

Minimal example

VEC.ANIM.ROTATE_PATH v, rod, angleList, 6000, 0, TRUE

VEC.ANIM.ROTATION_PATH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.ROTATION_PATH handle, itemId, angleList, durationMs [, loops [, yoyo]]

Alias of VEC.ANIM.ROTATE_PATH.

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

Minimal example

VEC.ANIM.ROTATION_PATH

VEC.ANIM.SCALE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.SCALE handle, itemId, s1, s2, durationMs [, loops [, yoyo]]

Animates uniform scale, useful for pulsating markers or attention cues.

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

Minimal example

VEC.ANIM.SCALE

VEC.ANIM.STATE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.STATE handle, itemId, keyframes [, loops]

Alias of VEC.ANIM.OPACITY_KEYFRAMES, intended for visibility/state timelines.

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

Minimal example

VEC.ANIM.STATE

VEC.ANIM.STOP

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.STOP handle [, itemId]

Stops animations. Omit itemId or pass 0 to stop all animations on the canvas.

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

Minimal example

VEC.ANIM.STOP v

VEC.ANIM.TRAJECTORY

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.TRAJECTORY handle, itemId, "x,y;x,y;...", durationMs [, loops [, yoyo]]

Alias of VEC.ANIM.PATH.

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

Minimal example

VEC.ANIM.TRAJECTORY

VEC.ANIM.VISIBLE_TIMELINE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector animation statements   Namespace: VEC

VEC.ANIM.VISIBLE_TIMELINE handle, itemId, keyframes [, loops]

Alias of VEC.ANIM.OPACITY_KEYFRAMES.

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

Minimal example

VEC.ANIM.VISIBLE_TIMELINE

VEC.ARROW

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.ARROW handle, x1, y1, x2, y2 [, headSize]

Adds a line with a simple arrow head, useful for annotations and motion/vector diagrams.

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

Minimal example

VEC.ARROW v, 80, 420, 300, 360, 18

VEC.ARROW_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.ARROW_ID(handle, x1, y1, x2, y2 [, headSize])

Function form of VEC.ARROW. It returns the item id.

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

Minimal example

value = VEC.ARROW_ID(handle, x1, y1, x2, y2 [, headSize])

VEC.AXES

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.AXES handle [, originX [, originY [, tickStep [, color [, width]]]]]

Draws X/Y axes with optional ticks. This is intentionally simple and script-friendly.

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
originXOptional parameter. If omitted, the command uses its internal default.
originYOptional parameter. If omitted, the command uses its internal default.
tickStepOptional parameter. If omitted, the command uses its internal default.
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.AXES v, 60, 420, 50, "#444444", 1.5

VEC.BATCH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.BATCH handle [, enabled]

Temporarily freezes viewport repaints/info-label updates while many vector items are created. Use VEC.BATCH v, TRUE before a heavy plot block and VEC.BATCH v, FALSE after it. Alias: VEC.FREEZE.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

VEC.BATCH v, TRUE
' heavy plot commands...
VEC.BATCH v, FALSE
VEC.SYNC v, 40

VEC.BRUSH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.BRUSH handle [, color|TRANSPARENT]

Sets the fill brush for rectangles and ellipses. Use TRANSPARENT/NONE to draw outlines only.

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
colorOptional plot/drawing color value.
TRANSPARENTOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.BRUSH v, "#ffeeaa"

VEC.CAPTURE_AVI

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.CAPTURE_AVI handle, path, frames [, fps [, transparent [, fourcc]]]

Captures the animated vector canvas directly to an AVI file. Default codec is MJPG; aliases: VEC.SAVE_AVI and VEC.EXPORT_AVI.

Optional parameters

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

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
transparentOptional parameter. If omitted, the command uses its internal default.
fourccOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.CAPTURE_AVI v, "out/orbit.avi", 180, 30, FALSE, "MJPG"

VEC.CAPTURE_FRAMES

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.CAPTURE_FRAMES handle, folder, prefix, frames [, delayMs [, transparent]]

Alias of VEC.CAPTURE_PNG.

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

Minimal example

VEC.CAPTURE_FRAMES

VEC.CAPTURE_PNG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.CAPTURE_PNG handle, folder, prefix, frames [, delayMs [, transparent]]

Captures a sequence of PNG frames from the current canvas while active animations are running. Aliases: VEC.CAPTURE_FRAMES and VEC.EXPORT_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
delayMsOptional parameter. If omitted, the command uses its internal default.
transparentOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.CAPTURE_PNG v, "out/orbit_frames", "orbit", 90, 33, FALSE

VEC.CAPTURE_STACK

FUNCTIONVECBATCH-FRIENDLYSTACK / VIDEOVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.CAPTURE_STACK(handle, frames [, fps [, transparent]])

Captures the animated vector canvas into a stack/image-sequence object that can be passed to GUI.SHOW or saved by the normal image/stack pipeline. Alias: VEC.STACK.

Optional parameters

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

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

Minimal example

stack = VEC.CAPTURE_STACK(v, 120, 30, FALSE)
GUI.SHOW stack, "Vector animation stack"

VEC.CLEAR

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.CLEAR handle

Removes all vector items from the selected canvas without destroying the window.

Minimal example

VEC.CLEAR v

VEC.CLOSE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.CLOSE handle

Closes a vector canvas window.

Minimal example

VEC.CLOSE v

VEC.CREATE

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.CREATE(width, height [, title [, background]])

Creates an interactive vector canvas and returns a numeric handle. The canvas is a scriptable QGraphicsScene-based whiteboard that can be exported to SVG or rasterized back to a Mat.

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.
backgroundInitial canvas background value.

Minimal example

v = VEC.CREATE(800, 500, "Vector demo", "white")

VEC.ELLIPSE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.ELLIPSE handle, x, y, w, h

Adds an ellipse inscribed in the rectangle x,y,w,h using the current pen and brush.

Minimal example

VEC.ELLIPSE v, 260, 70, 160, 90

VEC.ELLIPSE_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.ELLIPSE_ID(handle, x, y, w, h)

Function form of VEC.ELLIPSE. It adds the ellipse and returns its item id.

Minimal example

ball = VEC.ELLIPSE_ID(v, 60, 180, 40, 40)

VEC.EXPORT_AVI

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.EXPORT_AVI handle, path, frames [, fps [, transparent [, fourcc]]]

Alias of VEC.CAPTURE_AVI.

Optional parameters

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

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
transparentOptional parameter. If omitted, the command uses its internal default.
fourccOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.EXPORT_AVI

VEC.EXPORT_FRAMES

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.EXPORT_FRAMES handle, folder, prefix, frames [, delayMs [, transparent]]

Alias of VEC.CAPTURE_PNG.

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

Minimal example

VEC.EXPORT_FRAMES

VEC.FLUSH

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.FLUSH handle [, maxMs]

Alias of VEC.SYNC.

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

Minimal example

VEC.FLUSH

VEC.FONT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.FONT handle [, family [, pointSize [, bold [, italic]]]]

Sets the current font used by VEC.TEXT.

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
familyOptional parameter. If omitted, the command uses its internal default.
pointSizeOptional parameter. If omitted, the command uses its internal default.
boldOptional parameter. If omitted, the command uses its internal default.
italicOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.FONT v, "Arial", 18, TRUE, FALSE

VEC.FRAME

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.FRAME(handle [, transparent])

Alias of VEC.MAT, named for animated/capture workflows: returns the current canvas frame as Mat.

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

Minimal example

value = VEC.FRAME(handle [, transparent])

VEC.FRAME_PNG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.FRAME_PNG handle, path [, transparent]

Alias of VEC.SAVE_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
transparentOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.FRAME_PNG

VEC.FREEZE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.FREEZE handle [, enabled]

Alias of VEC.BATCH.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

VEC.FREEZE

VEC.GRID

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.GRID handle, step [, color [, width]]

Draws a lightweight grid as one vector item. It is useful as a plotting/geometry reference layer.

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
colorOptional plot/drawing color value.
widthOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.GRID v, 50, "#dddddd", 1

VEC.IMAGE

STATEMENTVECBATCH-FRIENDLYIMAGEVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.IMAGE handle, image [, x [, y [, w [, h [, opacity]]]]]

Inserts the first frame of an image/stack into the vector canvas. If w and h are positive the image is scaled; opacity is 0..1.

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

Minimal example

VEC.IMAGE v, img, 0, 0, 512, 512, 0.35

VEC.IMAGE_ID

FUNCTIONVECBATCH-FRIENDLYIMAGEVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.IMAGE_ID(handle, image [, x [, y [, w [, h [, opacity]]]]])

Function form of VEC.IMAGE. It adds the image layer and returns its item id.

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

Minimal example

value = VEC.IMAGE_ID(handle, image [, x [, y [, w [, h [, opacity]]]]])

VEC.ITEM.CENTER_X

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.CENTER_X(handle, itemId)

Returns the current scene-center x coordinate of a vector item.

Minimal example

value = VEC.ITEM.CENTER_X(handle, itemId)

VEC.ITEM.CENTER_Y

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.CENTER_Y(handle, itemId)

Returns the current scene-center y coordinate of a vector item.

Minimal example

value = VEC.ITEM.CENTER_Y(handle, itemId)

VEC.ITEM.DRAGGABLE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.DRAGGABLE handle, itemId [, enabled]

Alias of VEC.ITEM.MOVABLE.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

VEC.ITEM.DRAGGABLE

VEC.ITEM.MOVABLE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.MOVABLE handle, itemId [, enabled]

Makes an item draggable with the mouse inside the vector canvas. Movable items are also made selectable. Alias: VEC.ITEM.DRAGGABLE.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

VEC.ITEM.MOVABLE v, chargeItem, TRUE

VEC.ITEM.MOVE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.MOVE handle, itemId, x, y

Alias of VEC.ITEM.POS.

Minimal example

VEC.ITEM.MOVE

VEC.ITEM.OPACITY

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.OPACITY handle, itemId, opacity

Sets opacity 0..1 for one existing item.

Minimal example

VEC.ITEM.OPACITY

VEC.ITEM.OPACITY_VALUE

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.OPACITY_VALUE(handle, itemId)

Returns the current opacity value of a vector item.

Minimal example

value = VEC.ITEM.OPACITY_VALUE(handle, itemId)

VEC.ITEM.ORIGIN

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.ORIGIN handle, itemId, x, y

Sets the local transform origin/pivot for rotation and scale. Alias: VEC.ITEM.PIVOT. This is important for physical systems such as pendulums, levers and rotating arms.

Minimal example

VEC.ITEM.ORIGIN v, rod, 0, 0

VEC.ITEM.PIVOT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.PIVOT handle, itemId, x, y

Alias of VEC.ITEM.ORIGIN.

Minimal example

VEC.ITEM.PIVOT

VEC.ITEM.POS

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.POS handle, itemId, x, y

Sets the position transform of an existing vector item. Alias: VEC.ITEM.MOVE.

Minimal example

VEC.ITEM.POS v, ball, 100, 160

VEC.ITEM.ROTATE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.ROTATE handle, itemId, angleDeg

Rotates an existing vector item around its local bounding-box center.

Minimal example

VEC.ITEM.ROTATE

VEC.ITEM.ROTATION

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.ROTATION(handle, itemId)

Returns the current rotation angle of a vector item in degrees.

Minimal example

value = VEC.ITEM.ROTATION(handle, itemId)

VEC.ITEM.SCALE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.SCALE handle, itemId, sx [, sy]

Scales an existing item around its local bounding-box center. If sy is omitted, sx is used for both axes.

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

Minimal example

VEC.ITEM.SCALE

VEC.ITEM.SELECTABLE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.SELECTABLE handle, itemId [, enabled]

Enables or disables mouse selection for an existing vector item.

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
enabledBoolean switch: TRUE/1 enables the option, FALSE/0 disables it.

Minimal example

VEC.ITEM.SELECTABLE v, labelItem, TRUE

VEC.ITEM.X

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.X(handle, itemId)

Returns the current x position transform of a vector item.

Minimal example

value = VEC.ITEM.X(handle, itemId)

VEC.ITEM.Y

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector item query functions   Namespace: VEC

VEC.ITEM.Y(handle, itemId)

Returns the current y position transform of a vector item.

Minimal example

value = VEC.ITEM.Y(handle, itemId)

VEC.ITEM.Z

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector item statements   Namespace: VEC

VEC.ITEM.Z handle, itemId, z

Changes the z-order of an existing item.

Minimal example

VEC.ITEM.Z

VEC.ITEM_COUNT

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.ITEM_COUNT(handle)

Returns the number of registered vector items in the canvas.

Minimal example

PRINT VEC.ITEM_COUNT(v)

VEC.LAST_ITEM

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.LAST_ITEM(handle)

Returns the numeric id of the last vector item created on the canvas. This id can be used by VEC.ITEM.* and VEC.ANIM.* commands.

Minimal example

id = VEC.LAST_ITEM(v)

VEC.LAYER

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector layer statements   Namespace: VEC

VEC.LAYER handle [, name]

Alias of VEC.LAYER.SELECT.

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

Minimal example

VEC.LAYER

VEC.LAYER.CLEAR

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector layer statements   Namespace: VEC

VEC.LAYER.CLEAR handle [, name]

Deletes all vector items assigned to the selected layer. Useful for interactive redraw loops where a dynamic overlay is recalculated.

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

Minimal example

VEC.LAYER.CLEAR v, "field"

VEC.LAYER.SELECT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector layer statements   Namespace: VEC

VEC.LAYER.SELECT handle [, name]

Selects the current drawing layer. New vector items are assigned to that layer. The default layer is named default.

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

Minimal example

VEC.LAYER.SELECT v, "field"

VEC.LAYER.SHOW

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector layer statements   Namespace: VEC

VEC.LAYER.SHOW handle, name [, visible]

Alias of VEC.LAYER.VISIBLE.

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

Minimal example

VEC.LAYER.SHOW

VEC.LAYER.VISIBLE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector layer statements   Namespace: VEC

VEC.LAYER.VISIBLE handle, name [, visible]

Shows or hides all items belonging to a layer. Alias: VEC.LAYER.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
visibleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.LAYER.VISIBLE v, "field", TRUE

VEC.LINE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.LINE handle, x1, y1, x2, y2

Adds a line using the current pen.

Minimal example

VEC.LINE v, 20, 20, 300, 120

VEC.LINE_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.LINE_ID(handle, x1, y1, x2, y2)

Function form of VEC.LINE. It adds the line and returns its item id.

Minimal example

line = VEC.LINE_ID(v, 20, 20, 200, 120)

VEC.MAT

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.MAT(handle [, transparent])

Rasterizes the current vector canvas and returns it as an image/Mat value. By default it produces a normal 3-channel BGR Mat; with transparent=TRUE it keeps an alpha channel and makes the background transparent.

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

Minimal example

overlay = VEC.MAT(v, TRUE)
GUI.SHOW overlay, "Vector overlay"

VEC.NEW

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.NEW(width, height [, title [, background]])

Alias of VEC.CREATE.

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.
backgroundInitial canvas background value.

Minimal example

value = VEC.NEW(width, height [, title [, background]])

VEC.OPACITY

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.OPACITY handle, opacity

Sets the default opacity for following vector items. Opacity is 0..1.

Minimal example

VEC.OPACITY v, 0.65

VEC.PEN

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.PEN handle, color [, width [, style]]

Sets the current stroke color, width and style for following vector primitives. Colors are Qt names or #RRGGBB. Styles: SOLID, DASH, DOT, DASHDOT, DASHDOTDOT, 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
widthOptional parameter. If omitted, the command uses its internal default.
styleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PEN v, "red", 2, "SOLID"

VEC.PLOT.AREA

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.AREA handle, left, top, width, height, "x,y;x,y;...", xMin, xMax, yMin, yMax [, baseline]

Draws a filled area under a data polyline down to a baseline. Use VEC.BRUSH before the command to choose the fill color; alias: VEC.PLOT.FILL.

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

Minimal example

VEC.BRUSH v, "#ddeeff"
VEC.PLOT.AREA v, 70, 55, 620, 300, "0,0;1,2;2,1;3,3", 0, 3, 0, 4, 0

VEC.PLOT.AXES

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.AXES handle, left, top, width, height, xMin, xMax, yMin, yMax [, xTicks [, yTicks [, grid]]]]

Draws a scientific plot frame in the given rectangle, including border, tick marks, optional grid and zero axes when visible in range.

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

Minimal example

VEC.PLOT.AXES v, 60, 50, 520, 300, -6.28, 6.28, -1.5, 1.5, 8, 6, TRUE

VEC.PLOT.BAR

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.BAR handle, left, top, width, height, values, yMin, yMax [, barFill]

Alias of VEC.PLOT.BARS.

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

Minimal example

VEC.PLOT.BAR

VEC.PLOT.BARS

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.BARS handle, left, top, width, height, "v1;v2;...", yMin, yMax [, barFill]

Draws a categorical bar plot from a numeric list. The current brush fills the bars, and the current pen outlines them.

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

Minimal example

VEC.BRUSH v, "#88ccee"
VEC.PLOT.BARS v, 80, 80, 280, 220, "2;5;3;7;4", 0, 8, 0.75

VEC.PLOT.FILL

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.FILL handle, left, top, width, height, points, xMin, xMax, yMin, yMax [, baseline]

Alias of VEC.PLOT.AREA.

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

Minimal example

VEC.PLOT.FILL

VEC.PLOT.FUNCTION

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.FUNCTION handle, left, top, width, height, expression, xMin, xMax [, samples [, yMin [, yMax [, autoScale]]]]

Evaluates a function of x and plots it as a polyline. The expression can use normal math functions such as SIN, COS, EXP, SQRT, etc. When autoScale is TRUE the y range is estimated from the sampled values.

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
samplesOptional parameter. If omitted, the command uses its internal default.
yMinOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
autoScaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PLOT.FUNCTION v, 60, 50, 520, 300, "MATH.SIN(x)", -6.28, 6.28, 500, -1.2, 1.2, FALSE

VEC.PLOT.FUNCTION_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector plot functions   Namespace: VEC

VEC.PLOT.FUNCTION_ID(handle, left, top, width, height, expression, xMin, xMax [, samples [, yMin [, yMax [, autoScale]]]])

Function form of VEC.PLOT.FUNCTION. It returns the created item id of the plotted curve.

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
samplesOptional parameter. If omitted, the command uses its internal default.
yMinOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
autoScaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

curve = VEC.PLOT.FUNCTION_ID(v, 60, 50, 520, 300, "MATH.SIN(x)", -6.28, 6.28, 500, -1.2, 1.2, FALSE)

VEC.PLOT.HIST

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.HIST handle, left, top, width, height, values [, bins [, xMin [, xMax [, yMax [, barFill]]]]]

Alias of VEC.PLOT.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.
xMinOptional parameter. If omitted, the command uses its internal default.
xMaxOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
barFillOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PLOT.HIST

VEC.PLOT.HISTOGRAM

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.HISTOGRAM handle, left, top, width, height, "v1;v2;..." [, bins [, xMin [, xMax [, yMax [, barFill]]]]]

Builds a histogram from a numeric list. If xMin=xMax the range is auto-estimated; if yMax<=0 the histogram height is auto-scaled. Alias: VEC.PLOT.HIST.

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.
xMinOptional parameter. If omitted, the command uses its internal default.
xMaxOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
barFillOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PLOT.HISTOGRAM v, 410, 80, 280, 220, "0.1;0.4;0.5;1.2;1.3;1.8", 8, 0, 2, 0, 0.9

VEC.PLOT.LABELS

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.LABELS handle, left, top, width, height [, title [, xLabel [, yLabel [, fontSize]]]]

Adds title, X label and Y label to a plot rectangle. The Y label is rotated vertically.

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

Minimal example

VEC.PLOT.LABELS v, 70, 55, 620, 300, "Oscillazioni", "x", "ampiezza", 12

VEC.PLOT.LEGEND

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.LEGEND handle, left, top, "color|label;color|label;..." [, fontSize [, lineLength [, lineStep]]]

Draws a small legend box. Each item uses color|label syntax; comma is also accepted as separator.

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

Minimal example

VEC.PLOT.LEGEND v, 500, 80, "#0033aa|MATH.SIN(x);#cc0000|0.5*MATH.COS(2*x)", 10

VEC.PLOT.PARAMETRIC

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.PARAMETRIC handle, left, top, width, height, exprX, exprY, tMin, tMax [, samples [, xMin [, xMax [, yMin [, yMax [, autoScale]]]]]]

Evaluates a parametric curve using variable t and plots it in the selected rectangle. Useful for circles, spirals, Lissajous figures and many mathematical curves.

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
samplesOptional parameter. If omitted, the command uses its internal default.
xMinOptional parameter. If omitted, the command uses its internal default.
xMaxOptional parameter. If omitted, the command uses its internal default.
yMinOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
autoScaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PLOT.PARAMETRIC v, 60, 50, 520, 300, "MATH.COS(t)", "MATH.SIN(t)", 0, 6.28318, 600, -1.2, 1.2, -1.2, 1.2, FALSE

VEC.PLOT.PARAMETRIC_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector plot functions   Namespace: VEC

VEC.PLOT.PARAMETRIC_ID(handle, left, top, width, height, exprX, exprY, tMin, tMax [, samples [, xMin [, xMax [, yMin [, yMax [, autoScale]]]]]])

Function form of VEC.PLOT.PARAMETRIC. It returns the created item id of the plotted curve.

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
samplesOptional parameter. If omitted, the command uses its internal default.
xMinOptional parameter. If omitted, the command uses its internal default.
xMaxOptional parameter. If omitted, the command uses its internal default.
yMinOptional parameter. If omitted, the command uses its internal default.
yMaxOptional parameter. If omitted, the command uses its internal default.
autoScaleOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = VEC.PLOT.PARAMETRIC_ID(handle, left, top, width, height, exprX, exprY, tMin, tMax [, samples [, xMin [, xMax [, yMin [, yMax [, autoScale]]]]]])

VEC.PLOT.POINTS

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.POINTS handle, left, top, width, height, "x,y;x,y;...", xMin, xMax, yMin, yMax [, closed]

Alias of VEC.PLOT.XY.

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

Minimal example

VEC.PLOT.POINTS

VEC.PLOT.SCATTER

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.SCATTER handle, left, top, width, height, "x,y;x,y;...", xMin, xMax, yMin, yMax [, radius]

Plots a list of data-space points as vector point markers in the selected plot rectangle.

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

VEC.PLOT.SCATTER v, 70, 55, 620, 300, "-3,-1;-1,0;0,1;2,0.2;3,1.3", -3, 3, -2, 2, 4

VEC.PLOT.TICKS

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.TICKS handle, left, top, width, height, xMin, xMax, yMin, yMax [, xTicks [, yTicks [, decimals [, fontSize]]]]

Adds numeric tick labels around a VEC.PLOT.AXES rectangle. decimals=-1 uses compact general formatting.

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
xTicksOptional parameter. If omitted, the command uses its internal default.
yTicksOptional parameter. If omitted, the command uses its internal default.
decimalsOptional parameter. If omitted, the command uses its internal default.
fontSizeOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.PLOT.TICKS v, 70, 55, 620, 300, -6.28, 6.28, -1.5, 1.5, 8, 6, 2, 9

VEC.PLOT.XY

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector plot statements   Namespace: VEC

VEC.PLOT.XY handle, left, top, width, height, "x,y;x,y;...", xMin, xMax, yMin, yMax [, closed]

Plots a polyline from data-space points into the specified plot rectangle. Alias: VEC.PLOT.POINTS.

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

Minimal example

VEC.PLOT.XY v, 60, 50, 520, 300, "-3,-1;-1,0;0,1;2,0.2;3,1.3", -3, 3, -2, 2, FALSE

VEC.PLOT.XY_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector plot functions   Namespace: VEC

VEC.PLOT.XY_ID(handle, left, top, width, height, points, xMin, xMax, yMin, yMax [, closed])

Function form of VEC.PLOT.XY. It plots the data polyline and returns the created item id.

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

Minimal example

value = VEC.PLOT.XY_ID(handle, left, top, width, height, points, xMin, xMax, yMin, yMax [, closed])

VEC.PNG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.PNG handle, path

Alias of VEC.SAVE_PNG.

Minimal example

VEC.PNG

VEC.POINT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.POINT handle, x, y [, radius]

Adds a small circular point marker using the current pen color.

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

VEC.POINT v, 250, 120, 4

VEC.POINT_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.POINT_ID(handle, x, y [, radius])

Function form of VEC.POINT. It adds the point marker and returns its item id.

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

value = VEC.POINT_ID(handle, x, y [, radius])

VEC.POLYGON

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.POLYGON handle, "x,y;x,y;..."

Adds a closed polygon using the current pen and brush.

Minimal example

VEC.POLYGON v, "400,180;520,140;560,260;430,300"

VEC.POLYGON_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.POLYGON_ID(handle, points)

Function form of VEC.POLYGON. It returns the item id.

Minimal example

value = VEC.POLYGON_ID(handle, points)

VEC.POLYLINE

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.POLYLINE handle, "x,y;x,y;..."

Adds an open polyline. The point list is a compact string using semicolon-separated x,y pairs.

Minimal example

VEC.POLYLINE v, "20,240;120,180;220,210;340,110"

VEC.POLYLINE_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.POLYLINE_ID(handle, points)

Function form of VEC.POLYLINE. It returns the item id.

Minimal example

value = VEC.POLYLINE_ID(handle, points)

VEC.RECT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.RECT handle, x, y, w, h

Adds a rectangle using the current pen and brush.

Minimal example

VEC.RECT v, 40, 70, 180, 90

VEC.RECT_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.RECT_ID(handle, x, y, w, h)

Function form of VEC.RECT. It adds the rectangle and returns its item id.

Minimal example

value = VEC.RECT_ID(handle, x, y, w, h)

VEC.SAVE_AVI

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.SAVE_AVI handle, path, frames [, fps [, transparent [, fourcc]]]

Alias of VEC.CAPTURE_AVI.

Optional parameters

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

ParameterMeaning
fpsOptional parameter. If omitted, the command uses its internal default.
transparentOptional parameter. If omitted, the command uses its internal default.
fourccOptional parameter. If omitted, the command uses its internal default.

Minimal example

VEC.SAVE_AVI

VEC.SAVE_FRAME

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.SAVE_FRAME handle, path [, transparent]

Captures the current animated canvas state to a PNG frame. With transparent=TRUE the background is transparent. Alias: VEC.FRAME_PNG.

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

Minimal example

VEC.SAVE_FRAME v, "out/frame_00000.png", TRUE

VEC.SAVE_PNG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.SAVE_PNG handle, path

Rasterizes and saves the current vector canvas as a PNG preview.

Minimal example

VEC.SAVE_PNG v, "out/vector_demo.png"

VEC.SAVE_SVG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.SAVE_SVG handle, path

Exports the vector canvas to SVG. This keeps vector primitives scalable and is ideal for reports/documentation.

Minimal example

VEC.SAVE_SVG v, "out/vector_demo.svg"

VEC.STACK

FUNCTIONVECBATCH-FRIENDLYSTACK / VIDEOVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.STACK(handle, frames [, fps [, transparent]])

Alias of VEC.CAPTURE_STACK.

Optional parameters

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

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

Minimal example

value = VEC.STACK(handle, frames [, fps [, transparent]])

VEC.SVG

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector export and capture statements   Namespace: VEC

VEC.SVG handle, path

Alias of VEC.SAVE_SVG.

Minimal example

VEC.SVG

VEC.SYNC

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.SYNC handle [, maxMs]

Processes pending Qt GUI events for a bounded time. Use it after heavy vector scene creation and before export/animation when a script builds many items continuously. maxMs is clamped to 1..250 ms. Alias: VEC.FLUSH.

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

Minimal example

VEC.SYNC v, 50

VEC.TEXT

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.TEXT handle, x, y, text

Adds a text item using the current pen color and current font.

Minimal example

VEC.TEXT v, 50, 40, "cvBasic VEC canvas"

VEC.TEXT_ID

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.TEXT_ID(handle, x, y, text)

Function form of VEC.TEXT. It adds the text and returns its item id.

Minimal example

value = VEC.TEXT_ID(handle, x, y, text)

VEC.TO_MAT

FUNCTIONVECBATCH-FRIENDLYVECTOR
Kind: Function   Category: Vector canvas functions   Namespace: VEC

VEC.TO_MAT(handle [, transparent])

Alias of VEC.MAT.

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

Minimal example

value = VEC.TO_MAT(handle [, transparent])

VEC.Z

STATEMENTVECBATCH-FRIENDLYVECTOR
Kind: Command   Category: Vector canvas statements   Namespace: VEC

VEC.Z handle, z

Sets the default z-order for following vector items. Higher values are drawn above lower values.

Minimal example

VEC.Z v, 10

VM.COLOR

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

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

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

Optional parameters

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

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

Minimal example

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

VM.LAPLACE

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

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

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

Optional parameters

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

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

Minimal example

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

VM.MAX_LEVELS

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

VM.MAX_LEVELS(mediaOrWidth [, height])

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

Optional parameters

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

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

Minimal example

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

VM.MOTION

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

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

Friendly alias of VM.LAPLACE for motion magnification.

Optional parameters

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

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

Minimal example

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

VM.RIESZ

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

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

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

Optional parameters

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

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

Minimal example

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

WEND

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

WEND

Closes the WHILE loop.

Minimal example

i = 0
WHILE i < 3
    PRINT i
    i = i + 1
WEND

WHILE

KEYWORDBATCH-FRIENDLY
Kind: Keyword   Category: Language keywords   Namespace: CORE

WHILE condition

Starts a conditional loop.

Minimal example

i = 0
WHILE i < 3
    PRINT i
    i = i + 1
WEND