43 #include <Eigen/Geometry>
55 using Ptr = shared_ptr<CameraPoseProcessor>;
56 using ConstPtr = shared_ptr<const CameraPoseProcessor>;
72 std::string output_filename_;
73 std::ofstream out_stream_;
79 output_filename_ (output_filename)
81 out_stream_.open (output_filename_.c_str () );
86 if (out_stream_.is_open ())
89 std::cout <<
"wrote camera poses to file " << output_filename_ << std::endl;
96 if (out_stream_.good ())
99 Eigen::Quaternionf q (pose.rotation ());
100 Eigen::Vector3f t (pose.translation ());
102 out_stream_ << t[0] <<
"," << t[1] <<
"," << t[2]
103 <<
"," << q.w () <<
"," << q.x ()
104 <<
"," << q.y ()<<
"," << q.z () << std::endl;