calib_targets_chessboard/
params.rs1use calib_targets_core::OrientationClusteringParams;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Deserialize, Serialize)]
5pub struct GridGraphParams {
6 pub min_spacing_pix: f32,
7 pub max_spacing_pix: f32,
8 pub k_neighbors: usize,
9 pub orientation_tolerance_deg: f32,
10}
11
12impl Default for GridGraphParams {
13 fn default() -> Self {
14 Self {
15 min_spacing_pix: 5.0,
16 max_spacing_pix: 50.0,
17 k_neighbors: 8,
18 orientation_tolerance_deg: 22.5,
19 }
20 }
21}
22
23#[derive(Clone, Debug, Deserialize, Serialize)]
25pub struct ChessboardParams {
26 pub min_corner_strength: f32,
28
29 pub min_corners: usize,
31
32 pub expected_rows: Option<u32>,
34
35 pub expected_cols: Option<u32>,
37
38 pub completeness_threshold: f32,
41
42 pub use_orientation_clustering: bool,
43 pub orientation_clustering_params: OrientationClusteringParams,
44}
45
46impl Default for ChessboardParams {
47 fn default() -> Self {
48 Self {
49 min_corner_strength: 0.0,
50 min_corners: 16,
51 expected_rows: None,
52 expected_cols: None,
53 completeness_threshold: 0.7,
54 use_orientation_clustering: true,
55 orientation_clustering_params: OrientationClusteringParams::default(),
56 }
57 }
58}