Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluate it with Evo #33

Open
loseyourself-gan opened this issue Mar 24, 2021 · 2 comments
Open

evaluate it with Evo #33

loseyourself-gan opened this issue Mar 24, 2021 · 2 comments

Comments

@loseyourself-gan
Copy link

Hello, which variable stores the position and camera direction of each moment? Would you like to output it and evaluate it with Evo

@HeYijia
Copy link
Owner

HeYijia commented Mar 31, 2021

you can save the pose with " vo_->lastFrame()->T_f_w_.inverse() ". Furthermore, the translation vector is “vo_->lastFrame()->T_f_w_.inverse().translation()”, the rotation matrix is "vo_->lastFrame()->T_f_w_.inverse().rotationMatrix()"

@loseyourself-gan
Copy link
Author

@HeYijia Thank you for your reply
I made this change to the code
int nImages = vstrImageFilenames.size();
cv::Mat img;
ofstream f;
const string filename = "gan";
f.open(filename.c_str());
f<<fixed;
for(int ni=0; ni<nImages; ni++)
{
std::string img_path = filepath+"/"+vstrImageFilenames[ni];
img = cv::imread(img_path.c_str(),CV_LOAD_IMAGE_GRAYSCALE);
assert(!img.empty());

      // process frame
      //cv::Mat unimg;
      //cam_pinhole_->undistortImage(img,unimg);
      //vo_->addImage(unimg, vTimestamps[ni]);
      vo_->addImage(img, vTimestamps[ni]);

      if(vo_->lastFrame() != NULL)
      {
      f<<vTimestamps[ni]<<" "<<vo_->lastFrame()->T_f_w_.inverse().translation()<<" "<<vo_->lastFrame()->T_f_w_.inverse().rotationMatrix();

        std::cout << "Frame-Id: " << vo_->lastFrame()->id_ << " \t"
                    << "#Features: " << vo_->lastNumObservations() << " \n";

      }

}
f.close();

But there was this mistake
Frame-Id: 797 #Features: 181
[INFO] DepthFilter stop thread invoked.
[INFO] DepthFilter interrupt and join thread...
[INFO] DepthFilter destructed.
[INFO] SVO destructor invoked
[INFO] Map destructed
new_frame: Fatal IO error 11 (Resource temporarily unavailable) on X server U .
段错误 (核心已转储)

How can I solve it?
Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants