chess-corners
Ergonomic ChESS (Chess-board Extraction by Subtraction and Summation) detector on top of
chess-corners-core.
This crate:
- Re-exports the main types from
chess-corners-core(ChessParams,CornerDescriptor,ResponseMap). - Provides a unified
ChessConfigfor single-scale and multiscale detection. - Adds optional
image::GrayImageintegration and a small CLI binary for batch runs. - Exposes pluggable subpixel refiners (
RefinerKindviaChessParams::refiner) so you can choose between center-of-mass (default), Förstner, or saddle-point refinement.
Examples
By default the image feature is enabled so you can work directly with GrayImage:
use ;
use Reader as ImageReader;
Selecting a refiner
The default refiner matches the legacy center-of-mass behavior. To opt into the Förstner or saddle-point refiners on image intensities:
use ;
let mut cfg = single_scale;
cfg.params = default;
let refiner = Forstner;
cfg.params.refiner = refiner;
let corners = find_chess_corners_image;
You can also override the refiner per call without mutating your config via
find_chess_corners_image_with_refiner.
You can also try the bundled examples on sample images in testimages/:
- Single-scale:
cargo run -p chess-corners --example single_scale_image -- testimages/mid.png - Multiscale:
cargo run -p chess-corners --example multiscale_image -- testimages/large.png
Both examples require the image feature, which is enabled by default. If you build with --no-default-features, re-enable it when running examples: --features image.
Feature flags:
image(default) – enablefind_chess_corners_imageforimage::GrayImage.rayon– parallelize response computation and multiscale refinement.simd– enable portable-SIMD acceleration in the core response kernel (nightly only).par_pyramid– opt into SIMD/rayonin the pyramid builder.tracing– emit structured spans from multiscale detection and the CLI when enabled.
The full guide-style documentation and API docs are published at: