43 #include <Eigen/Geometry>
57 using Ptr = pcl::shared_ptr<CameraPoseProcessor>;
58 using ConstPtr = pcl::shared_ptr<const CameraPoseProcessor>;
74 std::string output_filename_;
75 std::ofstream out_stream_;
81 output_filename_ (output_filename)
83 out_stream_.open (output_filename_.c_str () );
88 if (out_stream_.is_open ())
91 std::cout <<
"wrote camera poses to file " << output_filename_ << std::endl;
98 if (out_stream_.good ())
101 Eigen::Quaternionf q (pose.rotation ());
102 Eigen::Vector3f t (pose.translation ());
104 out_stream_ << t[0] <<
"," << t[1] <<
"," << t[2]
105 <<
"," << q.w () <<
"," << q.x ()
106 <<
"," << q.y ()<<
"," << q.z () << std::endl;