1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Opt-in diagnostics surface for the marker-board detector.
//!
//! These types carry evidence about *how* a marker board was found — every
//! circle hypothesis the image-space scorer produced, the expected-to-detected
//! circle pairings the matcher chose, the per-corner provenance back into the
//! input ChESS-corner slice, and the count of circles consistent with the
//! chosen grid alignment. They are produced by
//! [`crate::MarkerBoardDetector::detect_from_corners_with_diagnostics`] and
//! [`crate::MarkerBoardDetector::detect_from_image_and_corners_with_diagnostics`]
//! and are intentionally kept separate from the result API
//! ([`crate::MarkerBoardDetectionResult`]).
//!
//! A consumer that only needs to *use* a marker-board detection wants the
//! labelled corners ([`crate::MarkerBoardDetectionResult::corners`]) and the
//! grid alignment ([`crate::MarkerBoardDetectionResult::alignment`]) — never
//! the contents of this module. The fields here exist only to *understand* or
//! debug a detection.
//!
//! This module carries a **looser stability promise** than the result API:
//! diagnostic fields may be added or restructured in minor releases as the
//! detector's internal evidence model evolves.
use Serialize;
use crateCircleCandidate;
use crateCircleMatch;
/// Per-call diagnostics captured by the marker-board detector's
/// `*_with_diagnostics` entry points.
///
/// Returned alongside the [`crate::MarkerBoardDetectionResult`] on every
/// successful call. On the corners-only path
/// ([`crate::MarkerBoardDetector::detect_from_corners_with_diagnostics`])
/// there is no image to score circles against, so [`Self::circle_candidates`]
/// and [`Self::circle_matches`] are empty and [`Self::alignment_inliers`] is
/// `0`; [`Self::inliers`] is still populated from the chessboard stage.