6 #include <boost/optional.hpp>
14 std::cout <<
"Coordinate Example" << std::endl;
47 std::cout <<
"cv point: " << cv_point.transpose() << std::endl;
52 std::cout <<
"lvr point: " << lvr_point.transpose() << std::endl;
56 std::cout <<
"LVR <-> OpenCV - Point: Success" << std::endl;
63 double roll = -0.25*
M_PI;
64 double pitch = 1.6*
M_PI;
65 double yaw = -0.06*
M_PI;
68 cv_rot = Eigen::AngleAxisd(roll, Eigen::Vector3d::UnitZ())
69 * Eigen::AngleAxisd(-pitch, Eigen::Vector3d::UnitX())
70 * Eigen::AngleAxisd(-yaw, Eigen::Vector3d::UnitY());
84 std::cout <<
"LVR <-> OpenCV - Rotation Matrix: Success" << std::endl;
86 std::cout <<
"LVR <-> OpenCV - Rotation Matrix: Wrong" << std::endl;
92 cv_transform = lvr2::Transformd::Identity();
93 cv_transform.block<3,3>(0,0) = cv_rot;
94 cv_transform(0,2) = 2.0;
95 cv_transform(1,2) = 5.0;
96 cv_transform(2,2) = -1.0;
105 std::cout <<
"LVR <-> OpenCV - Transformation Matrix: Success" << std::endl;
107 std::cout <<
"LVR <-> OpenCV - Transformation Matrix: Wrong" << std::endl;