26 #include "testing/testing.h"
31 TEST(Panography, PrintSomeSharedFocalEstimationValues) {
32 Mat x1(2, 2),
x2(2, 2);
33 x1 << 158, 78, 124, 113;
34 x2 << 300, 214, 125, 114;
37 x1.block<1, 2>(0, 0) /= 320;
38 x1.block<1, 2>(1, 0) /= 240;
39 x2.block<1, 2>(0, 0) /= 320;
40 x2.block<1, 2>(1, 0) /= 240;
41 x1 += Mat2::Constant(0.5);
42 x2 += Mat2::Constant(0.5);
49 EXPECT_NEAR(3.47194, fs[0], 1
e-3);
52 TEST(Panography, GetR_FixedCameraCenterWithIdentity) {
63 EXPECT_MATRIX_NEAR(Mat3::Identity(),
R, 1
e-8);
64 LOG(INFO) <<
"R \n" <<
R;
67 TEST(Panography, Homography_GetR_Test_PitchY30) {
78 const double alpha = 30.0 *
M_PI / 180.0;
81 rotY <<
cos(alpha), 0, -
sin(alpha),
86 for (
int i = 0; i < n; ++i) {
87 x2.block<3, 1>(0, i) = rotY * x1.col(i);
94 for (
int i = 0; i < n; ++i) {
95 Vec residuals = (
R * x1.col(i)) -
x2.col(i);
96 EXPECT_NEAR(0, residuals.norm(), 1
e-6);
101 double pitch_y =
asin(
R(2, 0)) * 180.0 /
M_PI;
102 EXPECT_NEAR(30, pitch_y, 1
e-4);
105 TEST(MinimalPanoramic, Real_Case_Kernel) {
119 Mat3 Ground_TruthHomography;
121 Ground_TruthHomography<< 1, 0.02, 129.83,
122 -0.02, 1.012, 0.07823,
130 LOG(INFO) <<
"Got " << Hs.size() <<
" solutions.";
131 for (
int j = 0; j < Hs.size(); ++j) {
134 EXPECT_MATRIX_NEAR(
H, Ground_TruthHomography, 1
e-1);
141 for (
int i = 0; i < n; ++i) {
142 Vec x1p =
H * x1h.col(i);
143 Vec residuals = x1p / x1p(2) - x2h.col(i);
144 EXPECT_MATRIX_NEAR_ZERO(residuals, 1
e-5);
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
void EuclideanToHomogeneous(const Mat &X, Mat *H)
TEST(PolynomialCameraIntrinsics2, ApplyOnFocalCenter)
void F_FromCorrespondance_2points(const Mat &x1, const Mat &x2, vector< double > *fs)
void GetR_FixedCameraCenter(const Mat &x1, const Mat &x2, const double focal, Mat3 *R)
static void Solve(const Mat &x1, const Mat &x2, vector< Mat3 > *Hs)