39 #include <visp3/core/vpConfig.h> 41 #ifdef VISP_HAVE_CATCH2 42 #include <visp3/core/vpHomogeneousMatrix.h> 44 #define CATCH_CONFIG_RUNNER 47 TEST_CASE(
"vpHomogeneousMatrix re-orthogonalize rotation matrix",
"[vpHomogeneousMatrix]") {
50 0.9835, -0.0581, 0.1716, 0.0072,
51 -0.0489, -0.9972, -0.0571, 0.0352,
52 0.1744, 0.0478, -0.9835, 0.9470
58 0.9835, -0.0581, 0.1716, 0.0072,
59 -0.0937, -0.9738, 0.2072, 0.0481,
60 0.1551, -0.2199, -0.9631, 0.9583
63 std::cout <<
"Original data:" << std::endl;
64 std::cout <<
"0.9835 -0.0581 0.1716 0.0072" << std::endl;
65 std::cout <<
" -0.0937 -0.9738 0.2072 0.0481" << std::endl;
66 std::cout <<
"0.1551 -0.2199 -0.9631 0.9583" << std::endl;
67 std::cout <<
"0 0 0 1" << std::endl;
68 std::cout <<
"M after rotation re-orthogonalization:\n" << M << std::endl;
73 0.9835, -0.0581, 0.1716, 0.0072,
74 -0.0937, -0.9738, 0.2072, 0.0481,
75 0.1551, -0.2199, -0.9631, 0.9583
82 M1[0][0], M1[0][1], M1[0][2],
83 M1[1][0], M1[1][1], M1[1][2],
84 M1[2][0], M1[2][1], M1[2][2]
90 0.983, -0.058, 0.171, 0.0072,
91 -0.093, -0.973, 0.207, 0.0481,
92 0.155, -0.219, -0.963, 0.9583
97 int main(
int argc,
char *argv[])
99 Catch::Session session;
102 session.applyCommandLine(argc, argv);
104 int numFailed = session.run();
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a rotation matrix and operations on such kind of matrices.