Expand description
Plain chessboard detector built on top of calib-targets-core.
§Quickstart
use calib_targets_chessboard::{ChessboardDetector, ChessboardParams};
use calib_targets_core::Corner;
let params = ChessboardParams::default();
let detector = ChessboardDetector::new(params);
let corners: Vec<Corner> = Vec::new();
let result = detector.detect_from_corners(&corners);
println!("detected: {}", result.is_some());New algorithm (graph-based, perspective-aware):
- Filter strong ChESS corners.
- Estimate two approximate global grid axes (u, v) from ChESS orientations.
- Estimate a base spacing from nearest-neighbor distances.
- For each corner, find up to 4 neighbors (right/left/up/down) based on:
- distance ~ base spacing,
- direction roughly along ±u or ±v (orientation-based),
- Build an undirected 4-connected grid graph from these neighbor relations.
- BFS each connected component, assign integer coordinates (i, j).
- For each component, compute width×height and completeness.
- Keep the best component that matches expected_rows/cols (up to swap) and completeness threshold.
Structs§
- Chessboard
Debug - Chessboard
Detection Result - Chessboard
Detector - Simple chessboard detector using ChESS orientations + grid fitting in (u, v) space.
- Chessboard
Params - Parameters specific to the chessboard detector.
- Grid
Graph Debug - Grid
Graph Neighbor Debug - Grid
Graph Node Debug - Grid
Graph Params - Rectified
Board View - Rectified
Mesh View
Enums§
Functions§
- rectify_
from_ chessboard_ result - rectify_
mesh_ from_ grid - Build a rectified “board view” by piecewise homographies per grid cell. This is robust to lens distortion because it does not assume a single global H.