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(
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(
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<const Camera> CameraConstPtr;
}
} // namespace models
MYNTEYE_END_NAMESPACE

View File

@ -17,6 +17,8 @@
#include <cmath>
#include <cstdio>
#include <limits>
#include <vector>
#include <algorithm>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
@ -306,7 +308,7 @@ void EquidistantCamera::estimateIntrinsics(
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.mv() = f;
@ -638,7 +640,7 @@ void EquidistantCamera::backprojectSymmetric(
}
#ifdef _DOUTPUT
std::cout << std::endl << std::endl << "coeffs:" << coeffs;
#endif
#endif
if (npow == 1) {
theta = p_u_norm;
} else {

View File

@ -66,7 +66,7 @@ class Matrix {
}
template<typename T>
Matrix<T> cast(void) const{
Matrix<T> cast(void) const {
Matrix<T> res(_Rows, _Cols);
for (int i = 0; i < _Rows; i++) {
for (int j = 0; j < _Cols; j++) {

View File

@ -39,7 +39,7 @@ class SMatrix: public Matrix_{
};
template<typename _Scalar>
SMatrix<_Scalar> SMatrix<_Scalar>::inverse(void) const{
SMatrix<_Scalar> SMatrix<_Scalar>::inverse(void) const {
SMatrix<_Scalar> res(Matrix_::_Rows);
_Scalar d = determinant();
for (int i = 0; i < Matrix_::_Rows; i++) {
@ -51,7 +51,7 @@ SMatrix<_Scalar> SMatrix<_Scalar>::inverse(void) const{
}
template<typename _Scalar>
_Scalar SMatrix<_Scalar>::determinant(void) const{
_Scalar SMatrix<_Scalar>::determinant(void) const {
int r, c, m;
int lop = 0;
int n = Matrix_::_Rows;