Expand description
High-performance computer vision algorithms for real-time applications
Provides implementations of:
- Lucas-Kanade optical flow
- Shi-Tomasi feature detection
- Optimized image processing pipelines
Designed to be compatible with WebAssembly (Wasm).
Structs§
- Corner
- A detected corner: its pixel position and its Shi-Tomasi score, the minimum eigenvalue of the mean 3x3 structure tensor.
- Detector
Capacity - Upper bounds for the work a detector context will see, used to allocate
every buffer up front with
DetectorContext::with_capacityorDetectorContext::reserve. - Detector
Context - Reusable owner of every buffer the Shi-Tomasi detector touches: gradient planes, structure-tensor row buffers, the score plane, the candidate list, the spacing grid and the result vector.
- Float
Detector Context - Shi-Tomasi corner detector for f32 images in physical units, e.g. thermal
frames in °C. The counterpart of
DetectorContext, owning every buffer it touches. - Float
Image View - A borrowed, validated, row-major f32 image, e.g. a thermal frame in °C.
- Float
Tracker Context - Pyramidal Lucas-Kanade tracker for f32 images in physical units, e.g.
thermal frames in °C. The counterpart of
TrackerContext, owning both frame pyramids and every buffer the tracking hot path touches. - Grid
- Detection grid of
good_features_to_track_gridanddetect_grid: the image is split intocolsxrowsequal cells, and each cell keeps up tomax_per_cellcorners, counting existing points. - Score
Threshold - Corner score threshold of the f32 detector.
- Track
Options - Options of a tracking call beyond
TrackParams, forTrackerContext::track_withandTrackerContext::track_fb_withand theirFloatTrackerContextcounterparts. The default reproducestrackandtrack_fb. - Track
Params - Lucas-Kanade parameters of a tracking call.
- Track
Result - Per-point result of
calc_optical_flow_ex. - Tracker
Capacity - Upper bounds for the work a tracker context will see, used to allocate
every buffer up front with
with_capacityorreserveofTrackerContextandFloatTrackerContext. - Tracker
Context - Reusable owner of every buffer the tracking hot path touches: both frame pyramids, the Lucas-Kanade scratch, the result vector and the forward-backward intermediates.
Enums§
- Float
Image Error - Why
FloatImageView::newrejected an image. - Track
Kernel - Arithmetic of the 8-bit tracker’s window kernels, see
TrackOptions::kernel. - Track
Status - Why a feature point ended up where it did after tracking.
Constants§
- CONVERGENCE_
EPSILON - Per-level convergence threshold, in pixels of the current pyramid level.
- DEFAULT_
FB_ THRESHOLD - Default forward-backward round-trip threshold (pixels) for
calc_optical_flow_fb. - DEFAULT_
MIN_ EIGEN_ THRESHOLD - Default
TrackParams::min_eigen_thresholdof the 8-bit tracker.
Functions§
- build_
pyramid - Builds a pyramid of images where each successive layer is half as large in width and height
- build_
pyramid_ into - Builds the pyramid into an existing buffer, reusing each level’s storage when its dimensions are unchanged.
- calc_
optical_ flow_ ex - Compute optical flow using the pyramidal Lucas-Kanade method, returning a
per-point
TrackResultwith status and photometric error. - calc_
optical_ flow_ fb - Track points prev->next, then re-track the results next->prev, and flag any
point whose round-trip lands further than
fb_thresholdpixels from where it started asTrackStatus::FbInconsistent. - good_
features_ to_ track - Finds good features points using the Shi-Tomasi algorithm
- good_
features_ to_ track_ grid - Finds good feature points with uniform frame coverage by detecting per grid cell, while respecting features that are already being tracked.
Type Aliases§
- Float
Pyramid Level - One level of an f32 image pyramid, as built by
FloatTrackerContext.