fix(*): PI lost error continue.

This commit is contained in:
TinyO 2019-09-06 14:13:15 +08:00
parent 81a9d0b201
commit 9cd39b982f
4 changed files with 10 additions and 7 deletions

View File

@ -124,7 +124,8 @@ class Camera {
double reprojectionError( double reprojectionError(
const models::Vector3d &P, const models::Quaterniond &camera_q, const models::Vector3d &P, const models::Quaterniond &camera_q,
const models::Vector3d &camera_t, const models::Vector2d &observed_p) const; const models::Vector3d &camera_t,
const models::Vector2d &observed_p) const;
void projectPoints( void projectPoints(
const std::vector<cv::Point3f> &objectPoints, const cv::Mat &rvec, const std::vector<cv::Point3f> &objectPoints, const cv::Mat &rvec,
@ -136,7 +137,7 @@ class Camera {
typedef std::shared_ptr<Camera> CameraPtr; typedef std::shared_ptr<Camera> CameraPtr;
typedef std::shared_ptr<const Camera> CameraConstPtr; typedef std::shared_ptr<const Camera> CameraConstPtr;
} } // namespace models
MYNTEYE_END_NAMESPACE MYNTEYE_END_NAMESPACE

View File

@ -17,6 +17,8 @@
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
#include <limits> #include <limits>
#include <vector>
#include <algorithm>
#include <opencv2/calib3d/calib3d.hpp> #include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc.hpp> #include <opencv2/imgproc/imgproc.hpp>
@ -306,7 +308,7 @@ void EquidistantCamera::estimateIntrinsics(
continue; continue;
} }
double f = cv::norm(ipts.at(0) - ipts.at(1)) / M_PI; double f = cv::norm(ipts.at(0) - ipts.at(1)) / PI;
params.mu() = f; params.mu() = f;
params.mv() = f; params.mv() = f;