Expand description
Core primitives for ChESS/Radon response computation, subpixel refinement, and corner descriptors.
The crate exposes a deliberate low-level contract through its
crate root: response computation (chess_response_u8,
chess_response_u8_patch, radon_response_u8), corner
detection (find_corners_u8, detect_corners_from_response)
and its individual stages — threshold + NMS via
detect_peaks_from_response_with_refine_radius and image-domain
refinement via refine_corners_on_image — the ChessParams
configuration consumed by those stages together with its
RefinerKind refiner selector, pluggable subpixel refinement (the
CornerRefiner trait and built-in refiners), the two-axis
orientation fit (fit_axes_at_point, describe_corners), and
the ImageView borrowed-buffer type. The detector pipeline
composes three orthogonal stages — detection, refinement, and
orientation fit — all reachable from the crate root.
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) – compatibility feature reserved for future use. The current detector implementation requires the Rust standard library.rayon– parallelizes the dense response computation and Radon accumulation over image rows using therayoncrate. Does not change numerical results.simd– enables a SIMD‑accelerated inner loop for the ChESS response kernel, based onportable_simd. Requires a nightly compiler; the scalar path remains the reference implementation.tracing– emits structured spans around response and detector functions using thetracingecosystem, useful for profiling and diagnostics.
Feature combinations:
- no features /
stdonly – 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 is independent of rayon/simd, and tracing
only adds observability; none of these features change the numerical
results, only performance and instrumentation.
§Minimum supported Rust version
The default (stable) build requires Rust 1.88 or newer, as
declared by rust-version in Cargo.toml. The optional simd
feature uses portable_simd and therefore requires a nightly
toolchain; every other feature builds on stable.
The ChESS idea is proposed in Bennett, Lasenby, ChESS: A Fast and Accurate Chessboard Corner Detector, CVIU 2014.
Structs§
- Axis
Estimate - Direction of one local grid axis with its 1σ angular uncertainty.
- Axis
FitResult - Result of a two-axis orientation fit at a single corner.
- Center
OfMass Config - Configuration for the
CenterOfMassRefiner. - Center
OfMass Refiner - Center-of-mass subpixel refiner.
- Chess
Buffers - Reusable scratch for
ChessDetector. Wraps an ownedResponseMap; the ChESS response kernel currently allocates its output, and this struct keeps the latest map alive so the trait’sResponse<'a> = &'a ResponseMapcan borrow it across the two stages. - Chess
Detector - Zero-sized
DenseDetectorimplementor for the ChESS kernel. - Chess
Params - Low-level ChESS detection parameters consumed by the response and
detection stages. The
chess-cornersfacade lowers itsDetectorConfigonto this type; depend on it directly when driving the response and detection stages without going through the facade. Tunable parameters for the ChESS response computation and corner detection. - Corner
- A detected corner candidate (subpixel position with raw response strength).
- Corner
Descriptor - Describes a detected chessboard corner in full-resolution image coordinates.
- Forstner
Config - Configuration for the
ForstnerRefiner. - Forstner
Refiner - Förstner structure-tensor subpixel refiner.
- Image
View - Minimal grayscale view for refinement without taking a dependency on
image. - Radon
Buffers - Reusable scratch for the whole-image Radon detector. Holds the
upsampled image buffer, the four summed-area tables, the response
map, and the box-blur scratch. All buffers grow on demand and are
reused across frames — same pattern as
PyramidBuffers. - Radon
Detector - Zero-sized
DenseDetectorimplementor for the whole-image Duda-Frese Radon kernel. - Radon
Detector Params - Configuration for the whole-image Radon detector.
- Radon
Response View - Borrow of the dense working-resolution response map. Cheaply
convertible to a
ResponseMapviaSelf::to_response_mapwhen ownership is required (e.g. for the classicdetect_corners_from_response). - Refine
Context - Inputs shared by refinement methods.
- Refine
Result - Result of refining a single corner candidate.
- Response
Map - Dense response map in row-major layout.
- Roi
- Rectangular region of interest with half-open coordinate semantics
[x0, x1) × [y0, y1). - Saddle
Point Config - Configuration for the
SaddlePointRefiner. - Saddle
Point Refiner - Saddle-point quadratic-surface subpixel refiner.
Enums§
- Orientation
Method - Method used to fit the two grid axes at a detected corner.
- Peak
FitMode - Subpixel peak-fitting mode.
- Refine
Status - Status of a refinement attempt.
- Refiner
- Runtime refiner with reusable scratch buffers.
- Refiner
Kind - User-facing enum selecting a refinement backend.
Traits§
- Corner
Refiner - Trait implemented by the built-in subpixel refinement backends.
- Dense
Detector - Two-stage dense corner detector contract.
Functions§
- chess_
response_ u8 - Compute the dense ChESS response for an 8-bit grayscale image.
- chess_
response_ u8_ patch - Compute the ChESS response only inside a rectangular ROI of the image.
- describe_
corners - Convert raw corner candidates into full descriptors by sampling the
source image and running the chosen
OrientationMethodat each corner. - detect_
corners_ from_ response - Core detector: run NMS + refinement on an existing response map.
- detect_
corners_ from_ response_ with_ refiner - Detector variant that accepts a user-provided refiner implementation.
- detect_
peaks_ from_ radon - Stage 1 of Radon detection: threshold + NMS + cluster-filter + 3-point Gaussian peak-fit on the response map.
- detect_
peaks_ from_ response_ with_ refine_ radius - Stage 1 of ChESS detection: threshold + NMS + cluster-filter on the response map.
- find_
corners_ u8 - Compute corners starting from an 8-bit grayscale image.
- fit_
axes_ at_ point - Sample the 16-point ChESS ring at
(cx, cy)withradiusand run the chosen orientation method. - merge_
corners_ simple - Merge corners within a given radius, keeping the strongest response.
- radon_
response_ u8 - Compute the dense Radon response into
buffers.responseand return a read-onlyRadonResponseViewat working resolution (i.e.input_dim × image_upsample). - refine_
corners_ on_ image - Stage 2 of detection: image-domain subpixel refinement.