9
9
#include < aliceVision/numeric/numeric.hpp>
10
10
#include < aliceVision/camera/Pinhole.hpp>
11
11
#include < aliceVision/camera/Undistortion.hpp>
12
-
13
12
#include < vector>
14
13
#include < memory>
15
14
16
15
namespace aliceVision {
17
16
namespace calibration {
18
17
19
- /* *
20
- * @brief Set of 2D points that belong to the same line.
21
- *
22
- * The 2D points correspond to real-world points that are aligned and evenly spaced
23
- * observed with a camera which applies some distortion on them.
24
- *
25
- * Therefore these 2D points may not actually be aligned and evenly spaced,
26
- * and this difference with the ideal line model is used to estimate distortion.
27
- */
28
- struct LineWithPoints
29
- {
30
- double angle;
31
- double dist;
32
- std::vector<Vec2> points;
33
- };
34
-
35
- /* *
36
- * @brief a pair of points coordinates
37
- *
38
- * One vector for the distorted coordinates
39
- * One vector from the undistorted coordinates
40
- */
41
- struct PointPair
42
- {
43
- Vec2 distortedPoint;
44
- Vec2 undistortedPoint;
45
- };
46
-
47
18
/* *
48
19
* @brief Statistics on distortion parameters estimation error.
49
20
*/
@@ -52,45 +23,9 @@ struct Statistics
52
23
double mean;
53
24
double stddev;
54
25
double median;
26
+ double lastDecile;
55
27
double max;
56
28
};
57
29
58
- /* *
59
- * @brief Estimate the undistortion parameters of a camera using a set of line aligned points.
60
- *
61
- * This algorithms minimizes a distance between points and lines using distortion.
62
- *
63
- * @param[out] undistortionToEstimate Undistortion object with the parameters to estimate.
64
- * @param[out] statistics Statistics on the estimation error.
65
- * @param[in] lines Set of line aligned points used to estimate distortion.
66
- * @param[in] lockCenter Lock the distortion offset during optimization.
67
- * @param[in] lockDistortions Distortion parameters to lock during optimization.
68
- * @return False if the estimation failed, otherwise true.
69
- */
70
- bool estimate (std::shared_ptr<camera::Undistortion> undistortionToEstimate,
71
- Statistics& statistics,
72
- std::vector<LineWithPoints>& lines,
73
- bool lockCenter,
74
- const std::vector<bool >& lockDistortions);
75
-
76
-
77
- /* *
78
- * @brief Estimate the undistortion parameters of a camera using a set of pair of undistorted/distorted points.
79
- *
80
- * This algorithms minimizes a distance between points and points using distortion.
81
- *
82
- * @param[out] undistortionToEstimate Undistortion object with the parameters to estimate.
83
- * @param[out] statistics Statistics on the estimation error.
84
- * @param[in] pointpairs Set of pair of points used to estimate distortion.
85
- * @param[in] lockCenter Lock the distortion offset during optimization.
86
- * @param[in] lockDistortions Distortion parameters to lock during optimization.
87
- * @return False if the estimation failed, otherwise true.
88
- */
89
- bool estimate (std::shared_ptr<camera::Undistortion> undistortionToEstimate,
90
- Statistics& statistics,
91
- const std::vector<PointPair>& pointpairs,
92
- bool lockCenter,
93
- const std::vector<bool >& lockDistortions);
94
-
95
30
} // namespace calibration
96
31
} // namespace aliceVision
0 commit comments