Skip to main content

Crate calib_targets_marker

Crate calib_targets_marker 

Source
Expand description

Checkerboard marker target detector (checkerboard + 3 circles in the middle).

Pipeline overview:

  • Detect a chessboard grid from ChESS corners (partial boards are allowed).
  • Score circular markers per-cell in image space.
  • Match circle candidates to the known layout and estimate the grid offset.
  • Return typed marker-board corners with optional board alignment.

§Quickstart

use calib_targets_marker::{
    CellCoords, CirclePolarity, GrayImageView, MarkerBoardDetector, MarkerBoardSpec,
    MarkerBoardParams, MarkerCircleSpec,
};

let board = MarkerBoardSpec::new(
    6,
    8,
    [
        MarkerCircleSpec::new(CellCoords { i: 2, j: 2 }, CirclePolarity::White),
        MarkerCircleSpec::new(CellCoords { i: 3, j: 2 }, CirclePolarity::Black),
        MarkerCircleSpec::new(CellCoords { i: 2, j: 3 }, CirclePolarity::White),
    ],
)
.with_cell_size(1.0);

let params = MarkerBoardParams::for_board(board);
let detector = MarkerBoardDetector::new(params).expect("valid chessboard config");

let pixels = vec![0u8; 32 * 32];
let view = GrayImageView {
    width: 32,
    height: 32,
    data: &pixels,
};

// `detect` runs the ChESS corner front-end from `params.chess` itself.
// Feed a corner cloud you already have to `detect_with_corners` instead.
let _ = detector.detect(&view);

Re-exports§

pub use diagnostics::MarkerBoardDiagnostics;

Modules§

diagnostics
Opt-in diagnostics surface for the marker-board detector.

Structs§

CellCoords
Integer coordinates for a square cell in the grid (top-left corner indices).
CellOffset
Integer translation between detected grid cells and board cells.
ChessCorner
Canonical 2D corner consumed by the chessboard detector.
CircleCandidate
One scored circular-marker candidate found in a chessboard cell.
CircleMatch
Result of matching expected circles to detected candidates.
CircleMatchParams
Circle matching settings.
CircleScoreParams
Tuning knobs for per-cell circular-marker scoring.
GrayImageView
Borrowed view over an 8-bit grayscale image.
GridTransform
An affine integer lattice-coordinate transform: destination = matrix * source + translation.
MarkerBoardCorner
A detected marker-board checkerboard corner.
MarkerBoardDetection
Marker-board detection result.
MarkerBoardDetector
Marker board detector: chessboard + three circle markers.
MarkerBoardParams
Parameters for marker-board detection.
MarkerBoardSpec
Fixed marker board layout: chessboard size plus 3 circle markers.
MarkerCircleSpec
One expected marker circle on the board.

Enums§

CirclePolarity
Whether the circle marker prints as white-on-black or black-on-white.
MarkerBoardDetectError
Errors returned by the marker-board detector.

Type Aliases§

GridAlignment
Semantic alias for a transform that maps detected grid coordinates into a board/model coordinate frame.