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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//! Linear and closed-form calibration building blocks.
//!
//! This crate provides deterministic, allocation-light solvers that are commonly
//! used as **initialization** steps before non-linear refinement. The focus is
//! on classic DLT-style methods and minimal solvers with clear numerical
//! assumptions.
//!
//! # Algorithms
//! - Homography estimation (normalized DLT, optional RANSAC)
//! - Planar intrinsics (Zhang method from multiple homographies)
//! - Distortion estimation (Brown-Conrady from homography residuals)
//! - Iterative intrinsics refinement (alternating K and distortion estimation)
//! - Planar pose from homography + intrinsics
//! - Fundamental matrix: 8-point (normalized) and 7-point
//! - Essential matrix: 5-point minimal solver + decomposition to (R, t)
//! - Camera pose (PnP): DLT, P3P, EPnP, and DLT-in-RANSAC
//! - Camera matrix DLT and RQ decomposition
//! - Linear triangulation (DLT)
//! - Multi-camera rig extrinsics and hand-eye calibration
//! - Laserline plane estimation (SVD-based from ray-plane intersections)
//!
//! # Coordinate conventions
//! - Most solvers accept **pixel coordinates** directly.
//! - Essential matrix and P3P/EPnP expect **calibrated** image points; these
//! functions take intrinsics or assume input is already normalized.
//! - Pose outputs are `T_C_W`: transform from world/board coordinates into the
//! camera frame.
//!
//! # Example
//! ```no_run
//! use vision_calibration_linear::HomographySolver;
//! use vision_calibration_core::Pt2;
//!
//! let world = vec![
//! Pt2::new(0.0, 0.0),
//! Pt2::new(1.0, 0.0),
//! Pt2::new(1.0, 1.0),
//! Pt2::new(0.0, 1.0),
//! ];
//! let image = vec![
//! Pt2::new(120.0, 200.0),
//! Pt2::new(220.0, 198.0),
//! Pt2::new(225.0, 300.0),
//! Pt2::new(118.0, 302.0),
//! ];
//!
//! let h = HomographySolver::dlt(&world, &image).expect("homography failed");
//! println!("H = {h}");
//! ```
//!
//! Non-linear refinement and full pipelines live in `vision-calibration-optim` and
//! `vision-calibration-pipeline` and are re-exported via the top-level `vision-calibration` crate.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Minimal imports for common planar initialization workflows.