Skip to main content

Crate chess_corners_core

Crate chess_corners_core 

Source
Expand description

Core primitives for computing ChESS responses and extracting subpixel corners.

The crate is organized along the three orthogonal axes the detector pipeline composes:

ModuleDescription
detectFeature-detection pipelines. Two independent families share a common output type: detect::chess (ChESS response + NMS) and detect::radon (Radon SAT + peak detection).
refinePluggable subpixel-refinement backends. The refine::CornerRefiner trait dispatches across center-of-mass, Förstner, saddle-point, and Radon-peak refiners.
orientationTwo-axis orientation fit (OrientationMethod::RingFit ring fit, OrientationMethod::DiskFit full-disk crossing-line) shared between detectors. The orientation::describe_corners entry point produces CornerDescriptor values with subpixel position, two-axis orientation, per-axis 1σ uncertainty, contrast, and fit residual.
imageviewZero-copy ImageView into a borrowed grayscale buffer, with optional origin offset for pyramid/ROI support.

Most users should work through the chess-corners facade crate rather than depending on chess-corners-core directly. Depend on this crate only when you need raw response maps, custom refiners, or the Radon detector primitives.

§Features

  • std (default) – enables use of the Rust standard library. When disabled, the crate is no_std + alloc.
  • rayon – parallelizes the dense response computation and Radon accumulation over image rows using the rayon crate. Does not change numerical results.
  • simd – enables a SIMD‑accelerated inner loop for the ChESS response kernel, based on portable_simd. Requires a nightly compiler; the scalar path remains the reference implementation.
  • tracing – emits structured spans around response and detector functions using the tracing ecosystem, useful for profiling and diagnostics.

Feature combinations:

  • no features / std only – single‑threaded scalar implementation.
  • rayon – same scalar math, but rows are processed in parallel.
  • simd – single‑threaded, but the inner ring computation is vectorized.
  • rayon + simd – rows are processed in parallel and each row uses the SIMD‑accelerated inner loop.

The detector in detect is independent of rayon/simd, and tracing only adds observability; none of these features change the numerical results, only performance and instrumentation.

The ChESS idea is proposed in Bennett, Lasenby, ChESS: A Fast and Accurate Chessboard Corner Detector, CVIU 2014.

Re-exports§

pub use crate::detect::dense::ChessBuffers;
pub use crate::detect::dense::ChessDetector;
pub use crate::detect::dense::DenseDetector;
pub use crate::detect::dense::RadonDetector;
pub use crate::detect::radon::primitives::fit_peak_frac;
pub use crate::detect::radon::primitives::PeakFitMode;
pub use crate::detect::radon::detect_peaks_from_radon;
pub use crate::detect::radon::radon_response_u8;
pub use crate::detect::radon::RadonBuffers;
pub use crate::detect::radon::RadonDetectorParams;
pub use crate::detect::radon::RadonResponseView;
pub use crate::detect::radon::SatElem;
pub use crate::detect::AxisEstimate;
pub use crate::detect::Corner;
pub use crate::detect::CornerDescriptor;
pub use crate::orientation::fit_axes_at_point;
pub use crate::orientation::fit_axes_from_samples;
pub use crate::orientation::AxisFitResult;
pub use crate::orientation::OrientationMethod;
pub use crate::refine::CenterOfMassConfig;
pub use crate::refine::CenterOfMassRefiner;
pub use crate::refine::CornerRefiner;
pub use crate::refine::ForstnerConfig;
pub use crate::refine::ForstnerRefiner;
pub use crate::refine::RadonPeakConfig;
pub use crate::refine::RadonPeakRefiner;
pub use crate::refine::RefineContext;
pub use crate::refine::RefineResult;
pub use crate::refine::RefineStatus;
pub use crate::refine::Refiner;
pub use crate::refine::RefinerKind;
pub use crate::refine::SaddlePointConfig;
pub use crate::refine::SaddlePointRefiner;
pub use imageview::ImageView;

Modules§

detect
Feature-detection pipelines.
imageview
orientation
Two-axis projective orientation fit at a chessboard corner.
refine
Pluggable subpixel-refinement backends.

Structs§

ChessParams
Tunable parameters for the ChESS response computation and corner detection.
ResponseMap
Dense response map in row-major layout.