Expand description
AI-ready CPU image processing and vision algorithms.
Algorithms are feature-gated by area. GPU implementations belong in an explicit backend and must not introduce hidden device transfers.
Structs§
- Absolute
Pose - Object-to-camera pose
X_cam = R X_obj + tused by absolute orientation (PnP). - Adaptive
Background Model - Stateful single-Gaussian grayscale background model.
- Affine
Transform - A source-to-destination 2D affine transform.
- Area
Resize U8Plan - Reusable weighted-span plan for packed
u8area resize. - Background
Model Options - Adaptive Gaussian background-model controls.
- Background
Update - Output of one background-model update.
- Bilinear
Resize U8Plan - Reusable source coordinates and fixed-point coefficients for
u8bilinear resize. - Binary
Mask - Validated binary mask (
0background,1foreground). - Bounding
Box2 - Axis-aligned bounding box using half-open
(min, max)coordinates. - Camera
Matrix3 - Calibrated pinhole intrinsic matrix and its analytic inverse.
- Canny
Options - Validated Canny thresholds and gradient settings.
- Canny
Result - Edge map and numerical stages produced by Canny.
- Canny
Workspace - Reusable caller-owned storage for the allocation-light Canny path.
- Component
Stats - Per-component statistics.
- Confidence
Map - Dense confidence values constrained to
[0, 1]. - Connected
Components - Connected-component labeling output.
- Contour
- One closed polygonal contour on pixel-grid corner coordinates.
- Corner
Selection Options - Shared response thresholding and spatial suppression options.
- Dense
Flow Options - Integer block-matching controls for dense grayscale optical flow.
- Depth
Map - Metric or relative dense depth map. Non-positive and non-finite values are invalid.
- Descriptor
Buffer - Row-major descriptor matrix with a fixed width and explicit scalar kind.
- Detection
- One scored detection used by class-aware post-processing.
- Distance
Transform Workspace - Reusable host scratch storage for the unit-spacing exact distance transform.
- Essential3
- A calibrated two-view epipolar constraint matrix.
- Exposure
Fusion Options - Well-exposedness fusion controls.
- Fast
Options - FAST detector configuration for the standard 9-of-16 radius-three circle.
- Feature
Match - One descriptor correspondence from a query feature to a train feature.
- Feature
Set2 - Keypoints paired one-to-one with descriptor rows.
- Flow
Field - Dense
(dx, dy)optical-flow field in pixel units. - Fundamental3
- An uncalibrated two-view epipolar constraint matrix.
- Gaussian
Blur U8Workspace - Reusable scratch storage and fixed-point kernel cache for
gaussian_blur_u8_into. - Geometric
Estimate - A geometric model paired with one inlier decision and residual per input row.
- Grid
Selection Options - Controls deterministic spatial distribution of candidate keypoints.
- Harris
Options - Harris detector configuration.
- Homography3
- A pixel-to-pixel planar projective transform.
- Integral
Image - Summed-area table with a zero top row and left column.
- Kernel1D
- Validated one-dimensional correlation kernel.
- Kernel2D
- Validated two-dimensional correlation kernel.
- Keypoint2
- One scale-space image keypoint in pixel coordinates.
- Label
Image - Connected-component label image (
0is background). - Letterbox
Transform - Mapping between a source image and its letterboxed output.
- Lucas
Kanade Options - Configuration for sparse Lucas–Kanade tracking.
- MaskRle
- Alternating zero/one run lengths, always beginning with a zero run.
- Match
Options - Filtering applied to brute-force descriptor correspondences.
- Memory
Video Source - Deterministic in-memory source used for adapter conformance and replay.
- Monocular
Odometry Estimate - Scale-ambiguous monocular odometry result.
- Multi
Object Tracker - Deterministic same-class greedy IoU multi-object tracker.
- Multi
Object Tracker Options - IoU tracker controls.
- Nearest
Resize U8Plan - Reusable source-coordinate plan for packed
u8nearest-neighbor resize. - Object
Image Correspondence - One ordered object-to-image correspondence for absolute pose estimation.
- Object
Track - One deterministic detection track.
- OrbOptions
- Multi-scale ORB detector and descriptor configuration.
- Padding
- Padding applied around an image.
- Panorama
- Pairwise panorama and its integer world-coordinate origin.
- Panorama
Options - Bounded pairwise panorama settings.
- Perspective
Transform - A source-to-destination projective 2D transform.
- Point
Correspondence2 - One ordered pixel correspondence from a source image to a target image.
- Point
Map - Dense per-pixel XYZ point map. Non-finite triples represent invalid points.
- Rect
Morphology Workspace - Reusable scratch storage for packed grayscale rectangular morphology.
- Relative
Pose - Target-camera pose expressed in the source-camera coordinate frame.
- Relative
Pose Estimate - Essential-matrix pose disambiguation and per-correspondence triangulation.
- Rgbd
Odometry Estimate - Metric previous-camera to current-camera odometry result.
- Rgbd
Odometry Options - Depth filtering and PnP RANSAC controls for metric RGB-D odometry.
- Robust
Estimation Options - Deterministic robust-model sampling and inlier classification settings.
- Robust
Track Options - Forward/backward consistency settings layered over pyramidal LK.
- Robust
Tracks - One target coordinate, validity decision, and round-trip error per source point.
- Scored
Index - Index and possibly updated score returned by Soft-NMS.
- ShiTomasi
Options - Shi–Tomasi minimum-eigenvalue detector configuration.
- Stereo
BmOptions - Block-matching stereo options.
- Stereo
Rectify Maps - Remap grids produced by stereo rectification for explicit
warp::remap. - Stereo
Rig - Calibrated two-camera stereo geometry.
- Structuring
Element - A validated binary neighborhood mask and anchor.
- Tracked
Points - Result of sparse point tracking between two frames.
- Triangulated
Point - One two-view triangulation with cheirality and reprojection diagnostics.
- Video
Frame - Timestamped owned video frame.
Enums§
- Adaptive
Threshold Method - Adaptive neighborhood statistic.
- Border
Mode - Out-of-bounds sampling behavior for CPU image operations.
- Connectivity
- Pixel connectivity used by binary-mask algorithms.
- Descriptor
Kind - Scalar representation used by a descriptor matrix.
- Interpolation
- Sampling filter used by image resampling and geometric warps.
- Morphology
Operation - Composite morphology operation.
- Morphology
Shape - Built-in structuring-element geometry.
- OrbScore
Type - Response used to rank ORB keypoints.
- RleOrder
- Linearization order used by run-length encoded masks.
- Soft
NmsMethod - Soft-NMS score-decay strategy.
- Threshold
Type - Point-wise threshold transformation.
- Track
State - Track lifecycle state.
- Vision
Error - Errors raised by image and vision algorithms.
Constants§
- INVALID_
DISPARITY - Invalid disparity sentinel written by
stereo_block_match.
Traits§
- Pixel
Component - Scalar component supported by generic CPU image kernels.
- Video
Frame Source - Pull-based video source implemented by optional codec/camera adapters.
Functions§
- adaptive_
threshold - Applies adaptive binary thresholding to an 8-bit grayscale image.
- approximate_
polygon - Simplifies a closed contour with Ramer–Douglas–Peucker approximation.
- batched_
nms - Class-aware greedy NMS over detection records.
- bilateral_
filter - Applies an edge-preserving bilateral filter.
- box_
blur - Applies a normalized rectangular box filter.
- build_
gaussian_ pyramid - Builds a packed Gaussian pyramid including the input as level zero.
- canny
- Finds edges in a single-channel u8 image.
- canny_
into - Finds edges into caller-owned output using reusable CPU workspace.
- canny_
with_ intermediates - Runs Canny and retains gradient, magnitude, and suppression stages.
- clahe
- Applies contrast-limited adaptive histogram equalization to grayscale u8.
- connected_
components - Labels foreground components and computes bounding boxes and centroids.
- connected_
components_ u8 - Labels connected non-zero pixels from packed
u8mask storage. - convolve2d
- Applies true convolution by reversing the supplied kernel around its anchor.
- crop
- Copies a checked rectangular region into a packed image.
- decode_
rle - Decodes a run-length mask and validates its total length.
- dense_
flow_ block_ match - Computes a dense integer flow field with deterministic local block matching.
- depth_
map_ to_ point_ cloud - Unprojects a depth map with a calibrated camera into an XYZ point cloud.
- depth_
tensor_ to_ depth_ map - Converts a host depth tensor into a
DepthMap. - detect_
and_ describe_ orb - Detects oriented multi-scale keypoints and computes 256-bit rotated BRIEF descriptors.
- detect_
fast - Detects FAST-9/16 corners in scan order, matching OpenCV’s radius-three ROI.
- detect_
harris - Detects Harris corners and returns strongest-first keypoints.
- detect_
shi_ tomasi - Detects Shi–Tomasi corners and returns strongest-first keypoints.
- detection_
tensor_ to_ detections - Decodes axis-aligned detections from an
[N,6]tensor ofx0,y0,x1,y1,score,class. - dilate
- Dilates each channel independently.
- dilate_
rect_ u8 - Dilates a grayscale
u8image with a rectangular element in linear time. - dilate_
rect_ u8_ into - Dilates into caller-owned packed output using reusable scratch storage.
- disparity_
to_ depth - Converts horizontal disparity to metric depth with
Z = f * B / d. - disparity_
to_ xyz - Reprojects disparity into left-camera XYZ using rectified intrinsics.
- distance_
transform_ edt - Computes the exact Euclidean distance from every foreground pixel to the nearest background pixel using unit pixel spacing.
- distance_
transform_ edt_ into - Computes the exact unit-spacing Euclidean distance transform into a reusable slice.
- distance_
transform_ edt_ u8_ into - Computes a unit-spacing exact distance transform from a packed
u8mask. - distance_
transform_ edt_ with_ spacing - Computes the exact Euclidean distance transform with physical pixel spacing.
- encode_
rle - Encodes a binary mask into alternating runs.
- equalize_
histogram - Equalizes an 8-bit grayscale histogram.
- erode
- Erodes each channel independently.
- erode_
rect_ u8 - Erodes a grayscale
u8image with a rectangular element in linear time. - erode_
rect_ u8_ into - Erodes into caller-owned packed output using reusable scratch storage.
- estimate_
and_ stitch_ panorama - Estimates a source-to-target homography and stitches the pair.
- estimate_
essential - Estimates an essential matrix after normalizing pixels with both cameras.
- estimate_
essential_ ransac - Robustly estimates an essential matrix in normalized-camera coordinates.
- estimate_
fundamental - Estimates a fundamental matrix from at least eight correspondences.
- estimate_
fundamental_ ransac - Robustly estimates a fundamental matrix using deterministic eight-point RANSAC.
- estimate_
homography - Estimates a homography from at least four correspondences using normalized DLT.
- estimate_
homography_ ransac - Robustly estimates a homography using deterministic four-point RANSAC.
- estimate_
monocular_ odometry - Estimates calibrated monocular motion with essential RANSAC and cheirality.
- estimate_
rgbd_ odometry - Estimates metric motion from source depth and source-to-target pixel tracks.
- filter2d
- Applies OpenCV-style correlation and converts the result back to the input dtype.
- filter2d_
f32 - Applies OpenCV-style correlation and preserves signed/fractional results as
f32. - find_
contours - Extracts oriented boundary loops, including hole contours.
- fuse_
exposures - Fuses aligned RGB exposures with normalized per-pixel well-exposedness.
- gaussian_
blur - Applies a separable Gaussian blur with explicit odd sizes and standard deviations.
- gaussian_
blur_ u8 - Applies a specialized 3×3, 5×5, or 7×7 Gaussian blur to interleaved
u8input. - gaussian_
blur_ u8_ into - Applies the specialized
u8Gaussian blur into caller-owned packed output and workspace. - gray_
to_ rgb - Replicates a gray channel into RGB.
- gray_
world_ white_ balance - Applies deterministic gray-world white balance to an RGB image.
- harris_
response - Computes an unnormalized Harris structure-tensor response image.
- histogram
- Computes a configurable one-channel histogram, optionally through a mask.
- histogram_
u8 - Computes the exact 256-bin histogram of an 8-bit grayscale image.
- integral_
image - Computes a summed-area table for one selected channel.
- laplacian
- Computes a Laplacian response as signed
f32values. - letterbox
- Aspect-preserving resize followed by centered constant padding.
- match_
descriptors - Matches each query descriptor to its nearest train descriptor.
- median_
blur - Applies a per-channel median filter with an odd square aperture.
- morphology_
ex - Applies a composite morphology operation.
- morphology_
rect_ u8 - Applies composite grayscale
u8morphology using the rectangular fast path. - morphology_
rect_ u8_ into - Applies composite rectangular morphology into caller-owned packed output.
- nms
- Greedy non-maximum suppression. Returned indices are score-descending.
- normalize
- Converts packed scalar values to
f32, then appliesvalue * scale, mean subtraction, and per-channel standard-deviation normalization. - normalize_
into - Normalizes interleaved pixels into caller-owned
f32storage. - otsu_
threshold_ u8 - Selects an Otsu threshold for an 8-bit grayscale image and applies it.
- otsu_
threshold_ u16 - Selects an Otsu threshold for a 16-bit grayscale image and applies it.
- pack_
chw - Packs and normalizes an interleaved image into planar CHW storage.
- pack_
chw_ into - Packs and normalizes interleaved pixels into a reusable planar CHW slice.
- pad
- Pads an image with a constant pixel value.
- planar_
f32_ to_ nchw - Packs a planar CHW
f32image into contiguous NCHW[1,C,H,W]. - point_
map_ to_ point_ cloud - Flattens valid point-map pixels into an XYZ cloud, optionally filtering by confidence.
- project_
object_ point - Projects an object point with an absolute pose into pixel coordinates.
- pyr_
down - Reduces each dimension by approximately two using the canonical 5×5 kernel.
- pyr_up
- Doubles each dimension using zero insertion and the canonical 5×5 kernel.
- recover_
relative_ pose - Recovers the essential-matrix pose with the most positive-depth points.
- remap
- Samples an image at absolute coordinates supplied by two single-channel maps.
- resize
- Resizes an interleaved image while preserving semantic metadata.
- resize_
into - Resizes into caller-owned storage without allocating.
- resize_
pack_ chw - Fuses bilinear RGB resize, normalization, and CHW packing without an intermediate image.
- resize_
pack_ chw_ into - Fuses bilinear RGB resize, normalization, and CHW packing into caller-owned storage.
- resize_
rgb_ to_ gray - Fuses bilinear RGB resize and BT.601 grayscale conversion without an intermediate RGB image.
- resize_
rgb_ to_ gray_ into - Fuses bilinear RGB resize and BT.601 grayscale conversion into caller-owned storage.
- rgb_
to_ gray - Converts RGB
u8pixels to BT.601 luma using fixed-point coefficients. - rgb_
to_ gray_ into - Converts RGB
u8pixels into caller-owned gray storage without allocating. - rgb_
to_ hsv - Converts RGB
u8to OpenCV-style HSV (Hin0..=179,S/Vin0..=255). - rgb_
u8_ to_ nchw_ f32 - Letterboxes an RGB
u8image and packs it as contiguous NCHWf32[1,3,H,W]. - scharr
- Computes a 3×3 Scharr first derivative as signed
f32values. - score_
tensor_ to_ binary_ mask - Converts a host score tensor into a binary mask via threshold.
- select_
keypoints_ grid - Retains the strongest keypoints in each image cell.
- separable_
filter - Applies horizontal and vertical kernels using an
f64intermediate buffer. - separable_
filter_ f32 - Applies separable kernels and preserves signed/fractional output as
f32. - shi_
tomasi_ response - Computes an unnormalized Shi–Tomasi minimum-eigenvalue response image.
- sobel
- Computes a Sobel derivative as signed
f32values. - sobel_
3x3_ u8 - Computes a first-order 3x3 Sobel derivative directly into signed
f32output. - sobel_
3x3_ u8_ into - Computes a first-order 3x3 Sobel derivative into caller-owned packed output.
- sobel_
abs_ 3x3_ u8 - Computes an exact absolute first-order 3x3 Sobel response as saturated
u8. - sobel_
abs_ 3x3_ u8_ into - Computes an exact absolute first-order 3x3 Sobel response into packed output.
- sobel_
l1_ magnitude_ u8 - Computes exact 3×3 Sobel L1 magnitude (
|Gx| + |Gy|) for grayscaleu8. - sobel_
l1_ magnitude_ u8_ into - Computes exact fused 3×3 Sobel L1 magnitude into caller-owned packed output.
- sobel_
threshold_ 3x3_ u8 - Computes a binary edge mask from absolute 3x3 Sobel response.
- sobel_
threshold_ 3x3_ u8_ into - Computes a binary absolute-Sobel edge mask into caller-owned packed output.
- soft_
nms - Soft non-maximum suppression with deterministic score ordering.
- solve_
pnp - Estimates an object-to-camera pose from at least four correspondences.
- solve_
pnp_ ransac - Robust PnP using deterministic six-point RANSAC and inlier refinement.
- spatial_
gradient_ u8 - Computes exact 3×3 Sobel X/Y gradients together for grayscale
u8input. - spatial_
gradient_ u8_ into - Computes exact paired 3×3 Sobel gradients into caller-owned packed output.
- stereo_
block_ match - Dense SAD block matching on already-rectified grayscale stereo images.
- stereo_
rectify - Builds left/right absolute remap grids that make epipolar lines horizontal.
- stitch_
panorama_ pair - Warps
sourceintotargetcoordinates and feather-blends their overlap. - swap_
red_ blue - Swaps the red and blue channels of a three-channel image.
- threshold
- Applies a fixed threshold independently to every component.
- track_
points_ forward_ backward - Tracks points in both directions and rejects inconsistent round trips.
- track_
points_ lucas_ kanade - Tracks sparse points from
previoustonextwith pyramidal Lucas–Kanade. - triangulate_
correspondence - Triangulates one calibrated correspondence for a known relative pose.
- warp_
affine - Warps an image with a source-to-destination affine transform.
- warp_
perspective - Warps an image with a source-to-destination projective transform.
Type Aliases§
- Vision
Result - Result type for image and vision operations.