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_chessboard::ChessCorner;
use calib_targets_core::GrayImageView;
use calib_targets_marker::{
    CellCoords, CirclePolarity, MarkerBoardDetector, MarkerBoardSpec, MarkerBoardParams,
    MarkerCircleSpec,
};

let layout = MarkerBoardSpec {
    rows: 6,
    cols: 8,
    cell_size: Some(1.0),
    circles: [
        MarkerCircleSpec {
            cell: CellCoords { i: 2, j: 2 },
            polarity: CirclePolarity::White,
        },
        MarkerCircleSpec {
            cell: CellCoords { i: 3, j: 2 },
            polarity: CirclePolarity::Black,
        },
        MarkerCircleSpec {
            cell: CellCoords { i: 2, j: 3 },
            polarity: CirclePolarity::White,
        },
    ],
};

let params = MarkerBoardParams::new(layout);
let detector = MarkerBoardDetector::new(params);

let pixels = vec![0u8; 32 * 32];
let view = GrayImageView {
    width: 32,
    height: 32,
    data: &pixels,
};
let corners: Vec<ChessCorner> = Vec::new();

let _ = detector.detect_from_image_and_corners(&view, &corners);

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.
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.
MarkerBoardCorner
A detected marker-board checkerboard corner.
MarkerBoardDetectConfig
Configuration for marker board detection, loadable from JSON.
MarkerBoardDetectReport
Detection report for serialization.
MarkerBoardDetectionResult
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.

Type Aliases§

MarkerBoardIoError
Error type for marker-board JSON config / report I/O.