Add CMake support and SWIG bindings for RapidPoseTriangulation

This commit is contained in:
2026-01-29 17:37:38 +08:00
parent 1ab099098e
commit 7405454480
6 changed files with 74 additions and 18 deletions

View File

@ -3,6 +3,7 @@
#include <iomanip>
#include <sstream>
#include <vector>
#include <cmath>
#include "camera.hpp"
@ -208,7 +209,7 @@ void CameraInternal::undistort_point_fisheye(std::array<float, 3> &p, const std:
// https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/fisheye.cpp#L429
float theta_d = std::sqrt(p[0] * p[0] + p[1] * p[1]);
float pi_half = std::numbers::pi * 0.5;
float pi_half = M_PI * 0.5;
theta_d = std::min(std::max(-pi_half, theta_d), pi_half);
if (theta_d < 1e-6)