Distance Transform
Calculates a distance transform, where each foreground pixel stores its distance to the nearest background pixel.
Operation catalogue
Find the next node for your workflow. Explore image filters, feature detectors, motion tracking and deep neural networks.
Calculates a distance transform, where each foreground pixel stores its distance to the nearest background pixel.
Fills a connected region starting from a seed point, including neighbouring pixels whose values are within a specified tolerance.
Segments foreground from background using GrabCut, combining a user-defined rectangle or mask with iterative graph-cut optimisation.
Segments touching objects using the watershed algorithm, treating the image as a topographic surface guided by markers.
Projects connected 3-D points through camera pose and intrinsics and returns 2-D point metadata.
Converts a 3-vector axis-angle rotation to a 3 by 3 matrix or converts the matrix back to a vector.
Estimates the pose of a calibrated camera or object by solving the Perspective-n-Point problem from 3D object points and 2D image points.
Corrects lens distortion with a camera matrix and distortion coefficients.
Builds X and Y rectification maps from camera calibration metadata for later cv.remap use.
Estimates the camera response curve from aligned bracketed exposures and their exposure times.
Reduces image noise using Non-Local Means denoising, which averages similar patches while trying to preserve edges and texture.
Repairs selected damaged or unwanted regions by propagating surrounding image information into the masked area.
Merges aligned bracketed exposures into a floating-point radiance HDR image using exposure times.
Maps floating-point HDR radiance to a displayable image with an exported Reinhard, Drago, or Mantiuk tonemapper; generic createTonemap is not exported.
Computes the per-element absolute difference of two equally sized inputs.
Adds two images or arrays element by element, optionally using weights to blend them.
Computes alpha times input A plus beta times input B plus gamma with saturating conversion.
Applies a bitwise AND operation between two images or masks. Useful for keeping only shared foreground regions.
Applies a bitwise NOT operation, inverting each bit of each pixel value.
Applies a bitwise OR operation between two images or masks. Useful for combining foreground regions.
Computes a bitwise exclusive OR of corresponding input elements.
Converts connected X/Y arrays into magnitude and angle outputs.
Scales, offsets, takes absolute values, and saturates the result to 8-bit.
Adds a border using constant, replicated, reflected, or wrapped pixels.
Copies the first input through the optional 8-bit mask from the second input.
Counts non-zero elements in an 8-bit single-channel input and returns the integer.
Computes a discrete Fourier transform and visualizes log magnitude while retaining complex data metadata.
Divides corresponding input pixels with saturation and an optional scale multiplier.
Returns point coordinates of all non-zero pixels in a single-channel input.
Computes alpha times A times B plus beta times C for compatible matrix inputs.
Computes an inverse discrete Fourier transform from connected complex spectrum metadata.
Computes Euclidean magnitude from connected floating-point X and Y arrays.
Computes the mean and standard deviation of image or array values, optionally within a mask.
Merges connected equal-size single-channel images into one multi-channel image.
Finds the minimum and maximum pixel or array values and their locations.
Multiplies two images or arrays element by element, optionally using a scale factor.
Normalizes an array by min-max range or the selected vector norm.
Converts connected magnitude/angle arrays into X and Y outputs.
Reduces rows or columns using sum, average, maximum, or minimum.
Splits a multi-channel image into up to four single-channel outputs.
Subtracts one image or array from another element by element.
Creates a 4D input blob for a neural network by resizing, scaling, mean-subtracting, and optionally swapping colour channels.
Builds a batched NCHW blob from two connected images by applying the same preprocessing and concatenating planes because blobFromImages is not exported.
Applies class-aware non-maximum suppression to connected boxes and scores.
Runs a forward pass through a loaded neural network and returns the output predictions.
Splits a connected NCHW blob into up to four displayable image planes in JavaScript because imagesFromBlob is not exported.
Loads Darknet/YOLO-style neural network models from configuration and weight files with cv.readNetFromDarknet.
Loads a supported network from selected model bytes and optional configuration bytes with cv.readNet.
Loads ONNX neural network models with cv.readNetFromONNX.
Loads TensorFlow neural network models from model and configuration files with cv.readNetFromTensorflow.
Assigns the connected blob to the connected dnn_Net, optionally naming and scaling the input.
Calls dnn_Net.setPreferableBackend; this stock WebAssembly build exposes only the OpenCV backend.
Draws an outlined or filled circle on the image.
Draws detected contour outlines or filled contour regions on an image.
Draws a straight line segment between two points on the image.
Draws text on the image at a chosen position, scale, colour, and thickness.
Draws an outlined or filled rectangle on the image.
Detects circles with the gradient Hough transform after converting input to grayscale.
Converts the source to grayscale, runs Canny internally, detects infinite lines with the standard Hough transform, and draws them over the source.
Converts the source to grayscale, runs Canny internally, and detects finite segments with the probabilistic Hough transform.
Detects AKAZE keypoints and computes MLDB binary descriptors, then renders the keypoints on the source image.
Matches feature descriptors by brute force, comparing each descriptor in one image with descriptors in another image.
Detects BRISK keypoints and computes rotation- and scale-aware binary descriptors.
Draws keypoints from the second input over the first input image; it does not detect features.
Detects FAST corners by comparing a pixel with a circle of surrounding pixels. It is designed for high-speed feature detection.
Detects corners using the Harris corner detector. It highlights locations where image intensity changes strongly in multiple directions.
Detects KAZE features and computes floating-point descriptors in a nonlinear scale space.
Converts keypoint metadata to point coordinates or creates simple keypoints from points in JavaScript because KeyPoint.convert is not exported.
Calculates the second image derivative using the Laplacian operator, highlighting rapid intensity changes such as edges.
Finds maximally stable extremal regions and outlines every retained region.
Detects and describes ORB features, a fast binary alternative to SIFT that works well for real-time matching.
Detects strong Shi-Tomasi corners, often used as stable points for tracking and motion analysis.
Detects and describes SIFT keypoints that are relatively robust to scale, rotation, and illumination changes.
Detects blob-like regions using area, circularity, convexity, inertia, and colour/intensity constraints.
Calculates the first image derivative in the X or Y direction. Commonly used to emphasise horizontal or vertical edges.
Draws supplied match metadata from input 2 using the query feature identity from input 1; it never detects features itself.
Uses query features on input 1 and supplied matches on input 2 to map train coordinates back to query coordinates.
Finds the k nearest descriptor matches with the exported DescriptorMatcher/BFMatcher binding; it does not claim a FLANN index.
Consumes grouped KNN match metadata and applies the Lowe ratio test without redetecting or rematching features.
Returns descriptor matches inside a maximum distance with the exported DescriptorMatcher/BFMatcher binding.
Uses query features on input 1 and supplied matches on input 2 to estimate a train-to-query RANSAC homography and inlier mask.
Loads an image from your computer and outputs it as the starting image for the pipeline.
Displays the final processed image and saves it as a lossless PNG at the processed canvas dimensions, including alpha transparency.
Loads a local video file and outputs native-resolution decoded frames. Seeking waits for the requested frame before the pipeline runs.
Displays and records the final processed frames at their actual pixel dimensions. Recording prefers a supported high-quality codec and source-like frame rate.
Requests the default device camera, waits for native dimensions and decoded frames, and releases the stream when stopped, removed, reset, or when leaving the editor.
Applies adaptive thresholding, where the threshold is calculated locally for each neighbourhood. Useful when lighting is uneven.
Applies a false color map to an image (usually grayscale). Useful for data visualization and making intensity variations more obvious.
Smooths an image while preserving edges by considering both pixel distance and colour/intensity similarity.
Applies a normalized rectangular box filter.
Applies a normalized or unnormalized rectangular box filter.
Back-projects a reference histogram over the source image to produce a probability-like map.
Calculates an image histogram, showing how pixel intensities or channel values are distributed.
Computes a single-channel Canny edge map after converting colour input to grayscale.
Applies contrast-limited adaptive histogram equalization to grayscale or the luminance channel of colour input.
Builds grayscale histograms for two inputs and compares them with the selected metric.
Converts an image between colour spaces, such as RGBA, RGB, BGR, HSV, and grayscale.
Dilates bright foreground regions, expanding object boundaries and helping connect broken object parts.
Improves local or global contrast by redistributing image intensity values. Often used on grayscale images or the luminance channel.
Erodes bright foreground regions, shrinking object boundaries and removing small white noise in binary or mask images.
Correlates the image with the selected 2-D kernel while preserving input depth.
Flips the image vertically, horizontally, or on both axes.
Blurs an image using a Gaussian kernel. Useful for smoothing and reducing high-frequency noise before edge detection.
Computes the 2 by 3 affine matrix mapping three source points to three destination points.
Computes the 3 by 3 perspective matrix mapping four source points to four destination points.
Builds a 2 by 3 affine matrix around an image-relative centre and returns matrix metadata.
Creates an 8-bit mask for pixels inside inclusive per-channel lower and upper bounds.
Applies a generated 256-entry lookup table independently to each 8-bit image channel.
Blurs an image using a median filter. Particularly effective for salt-and-pepper noise while preserving sharp boundaries.
Applies morphology operations such as erosion, dilation, opening, closing, gradient, top-hat, and black-hat using a structuring element.
Gaussian-blurs and downsamples to approximately half width and height.
Upsamples to approximately twice the width and height and smooths inserted samples.
Remaps source pixels through floating-point X/Y maps; generated identity, wave, and swirl maps are available when map metadata is not connected.
Changes the size of an image using either scale factors or explicit output dimensions.
Rotates the image by an exact 90- or 180-degree cv.rotate constant.
Applies the fixed 0.25, 0.5, 0.25 separable smoothing kernel in both directions.
Applies a fixed global threshold to a grayscale image; Otsu mode chooses the threshold automatically.
Swaps image rows and columns across the main diagonal.
Applies a 2D affine transformation such as rotation, translation, scaling, or shearing using a 2x3 matrix.
Applies a perspective transformation using a 3x3 matrix, useful for correcting viewpoint distortion or mapping a quadrilateral to a rectangle.
Compensates the second aligned image from overlap statistics using configurable per-channel or global gains clamped by the maximum-gain control.
Estimates a perspective transform from connected correspondence metadata with cv.findHomography.
Warps an image through a connected homography using the selected interpolation and border modes.
Combines two aligned images with equal-weight overlap blending.
Stitches overlapping images into a panorama by finding matches, estimating camera motion, warping, seam finding, and blending.
Finds the lowest-error vertical overlap column in JavaScript and creates a hard seam composite because OpenCV detail seam finders are not exported.
Clusters data or image pixels into K groups using the k-means algorithm. Commonly used for colour quantisation and segmentation.
Detects ArUco fiducial markers. These square binary markers are often used for camera calibration, pose estimation, and augmented reality.
Detects and decodes supported barcodes and returns type and value as plain text metadata.
Detects objects using a Haar or LBP cascade classifier loaded from a trained XML model, commonly used for faces and eyes.
Slides the second-input template over the first image, reports the best score, and marks its location.
Detects and decodes all QR codes, draws their quadrilaterals, and exposes decoded values as plain text metadata.
Detects and decodes QR codes in the image, returning the code location and decoded text when available.
Copies image pixels from the first input wherever the second-input mask is non-zero.
Combines two single-channel masks with the selected bitwise operation.
Labels components and returns each bounding box, area, and centroid as metadata.
Labels each 8-connected foreground component with a distinct integer and visualizes the labels.
Extracts contour point vectors and hierarchy from a binary image without modifying the upstream canvas.
Removes small specks and fills small holes with morphological opening and closing.
Finds and draws upright bounding rectangles around contours or point sets, usually after contour detection.
Calculates the area enclosed by each contour and can filter contours by minimum and maximum area.
Compares two contours or shapes using moment-based shape descriptors.
Approximates contour curves with fewer vertices within an epsilon distance.
Returns the perimeter of each connected contour, or closes it before measuring when requested.
Converts rotated-rectangle metadata to four corner points using the exported cv.rotatedRectPoints equivalent.
Computes the convex hull of each connected contour and returns hull points.
Computes start, end, farthest point, and depth for each contour-to-hull convexity defect.
Fits and draws a least-squares ellipse for contours with at least five points.
Fits a robust 2-D line to contour points and draws the line across the image.
Returns whether each connected contour is convex.
Computes the minimum-area rotated rectangle enclosing each contour and draws it.
Computes and draws the smallest circle enclosing each contour.
Tests a configured point against the largest contour and returns inside, outside, or signed-distance information.
Classifies and returns the polygon intersection of the minimum-area rotated rectangles derived from two connected shapes.
Maintains a floating-point running average in node state and converts it to a display image; the stock binding omits cv.accumulateWeighted.
Tracks an object using Continuously Adaptive Mean Shift, allowing the tracking window to move and resize as the object changes.
Computes dense optical flow, estimating motion vectors for most or all pixels between consecutive frames.
Computes absolute per-pixel difference between two connected frames with cv.absdiff.
Seeks a connected video to the configured timestamp and emits the decoded frame.
Tracks sparse feature points between frames using pyramidal Lucas-Kanade optical flow.
Tracks an object by iteratively shifting a window towards the densest region of a probability image, often based on colour histogram back projection.
Performs background subtraction using a Gaussian Mixture Model to separate moving foreground objects from the background.
Initializes the exported TrackerMIL binding on an ROI and updates its box across subsequent frames.
Reports dimensions, duration, current time, and playback state from a connected video source.