Expand description
Qualia Vision — product surface for visual intelligence + biosense.
§Library home (MIG-V2)
Pure algorithms live in
qualia_core_db::specialized_libs::computer_vision (cv, ops, sr,
bio, embeddings, spatial kernels, gpu dispatch). This crate
re-exports those kernels and owns product layers: biosense consent,
recipes, weights, capability registry, semantic quins, media store.
Plans: native-visual-intelligence-and-generative-3d.md,
vision-10d-browser-excellence-programme-2026.md §9-B.
§Design rules
- Hot path is caller-buffered, no hidden heap in
infer. - Model outputs are epistemic observations, not ground truth.
- Dense pixels / biometric templates never in NQuins.
- No Python; no OpenCV product link.
Re-exports§
pub use ade20k_taxonomy::ade20k_category_count;pub use ade20k_taxonomy::lookup_ade20k_class_by_hash;pub use ade20k_taxonomy::lookup_ade20k_class_by_id;pub use ade20k_taxonomy::q_hash_ade20k_class;pub use ade20k_taxonomy::ADE20K_150_CLASSES;pub use cifar_taxonomy::lookup_cifar100_class_by_id;pub use cifar_taxonomy::lookup_cifar10_class_by_id;pub use cifar_taxonomy::lookup_cifar_class_by_hash;pub use cifar_taxonomy::q_hash_cifar_class;pub use cifar_taxonomy::CIFAR_100_CLASSES;pub use cifar_taxonomy::CIFAR_10_CLASSES;pub use cityscapes_taxonomy::cityscapes_category_count;pub use cityscapes_taxonomy::lookup_cityscapes_class_by_hash;pub use cityscapes_taxonomy::lookup_cityscapes_class_by_id;pub use cityscapes_taxonomy::q_hash_cityscapes_class;pub use cityscapes_taxonomy::CITYSCAPES_CLASSES;pub use coco_taxonomy::coco_category_count;pub use coco_taxonomy::lookup_coco_class_by_hash;pub use coco_taxonomy::lookup_coco_class_by_id;pub use coco_taxonomy::q_hash_coco_class;pub use coco_taxonomy::COCO_80_CLASSES;pub use kitti_taxonomy::kitti_category_count;pub use kitti_taxonomy::lookup_kitti_class_by_hash;pub use kitti_taxonomy::lookup_kitti_class_by_id;pub use kitti_taxonomy::q_hash_kitti_class;pub use kitti_taxonomy::KITTI_8_CLASSES;pub use openimages_taxonomy::lookup_openimages_class_by_hash;pub use openimages_taxonomy::lookup_openimages_class_by_mid;pub use openimages_taxonomy::openimages_category_count;pub use openimages_taxonomy::q_hash_openimages_class;pub use openimages_taxonomy::OpenImagesClassEntry;pub use openimages_taxonomy::OPENIMAGES_600_CLASSES;pub use pascal_voc_taxonomy::lookup_pascal_voc_class_by_hash;pub use pascal_voc_taxonomy::lookup_pascal_voc_class_by_id;pub use pascal_voc_taxonomy::pascal_voc_category_count;pub use pascal_voc_taxonomy::q_hash_pascal_voc_class;pub use pascal_voc_taxonomy::PASCAL_VOC_20_CLASSES;pub use vggface2_taxonomy::format_vggface2_subject_id;pub use vggface2_taxonomy::lookup_vggface2_subject_hash;pub use vggface2_taxonomy::q_hash_vggface2_subject;pub use vggface2_taxonomy::vggface2_identity_count;pub use vggface2_taxonomy::VGGFace2Pose;pub use vggface2_taxonomy::VGGFACE2_IDENTITY_COUNT;pub use biosense::blendshape_affect_proposal;pub use biosense::blendshape_affect_proposal;pub use biosense::cctv_stages_allowed;pub use biosense::colour_evm_yiq;pub use biosense::colour_evm_yiq;pub use biosense::design_bandpass_iir;pub use biosense::energy_ms;pub use biosense::ensemble_hr;pub use biosense::ensemble_hr;pub use biosense::ensemble_respiration;pub use biosense::ensemble_respiration;pub use biosense::eulerian_color_magnify;pub use biosense::eulerian_color_magnify;pub use biosense::eulerian_color_magnify_consented;pub use biosense::eulerian_color_magnify_ex;pub use biosense::eulerian_motion_magnify;pub use biosense::eulerian_motion_magnify;pub use biosense::eulerian_motion_magnify_consented;pub use biosense::eulerian_motion_magnify_ex;pub use biosense::evaluate_challenge_pad;pub use biosense::evaluate_landmark_pad;pub use biosense::evaluate_pad_from_mediapipe_trace;pub use biosense::evaluate_pad_from_mediapipe_trace;pub use biosense::evaluate_processing_act;pub use biosense::evaluate_processing_act;pub use biosense::evaluate_profile_asymmetry;pub use biosense::evm_snr_gate;pub use biosense::evm_snr_gate;pub use biosense::face_roi_center;pub use biosense::face_roi_center;pub use biosense::frame_blur_score;pub use biosense::frame_blur_score;pub use biosense::gaussian_pyramid_build;pub use biosense::gaussian_pyramid_build;pub use biosense::issue_challenge;pub use biosense::issue_rotation_challenge;pub use biosense::landmarks_from_normalized;pub use biosense::landmarks_from_normalized;pub use biosense::laplacian_pyramid_build;pub use biosense::laplacian_pyramid_build;pub use biosense::motion_energy;pub use biosense::motion_energy;pub use biosense::pack_landmark_frame;pub use biosense::pack_landmark_frame;pub use biosense::profile_asymmetry_ratio;pub use biosense::profile_asymmetry_ratio;pub use biosense::pyramid_reconstruct;pub use biosense::pyramid_reconstruct;pub use biosense::reject_low_quality;pub use biosense::reject_low_quality;pub use biosense::respiration_from_motion;pub use biosense::respiration_from_motion;pub use biosense::respiration_from_rppg_harmonic;pub use biosense::respiration_from_rppg_harmonic;pub use biosense::respiration_rate_from_motion_trace;pub use biosense::respiration_rate_from_motion_trace;pub use biosense::roi_mean_rgb;pub use biosense::spectral_hr_peak;pub use biosense::spectral_hr_peak;pub use biosense::template_hash_from_roi;pub use biosense::templates_match;pub use biosense::temporal_bandpass_iir;pub use biosense::temporal_bandpass_iir;pub use biosense::temporal_bandpass_series;pub use biosense::valence_arousal_proposal;pub use biosense::valence_arousal_proposal;pub use biosense::AffectProposal;pub use biosense::BandpassIir;pub use biosense::BandpassState;pub use biosense::BiometricTemplate;pub use biosense::BiosenseConsent;pub use biosense::BiosensePurpose;pub use biosense::BlendshapeProxy;pub use biosense::CameraStreamAttestation;pub use biosense::ChallengeKind;pub use biosense::ColourEvmParams;pub use biosense::EvmRefuse;pub use biosense::EvmSnrVerdict;pub use biosense::FaceRoi;pub use biosense::HeadPose;pub use biosense::HrEstimate;pub use biosense::Landmark2;pub use biosense::LandmarkBufferLayout;pub use biosense::LandmarkFrame;pub use biosense::MeshBlendProxies;pub use biosense::MeshFrameSignals;pub use biosense::MotionEvmParams;pub use biosense::PadLandmarkId;pub use biosense::PadReason;pub use biosense::PadResult;pub use biosense::PadThresholds;pub use biosense::ParSample;pub use biosense::ParVerdict;pub use biosense::PolicyDecision;pub use biosense::ProcessingAct;pub use biosense::PyramidLevelMeta;pub use biosense::QualityReject;pub use biosense::RrEstimate;pub use biosense::TemporalWindow;pub use biosense::DEFAULT_EVM_MIN_SNR;pub use biosense::DEFAULT_PAR_TAU;pub use biosense::MAX_PYRAMID_LEVELS;pub use biosense::MEDIAPIPE_FACE_MESH_COUNT;pub use biosense::RR_F_HI_HZ;pub use biosense::RR_F_LO_HZ;pub use biosense::RR_MIN_SNR_DEFAULT;pub use capability::all_capabilities;pub use capability::by_id;pub use capability::count_by_status;pub use capability::CapabilityEntry;pub use capability::CapabilityStatus;pub use classifier::fit_two_class_centroids;pub use classifier::LinearHead;pub use classifier::LinearProbeVision;pub use detector::sample_frame_indices;pub use detector::GridMultiObjectDetector;pub use detector::MAX_GRID;pub use generator::compile_generation_receipt_quins;pub use generator::CancelFlag;pub use generator::GenerationReceipt;pub use generator::NativeImageGenerator;pub use generator::CTX_GENERATION;pub use generator::GENERATOR_MODEL_ID;pub use generator::P_GENERATED_IMAGE;pub use generator::P_GEN_PROMPT;pub use generator::P_GEN_SEED;pub use media_store::MediaRecord;pub use media_store::MediaStore;pub use media_store::RetentionClass;pub use metrics::evaluate_real_held_out;pub use metrics::evaluate_synthetic;pub use metrics::mean_best_iou;pub use metrics::MetricsReport;pub use overlay::box_css_percent;pub use overlay::box_pixel_bounds;pub use overlay::compose_rgb_overlay_rgba8;pub use overlay::draw_boxes_rgba8;pub use overlay::encode_bmp_rgba8;pub use preprocess::iou_u16;pub use preprocess::letterbox_rgb8;pub use preprocess::letterbox_workspace_bytes;pub use preprocess::nms_class_agnostic;pub use preprocess::normalize_rgb8_to_f32_chw;pub use preprocess::resize_nearest_rgb8;pub use recipes::challenge_pad_from_landmark_frames;pub use recipes::challenge_pad_from_mesh_trace;pub use recipes::challenge_pad_from_mesh_trace;pub use recipes::compile_hr_observation_quins;pub use recipes::respiration_monitor;pub use recipes::respiration_monitor;pub use recipes::respiration_monitor_motion_only;pub use recipes::self_monitor_pulse;pub use recipes::self_monitor_pulse;pub use recipes::self_monitor_pulse_evm;pub use recipes::self_monitor_pulse_evm;pub use recipes::PulseAbstain;pub use recipes::PulseEvmResult;pub use semantic::bbox_quin;pub use semantic::class_proposal_quin;pub use semantic::compile_observation_quins;pub use semantic::compile_observation_quins_full;pub use semantic::human_correct_quin;pub use semantic::human_reject_quin;pub use semantic::media_digest;pub use semantic::model_digest_quin;pub use semantic::observation_quin;pub use semantic::pack_bbox_u64;pub use semantic::q_hash;pub use semantic::query_by_frame_range;pub use semantic::query_by_model;pub use semantic::query_instances_in_region;pub use semantic::track_quin;pub use semantic::unpack_bbox_u64;pub use semantic::MediaDigest;pub use semantic::VisionQuin;pub use semantic::CTX_HUMAN_ATTESTATION;pub use semantic::CTX_VISION;pub use semantic::MAX_OBS_QUINS;pub use semantic::P_HAS_BBOX;pub use semantic::P_HAS_TRACK;pub use semantic::P_HUMAN_CORRECTS;pub use semantic::P_HUMAN_REJECTS;pub use semantic::P_MODEL_DIGEST;pub use semantic::P_PROPOSES_CLASS;pub use semantic::P_VISUAL_OBSERVATION;pub use spatial::detections_to_node_hints;pub use spatial::image_to_heightfield_mesh;pub use spatial::pack_geometry_export_for_10d;pub use spatial::GeometryFor10d;pub use spatial::ImageTo3dReceipt;pub use synthetic::generate_scene_rgb8;pub use synthetic::match_accuracy;pub use synthetic::sample_id;pub use synthetic::train_test_disjoint;pub use synthetic::DatasetSplit;pub use synthetic::SyntheticSampleId;pub use synthetic::TEST_SEED_BASE;pub use synthetic::TRAIN_SEED_BASE;pub use tracker::BoundedTracker;pub use tracker::FLAG_TRACK_OVERFLOW;pub use tracker::MAX_TRACKS;pub use weights::load_litert_file;pub use weights::probe_onnx_asset;pub use weights::resolve_vision_asset;pub use weights::resolve_vision_asset;pub use weights::sface_infer_rgb8;pub use weights::validate_litert_bytes;pub use weights::yunet_infer_rgb8;pub use weights::AssetLicenceTag;pub use weights::LiteRtFileMeta;pub use weights::LiteRtLoadError;pub use weights::OnnxSessionError;pub use weights::ProductionVision;pub use weights::ResolvedAsset;pub use weights::VisionAssetError;pub use weights::VisionAssetId;pub use weights::VisionBackendKind;pub use weights::VisionWeightBundle;pub use weights::LITER_TFLITE_MAGIC;pub use weights::QVWT_MAGIC;pub use weights::QVWT_VERSION;pub use cpu_reference::CpuReferenceVision;
Modules§
- ade20k_
taxonomy - MIT ADE20K 150-Category Scene Parsing Taxonomy & Semantic Resolver.
- anonymize_
tag_ map - Redact known PHI tag keys in a simple DICOM attribute map.
- bicubic_
u8 - Bicubic (Keys a=-0.5) upscale RGB packed u8 by integer scale 2|3|4.
- bilateral_
denoise_ u8 - Simplified bilateral denoise Gray8 (small window).
- bilinear_
u8 - Bilinear upscale RGB packed u8 by integer scale 2|3|4.
- bio
- Bio / medical CV algorithms — specialized_libs::computer_vision::bio.
- biosense
- Biosensing excellence: consent, quality, rPPG, magnification, affect, policy. Biometrics/mindware = selfhood; fail closed without consent.
- box_
blur_ u8 - Separable box blur on Gray8 (caller-buffered).
- brief_
desc_ u8 - Tiny BRIEF-like descriptor (32 bytes) around keypoints.
- canny_
u8 - Simplified Canny: Sobel mag + dual threshold (no full hysteresis graph).
- capability
- Vision excellence capability registry (machine-readable ledger).
- cifar_
taxonomy - CIFAR-10 & CIFAR-100 Taxonomy & Semantic Resolver.
- cityscapes_
taxonomy - Cityscapes Urban Scene Taxonomy & Semantic Resolver.
- classifier
- Phase 4 / V4 — frozen embedding + compact linear classifier head.
- coco_
taxonomy - MS COCO (Common Objects in Context) 80-Category Taxonomy & Semantic Resolver.
- cpu_
reference - Deterministic CPU reference “vision” backend.
- crocker_
grier_ link - Crocker–Grier style 2D particle linking across frames (trackpy / IDL lineage).
- cv
- Classical CV — canonical implementation in specialized_libs::computer_vision::cv.
- detector
- Phase 5 / V5 — multi-object detector pipeline (grid head + NMS).
- dilate_
u8 - Gray dilate 3x3 max.
- draw_
rect_ u8 - Draw axis-aligned rectangle on Gray8.
- embeddings
- Local CBIR proxy embeddings — specialized_libs::computer_vision::embeddings.
- equalize_
hist_ u8 - Histogram equalization Gray8.
- erode_
u8 - Binary/gray erode 3x3 min.
- extended_
minima - H-minima / extended minima on Gray8 (suppress shallow minima).
- fast_
corners_ u8 - FAST-9 corner detector (simplified).
- find_
external_ blobs - External blob bounding boxes via flood fill (caller-buffered).
- first_
order_ stats - First-order intensity statistics on a gray-level ROI.
- gaussian_
blur_ u8 - 3x3 Gaussian blur on Gray8.
- generator
- Swarm G — native image generation ABI (Phase 8).
- glcm_
features - Gray-Level Co-occurrence Matrix (GLCM) texture features at distance 1.
- gpu
- Vision GPU dispatch facade — specialized_libs::computer_vision::gpu.
- hamming_
match - Brute-force Hamming match for binary descriptors.
- histogram_
u8 - 256-bin histogram of Gray8.
- kitti_
taxonomy - KITTI 3D Autonomous Driving Taxonomy & Semantic Resolver.
- lanczos3_
u8 - Lanczos-3 upscale RGB packed u8 by integer scale 2|3|4.
- lucas_
kanade_ step - One-step sparse Lucas–Kanade optical flow (translation per point).
- media_
store - Content-addressed media store (Phase 2 / V2) — pure Rust, no Python.
- median_
blur_ u8 - 3x3 median filter Gray8.
- mesh_
ir_ to_ export - MeshIR → render-ready export (for
compile_10don the host). - metrics
- Swarm W — evaluation metrics (synthetic always; real H1 when corpus supplied).
- morphological_
tophat - White / black morphological top-hat via existing 3×3 erode / dilate.
- nucleus_
features - Per-label nucleus geometry: area, circularity, axis ratio (PCA of region points).
- openimages_
taxonomy - Google Open Images V7 600-Category Taxonomy & Semantic Class Resolver.
- ops
- CPU vision ops oracles — specialized_libs::computer_vision::ops.
- overlay
- Detection overlay — draw boxes onto caller-owned pixel buffers (desktop/renderer path).
- pascal_
voc_ taxonomy - PASCAL VOC (Visual Object Classes) 20-Category Taxonomy & Semantic Resolver.
- positive_
od_ threshold - Optical-density threshold for positive cell fraction (Ki-67 style index).
- preprocess
- Fixed-buffer preprocess helpers (Phase 1/V1).
- print_
readiness - Print readiness checks for MeshIR (3D print excellence).
- recipes
- Composed excellence pipelines (orchestration only).
- rgb_
to_ gray_ u8 - RGB8 → Gray8 (BT.601 integer).
- semantic
- Observation → fixed NQuin-compatible records (epistemic, not ground truth).
- sobel_
mag_ u8 - Sobel gradient magnitude Gray8.
- spatial
- Spatial product adapters over
specialized_libs::computer_vision::spatial. - spectral_
unmix_ nnls - Non-negative least-squares lite for multi-channel spectral unmixing.
- sr
- Super-resolution — specialized_libs::computer_vision::sr.
- super_
resolve - Unified classical super-resolution entry (Track B0 / SR0).
- super_
resolve_ tiled - SR1 — tiled classical super-resolution (plan → extract → SR tile → blend).
- suv_
from_ activity - Standardised Uptake Value (SUV) from activity and body metrics.
- synthetic
- Phase 7 / V7 — regenerable synthetic labeled scenes (no Python, no network).
- tracker
- Phase 5 / V5 — bounded multi-object tracker (ByteTrack-class association).
- types
- Stable visual ABI — re-exported from specialized_libs::computer_vision (MIG-V2).
- vggface2_
taxonomy - Oxford VGGFace2 Facial Recognition Taxonomy & Epistemic Identity Resolver.
- voronoi_
otsu_ label - Voronoi–Otsu labeling (lite): Otsu threshold → distance peaks → watershed split.
- warp_
affine_ u8 - Nearest-neighbour affine warp Gray8. out(x,y) = src(ax + by + c, dx + ey + f) inverse map.
- warp_
perspective_ u8 - Nearest-neighbour perspective warp Gray8. Homography H 3x3 row-major maps output → input (x’,y’,w’).
- watershed_
markers - Marker-controlled watershed flooding on a gray topographic surface.
- weights
- Swarm W — production weight bundle + encoder/detector backend.
Structs§
- BlobBox
- Crocker
Grier Linker - Bounded Crocker–Grier particle tracker.
- Crocker
Grier Params - Parameters for Crocker–Grier linking.
- Detection
- One detection: fixed-width so native/WASM/serde stay stable. Coordinates are normalized × 65535 (0…1 mapped into u16).
- Detection2
- Compact detection for the free-function linker (x, y, frame only).
- First
Order Stats - First-order radiomics features (IBSI-style subset).
- Frame
Sequence - Glcm
Features - Haralick-style features averaged over 0° and 90° (symmetric GLCM).
- Gray
View - Image
View - Borrowed image view — no ownership of pixels.
- Keypoint
- LabStats
- Lab mean (L, a, b).
- Linked
Particle - One linked particle observation (detection + assigned track id).
- Macenko
Result - Result of Macenko: two unit-ish stain vectors in OD space (rows: H, E; cols: R,G,B).
- Match
- Mesh
Cleanup Options - Options for
cleanup_mesh_ir. - MeshIR
- Triangle mesh in fixed buffers (zero growth after fill).
- Mesh
Quality Report - Report from quality cleanup.
- Mesh
Validation Report - Node
Hint - Hint for future Tensor10D node packing (x,y,z,t,σ) — programme D1/D2.
- Nucleus
Feature - Fixed-layout region feature (no heap).
- OdPositive
Index - Result of a positive-OD index computation.
- Particle
Centroid - 2D particle feature used by
super::crocker_grier_link(). - Print
Readiness - Render
Mesh Export - Geometry export matching
qualia_core_db::render::assets::Meshfield layout without linking core-db into the vision crate. - RgbBg
- Per-channel background estimate (linear RGB8 mean of bright pixels).
- RgbView
- Shape2d
- Compact 2D shape summary.
- Shape2d
Features - 2D shape features from a binary mask (nonzero = foreground).
- Shape3d
Features - 3D shape features from a sparse voxel list.
- SrReport
- Report returned after a successful enhance.
- SrRequest
- Caller request for
super_resolve. - Stain
Basis - Stain basis in optical-density space: up to 3 vectors × RGB.
- Tile
Policy - Tiling policy for classical and learned SR backends.
- Tile
Rect - Axis-aligned tile on the input image (pre-scale).
- Track
Link - Per-detection link result for
crocker_grier_link. - Twin
Eligibility - Vision
Compute Report - Vision
Vram Budget - Dynamic VRAM budget for vision tiles (bytes) derived from host thermal state.
- Visual
Capabilities - Visual
Output Counts
Enums§
- Analysis
Domain - What solver domain a mesh may claim.
- Classical
Kernel - Classical resampling kernel.
- CvError
- Enhancement
Mode - Enhancement honesty mode. Medical/forensic paths use
Sharpen. - Histo
Error - Errors for histopathology kernels.
- Mesh
Validation Status - Pixel
Format - Radiomics
Error - Shared radiomics error for the radiomics submodule.
- SrBackend
- Super-resolution backend. Only classical for B0; more variants later.
- Thermal
Hint - Coarse thermal hint from host (maps from ThermalGovernor).
- TopHat
Kind - Top-hat polarity.
- Vision
Compute Device - Device that executed the op.
- Vision
Error
Constants§
- AHASH_
SIDE - Side length for aHash (8×8 → 64 bits).
- COLOR_
HIST_ BINS - Bins per RGB channel for the joint histogram.
- COLOR_
HIST_ EMBED_ DIM - Embedding dimension: joint 4×4×4 RGB histogram (64 floats).
- DEFAULT_
HE_ TARGET_ MEAN - Approximate H&E appearance targets in CIE Lab (D65).
- DEFAULT_
HE_ TARGET_ STD - Companion std for
DEFAULT_HE_TARGET_MEAN. - DEFAULT_
OVERLAP - Default overlap (pixels on input side).
- DEFAULT_
TILE - Default edge-friendly tile size (pixels on input side).
- DESC_
LEN - DHASH_
HEIGHT - DHASH_
WIDTH - dHash samples (WIDTH+1)×HEIGHT so adjacent horizontal diffs yield 64 bits.
- GLCM_
LEVELS_ 16 - Common quantization levels for radiomics GLCM.
- GLCM_
LEVELS_ 32 - MAX_
DETECTIONS - Maximum detections written per
infercall (caller must supply at least this). - MAX_
EMBED_ DIM - Maximum embedding dim written (caller buffer may be larger; we fill
min). - MAX_
FRAME_ DETS - Max detections considered per frame (association scratch).
- MAX_
INDICES - Max triangle indices (3 per tri).
- MAX_
NUCLEUS_ LABELS - Maximum distinct labels tracked in one pass (stack/table bound).
- MAX_
OD_ LABELS - Maximum distinct nucleus labels for OD aggregation.
- MAX_
PARTICLES_ PER_ FRAME - Maximum particles reported from a single frame (stack-friendly bound for callers).
- MAX_
PARTICLE_ TRACKS - Maximum simultaneous active tracks.
- MAX_
SEQ_ FRAMES - Max frames held in a fixed ring for biosense windows.
- MAX_
VERTICES - Max vertices in a single vision reconstruction mesh.
- NO_
TRACK_ ID - Sentinel: detection not assigned a track.
Traits§
- Visual
Model - Backend-agnostic visual model.
Functions§
- ahash_
u64 - Average hash: nearest-neighbor sample to 8×8, bit = pixel ≥ mean.
- anonymize_
tag_ map - Zero/redact known PHI keys in
map(in place). - apply_
background_ correct - Correct RGB illumination:
out = clamp(rgb * 255 / bg, 0..255)per channel. - apply_
hu_ window_ i16 - Window/level on
i16HU values →u8display. - assess_
twin_ eligibility - Gate mesh into twin/solver contracts. Soft refuse is honest completeness.
- avg_
pool2d_ dispatch - Avg-pool dispatch wrapping the CPU oracle.
- avg_
pool2d_ nchw_ f32 ?::avg_pool2d_nchw_f32.- background_
intensity_ sample - Sample background as the mean RGB of pixels whose luminance is at or above
the given percentile (e.g.
percentile = 95.0→ top ~5% brightest). - bicubic_
u8 - Bicubic upsample RGB8.
out≥w*scale * h*scale * 3. Scale ∈ {2,3,4}. - bilateral_
denoise_ u8 - Bilateral denoise on a u8 image.
- bilinear_
u8 - Bilinear upsample RGB8.
out≥w*scale * h*scale * 3. Scale ∈ {2,3,4}. - blend_
tile_ into_ accum - Blend one already scaled tile into float accumulators.
- box_
blur_ u8 - Box blur with odd radius
r(kernel 2r+1).out≥ w*h. - brief_
desc_ u8 - Write
ndescriptors intoout(n * DESC_LEN bytes). - canny_
u8 - Approximate Canny edges.
outbinary-ish 0/255.low/highthresholds on magnitude. - centroid_
from_ bbox - Centroid of a bounding box (integer mid-point) — convenience for box→particle bridges.
- centroids_
from_ binary - Extract centroids of connected components where pixel ≥
thresh(4-connected). - centroids_
from_ labels - Extract centroids from a pre-labelled
u8mask (label 0 = background). - class_
hash_ to_ sigma_ base - Map a class hash into a base σ band.
- class_
id_ to_ sigma_ base - Map a class hash into a base σ band.
- class_
score_ to_ sigma - Combine class base σ with detection confidence (score).
- cleanup_
mesh_ ir - Clean a MeshIR in place: weld (optional) then drop degenerate triangles.
- color_
hist_ embed_ rgb - Fill
out[..COLOR_HIST_EMBED_DIM]with an L2-normalized joint RGB histogram. - conv2d_
nchw_ dispatch - Conv2d NCHW dispatch (CPU oracle; GPU when A2 Forge lands).
- conv2d_
nchw_ f32 - 2D convolution, NCHW layout, single batch (N=1).
- cosine_
distance - Cosine distance
1 − cosine_similarity(identical unit vectors → 0). - cosine_
similarity - Cosine similarity
dot(a,b) / (|a||b|)over equal-length slices. - crocker_
grier_ link - Free-function Crocker–Grier link over compact
Detection2rows. - detection_
center_ to_ node_ hint - Map a detection-like box centre (normalised 0..1) into a node hint.
- detection_
to_ sigma - σ from a
Detection(usesclass_hash+score_f32). - dhash_
u64 - Difference hash: nearest-neighbor sample to 9×8, bit = right ≥ left (row-wise).
- dilate_
u8 - Binary dilation on a u8 image.
- draw_
rect_ u8 - Draws a rect on a u8 image.
- equalize_
hist_ u8 - Histogram equalization on a u8 image.
- erode_
u8 - Binary erosion on a u8 image.
- estimate_
tile_ count - How many tiles would be planned.
- extended_
minima - Compute extended minima of a gray topographic surface.
- extract_
tile_ rgb8 - Copy
rectfrom full-frame RGB8 (src_w × src_h × 3) intoout(at leastrect.w*rect.h*3). - fast_
corners_ u8 - Detect FAST corners.
outcaller-buffered. - finalize_
blend - Divide accum by weight into
outRGB8. - find_
external_ blobs - Find up to
out.len()external blobs where pixel ≥thresh. - first_
order_ stats - Compute first-order stats over
samples(gray / intensity ROI values). - gaussian_
blur_ u8 - Fixed 3×3 Gaussian.
out≥ w*h. - glcm_
features - Compute GLCM features on a 2D gray image at distance 1 with 16 levels (default).
- glcm_
features_ d1 - Compute GLCM features on a 2D gray image at distance 1.
- hamming_
distance_ u64 - Popcount of XOR bits between two 64-bit perceptual hashes.
- hamming_
match - Match query descriptors to train.
outone match per query (best). - histogram_
u8 - Write 256 bin counts into
bins. - hu_
window_ i16 - Window/level on
i16HU values →u8display. - intensity_
to_ od_ u8 - Map brightfield intensity to an 8-bit optical-density-like value.
- isotropic_
resample_ 2d_ nn - Resample a 2D image from anisotropic pixel spacing to isotropic.
- isotropic_
resample_ nn_ 2d - Resample a 2D image from anisotropic pixel spacing to isotropic.
- lab_
to_ rgb - Convert interleaved Lab f32 to packed RGB8.
outlength ≥lab.len(). - lanczos3_
u8 - Lanczos-3 upsample RGB8.
out≥w*scale * h*scale * 3. Scale ∈ {2,3,4}. - link_
particles - One-shot convenience: link a full detection list with fresh linker state.
- lucas_
kanade_ step - Estimate flow from
prevtonextfor each keypoint. Writes dx,dy intoflowas pairs. - macenko_
deconvolution - Macenko deconvolution.
- max_
pool2d_ dispatch - Max-pool dispatch wrapping the CPU oracle.
- max_
pool2d_ nchw_ f32 ?::max_pool2d_nchw_f32.- median_
blur_ u8 - Median blur on a u8 image.
- mesh_
ir_ to_ export - Convert MeshIR to export (no validation).
- mesh_
ir_ to_ export_ validated - Validate then export. Fails closed on invalid mesh.
- mesh_
ir_ to_ obj - Write a minimal OBJ into
out(UTF-8 text). Returns bytes written. - mesh_
ir_ to_ stl_ binary - Write binary STL into
out. Returns bytes written. - mesh_
ir_ triangles - Triangle list as
[u32; 3]slices (for core Mesh handoff). - mip_
project_ axis - Max-intensity project a 3D volume of
f32voxels. - mip_
project_ z - MIP along Z (classic axial max-intensity projection).
- morphological_
tophat - Morphological top-hat into caller buffer (
width * heightbytes). - nucleus_
features - Extract geometric features for each labeled nucleus region.
- optical_
density_ rgb - Convert packed RGB8 intensities to optical density (f32, same layout).
- otsu_
threshold_ from_ hist - Otsu threshold for a Gray8 histogram (returns 0 if image empty / single-tone).
- plan_
tiles - Plan a grid of overlapping tiles covering
[0,width) × [0,height). - positive_
od_ threshold - Compute Ki-67-style positive index from a gray channel and nucleus label map.
- print_
readiness envelope_mmmax XYZ extents (e.g. printer bed). Mesh positions assumed mm.- refuse_
fea_ unless_ eligible - Explicit refuse for unsupported FEA claims.
- reinhard_
normalize - Reinhard-normalize packed RGB8 toward
targetLab stats (or H&E defaults ifNone). - resize_
nearest_ nchw_ dispatch - Prefer GPU when
prefer_gpu: try ForgeResize2donshared_gpu, else CPU. - resize_
nearest_ nchw_ f32 - Resize each channel plane independently (nearest neighbour).
- rgb_
to_ gray_ u8 - Convert packed RGB8 to Gray8.
outlength ≥ width*height. - rgb_
to_ lab - Convert packed RGB8 to interleaved Lab f32.
outlength ≥rgb.len(). - shape_
2d_ features - Extract 2D shape from a binary mask (
nonzero= object). - shape_
2d_ from_ mask - Extract 2D shape from a binary mask (
nonzero= object). - shape_
3d_ from_ voxels - Extract 3D shape from a sparse list of voxel coordinates.
- snmf_
unmix_ lite - Unmix packed RGB into non-negative concentrations via multiplicative updates.
- sobel_
mag_ u8 - Sobel magnitude on a u8 image.
- spectral_
unmix_ nnls - Unmix one observed spectrum
y(lengthn_channels) against endmember matrixendmemberslaid out as column-major: componentkoccupiesendmembers[k * n_channels .. (k+1) * n_channels]. - super_
resolve - Super-resolve RGB8 into caller buffer (
out≥w*scale * h*scale * 3). - super_
resolve_ tiled - Super-resolve using overlapping tiles and feather blend.
- super_
resolve_ tiled_ default - Convenience: tiled with default policy.
- super_
resolve_ tiled_ with_ policy - Tiled classical with the same device honesty.
- super_
resolve_ with_ policy - Super-resolve with explicit thermal + VRAM policy (B2 surface).
- suv_
from_ activity - Body-weight SUV (SUV_bw).
- synthetic_
pulse_ sequence - Load a synthetic pulsing sequence for tests / demos (no file demux).
- thermal_
allows_ gpu_ tiles - Whether GPU tile work is allowed under thermal state.
- validate_
mesh_ ir - Validate mesh IR. Does not allocate.
- voronoi_
otsu_ label - Voronoi–Otsu label map: split touching bright objects.
- warp_
affine_ u8 m= [a,b,c, d,e,f] maps output → input.- warp_
perspective_ u8 - Perspective warp on a u8 image.
- watershed_
markers - Marker-controlled watershed.