43 #include <Eigen/Geometry>
69 std::string output_filename_;
70 std::ofstream out_stream_;
76 output_filename_ (output_filename)
78 out_stream_.open (output_filename_.c_str () );
83 if (out_stream_.is_open ())
86 std::cout <<
"wrote camera poses to file " << output_filename_ << std::endl;
93 if (out_stream_.good ())
96 Eigen::Quaternionf q (pose.rotation ());
97 Eigen::Vector3f t (pose.translation ());
99 out_stream_ << t[0] <<
"," << t[1] <<
"," << t[2]
100 <<
"," << q.w () <<
"," << q.x ()
101 <<
"," << q.y ()<<
"," << q.z () << std::endl;