The algorithm atlas
Start with a problem. Follow the pixels, points, or probabilities through a method. Then open its exact TypeScript interface.
Each guide includes an annotated diagram, the steps behind the result, tuning advice and failure cases. The complete API reference includes additional methods and overloads. The image laboratory runs real WASM.
Choose individual algorithms 94 selected
Uncheck an algorithm to hide it. Category filters and the search above still apply.
No algorithms match this selection search.
Gaussian blur
Replace each pixel with a weighted average that gives nearby pixels more influence.
See how it works →FilteringBox filtering
Average a rectangular neighbourhood with equal weight at every position.
See how it works →FilteringMedian filtering
Choose the middle value of a pixel neighbourhood instead of averaging its intensities.
See how it works →FilteringBilateral filtering
Smooth nearby pixels only when their colours are also similar.
See how it works →FilteringCustom correlation kernels
Apply your own linear filter to every pixel neighbourhood.
See how it works →EdgesSobel derivatives
Measure image change along x or y while smoothing in the perpendicular direction.
See how it works →EdgesScharr derivatives
Use a specialized 3×3 derivative kernel with improved rotational symmetry.
See how it works →EdgesLaplacian
Measure the second spatial derivative, highlighting rapid changes in image intensity.
See how it works →EdgesCanny edges
Turn image gradients into thin, connected edge chains using two thresholds.
See how it works →SegmentationGlobal thresholding
Divide pixels using one intensity threshold, or choose it automatically with Otsu or the triangle method.
See how it works →SegmentationAdaptive thresholding
Compute a different intensity threshold for each local neighbourhood.
See how it works →MorphologyErosion
Shrink a bright mask by taking the minimum under a structuring element.
See how it works →MorphologyDilation
Expand a bright mask by taking the maximum under a structuring element.
See how it works →MorphologyOpening, closing and morphology
Compose erosions and dilations to remove small structures or measure their boundaries.
See how it works →MorphologyDistance transforms
For every nonzero pixel, measure the distance to the nearest zero pixel.
See how it works →SegmentationConnected components
Give every connected foreground region a distinct integer label.
See how it works →SegmentationContour tracing
Trace the boundary of each binary region as an ordered sequence of points.
See how it works →ShapePolygon approximation
Replace a dense curve with fewer vertices while limiting geometric deviation.
See how it works →ShapeConvex hulls and defects
Wrap a point set in its smallest convex boundary and measure inward deviations.
See how it works →ShapeImage and contour moments
Summarize how a region’s mass is distributed over its coordinates.
See how it works →SegmentationMarker-based watershed
Grow labelled regions across an image until competing regions meet at boundaries.
See how it works →SegmentationGrabCut
Alternate colour-model estimation and graph cuts to separate foreground from background.
See how it works →GeometryImage resizing
Sample the source on a new pixel grid at a different resolution.
See how it works →GeometryArbitrary remapping
Provide a source coordinate for every destination pixel.
See how it works →GeometryAffine transformations
Map points with a linear transform plus translation, preserving straight lines and parallelism.
See how it works →GeometryHomography and RANSAC
Estimate a projective mapping between two views of a plane, rejecting inconsistent point matches.
See how it works →GeometryPolar and log-polar warps
Re-express an image using angle and radius around a chosen centre.
See how it works →FilteringGaussian and Laplacian pyramids
A Gaussian pyramid keeps smaller, blurrier copies of an image. A Laplacian pyramid keeps the detail lost between those copies, plus the smallest copy needed to rebuild the image.
See how it works →MatchingTemplate matching
Slide a patch across an image and score how well it agrees at each location.
See how it works →MatchingPhase correlation
Estimate translation from the phase relationship between two images in the frequency domain.
See how it works →MatchingECC alignment
Refine a warp by maximizing enhanced correlation between an image and a template.
See how it works →FeaturesORB features
Detect oriented corners across an image pyramid and describe them with compact binary tests.
See how it works →FeaturesSIFT features
Detect scale-space extrema and describe local gradient distributions around them.
See how it works →FeaturesAKAZE features
Find and describe features in a nonlinear scale space that preserves important boundaries.
See how it works →FeaturesBRISK features
Describe scale-space keypoints using intensity comparisons on concentric sampling rings.
See how it works →FeaturesFAST corners
Look for a contiguous arc of brighter or darker pixels around a candidate centre.
See how it works →FeaturesShi-Tomasi and Harris corners
Find locations whose local gradients constrain motion in both image directions.
See how it works →FeaturesMaximally stable extremal regions
Find connected regions that change little over a range of intensity thresholds.
See how it works →MatchingBrute-force descriptor matching
Compare each query descriptor with every training descriptor using a chosen distance.
See how it works →MatchingFLANN nearest neighbours
Organize descriptors so nearest-neighbour queries can avoid an exhaustive scan.
See how it works →GeometryHough line detection
Let edge pixels vote for lines in a parameter space.
See how it works →GeometryHough circle detection
Use edge and gradient evidence to find circular structures.
See how it works →MotionLucas-Kanade optical flow
Follow selected points by finding the small displacement that best aligns each local patch.
See how it works →MotionFarneback dense optical flow
Estimate a displacement vector at every pixel using local polynomial approximations.
See how it works →MotionDIS dense optical flow
Combine fast patch alignment with spatial propagation and dense refinement.
See how it works →MotionDual TV-L1 optical flow
Estimate flow with a robust data term and a total-variation smoothness penalty.
See how it works →MotionMOG2 background subtraction
Learn a mixture of colour distributions at each pixel and flag observations that do not fit the background.
See how it works →MotionKNN background subtraction
Classify a pixel using how many nearby samples in its recent history agree with it.
See how it works →MotionKalman filtering
Combine a predicted state with a noisy observation using their estimated uncertainties.
See how it works →MotionCSRT tracking
Track an initialized object with correlation filters weighted by channel and spatial reliability.
See how it works →MotionKCF tracking
Use a kernelized correlation filter to locate a learned appearance in a local search region.
See how it works →MotionMIL tracking
Learn an online appearance classifier from bags of nearby positive and negative samples.
See how it works →3D visionCamera calibration
Estimate a camera’s intrinsic parameters and lens distortion from known target geometry.
See how it works →3D visionLens undistortion
Invert a calibrated lens model to map distorted observations onto an idealized camera image.
See how it works →3D visionPerspective-n-point pose
Estimate a camera-relative object pose from known 3D points and their 2D image observations.
See how it works →3D visionFundamental and essential matrices
Constrain where a point from one camera view can appear in another.
See how it works →3D visionStereo block matching
Find horizontal correspondences between rectified stereo images using local block similarity.
See how it works →3D visionSemi-global stereo matching
Aggregate stereo matching costs along multiple directions while penalizing disparity jumps.
See how it works →3D visionTriangulation
Recover a 3D point by intersecting the viewing rays implied by multiple camera observations.
See how it works →DetectionArUco markers
Detect square coded markers and recover their identities and ordered corners.
See how it works →DetectionQR code detection
Locate QR structures, rectify the code and decode its payload.
See how it works →ColourHistogram equalization
Redistribute grayscale intensities using their cumulative histogram.
See how it works →ColourCLAHE local contrast
Equalize local histograms while limiting how much a concentrated bin can amplify contrast.
See how it works →ColourColour-space conversion
Re-express pixels in a different channel order or colour representation.
See how it works →ColourColour range masks
Keep pixels whose channel values all lie within specified lower and upper bounds.
See how it works →SignalDiscrete Fourier transform
Represent a signal as a combination of spatial frequencies.
See how it works →SignalDiscrete cosine transform
Express a signal using cosine basis functions with an implicit even boundary extension.
See how it works →PhotographyNon-local means denoising
Average pixels whose surrounding patches look similar, even when they are not immediate neighbours.
See how it works →PhotographyImage inpainting
Fill a masked region by propagating nearby image structure and colour into it.
See how it works →PhotographySeamless cloning
Blend a region by solving for pixel values that fit selected image gradients and boundary conditions.
See how it works →PhotographyHDR merging and tone mapping
Combine exposure information or fuse well-exposed regions, then map the result into a displayable range.
See how it works →FilteringGuided filtering
Use a guidance image to decide how a local linear model should smooth another image.
See how it works →MorphologySkeleton thinning
Iteratively remove boundary pixels while trying to preserve the connectivity of a binary shape.
See how it works →SegmentationSLIC, SEEDS and LSC superpixels
Group nearby pixels into small coherent regions to reduce the cost of later reasoning.
See how it works →Machine learningK-means clustering
Partition feature vectors around a fixed number of learned centres.
See how it works →Machine learningSupport vector machines
Learn a decision boundary that balances class separation against margin violations.
See how it works →Machine learningK-nearest-neighbour classification
Predict a sample from the labels or values of nearby training examples.
See how it works →Machine learningRandom forests
Combine decisions from trees that split feature space into regions.
See how it works →Machine learningPrincipal component analysis
Find orthogonal directions that explain the greatest variance in centred data.
See how it works →Deep learningNeural-network inference
Execute a trained model by passing tensors through its computation graph.
See how it works →DetectionNon-maximum suppression
Reduce overlapping detector proposals by retaining the most useful scored boxes.
See how it works →Deep learningLearned super-resolution
Use a trained network to infer a higher-resolution image from a lower-resolution input.
See how it works →TextTesseract OCR
Recognize text from image regions using supplied language data and a chosen page segmentation mode.
See how it works →TextText-region detection
Find candidate text regions before character recognition.
See how it works →SimilarityPerceptual image hashes
Compress selected visual statistics into a small representation for image comparison.
See how it works →SimilarityPSNR and SSIM quality metrics
Measure selected differences or quality cues between images, or estimate quality without a reference.
See how it works →DetectionVisual saliency
Estimate conspicuous regions or candidate object windows from appearance or motion.
See how it works →SegmentationAlpha matting
Estimate fractional foreground coverage using an image and a trimap of known foreground, background and unknown pixels.
See how it works →ColourWhite balance
Estimate channel gains or mappings that reduce an image’s illumination colour cast.
See how it works →PhotographyPanorama stitching
Combine overlapping images through matching, camera estimation, warping and blending.
See how it works →3D visionIterative closest point
Refine the relative pose of two 3D surfaces by alternating correspondences and alignment.
See how it works →3D visionStructured-light decoding
Recover projector-camera correspondences from a sequence of known projected patterns.
See how it works →SignalPhase unwrapping
Recover a continuous phase field from measurements wrapped into a fixed angular interval.
See how it works →FilteringRetina-inspired processing
Apply a bio-inspired model with separate detail/colour and motion-sensitive processing pathways.
See how it works →No matches. Try a shorter search or enable more categories and algorithms.