Guest User

Untitled

a guest
Jun 25th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. typedef std::pair<cv::Mat, cv::Mat> cv_trans_t;
  2.  
  3. cv_trans_t isometry3fTocvMat(Eigen::Isometry3f& pose){
  4. cv::Mat rot, tra;
  5. cv::eigen2cv(pose.rotation(),rot);
  6. std::cout << "rot cv mat: \n" << rot << std::endl;
  7. cv::eigen2cv(Eigen::Matrix<float,3,1>(pose.translation()),tra);
  8. std::cout << "tra cv mat: \n" << tra << std::endl;
  9.  
  10. cv::Rodrigues(rot,rot);
  11. cv_trans_t output;
  12. output.first = rot;
  13. output.second = tra;
  14. return output;
  15. }
Add Comment
Please, Sign In to add comment