-
Notifications
You must be signed in to change notification settings - Fork 1.7k
adding openMVG sample to visualize sfm_data using rerun sdk #2284
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
Conversation
|
Thank you for your PR. I have also some work in progress that I did not pushed yet to log the growing sfm_data file as it is updated during the SFM process. I will merge both work. How is your experience logging images. I got issue on dataset with hundred of images for out of memory. Also it could be nice if you were willing to share some reconstruction you made and there rerun preview 😜 |
|
Hi Pierre thanks for your response, this is a rerun preview for a reconstruction I made |
…std::out_of_range exception
|
Hi @pmoulon I hope you are doing well, |
pmoulon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor improvement that we can do:
- use emplace_back to be less verbose
- better use
sfm_data.s_root_pathto log the path to the image
| std::unordered_map<uint32_t, std::vector<rerun::components::Position2D>> | ||
| points2d_per_img; | ||
| for (const auto& landmark : landmarks) { | ||
| points3d.push_back(rerun::components::Position3D( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor you can use emplace_back
points3d.emplace_back(
landmark.second.X(0), landmark.second.X(1), landmark.second.X(2));
| sfm_data.GetIntrinsics().at(id_intrinsic)->getParams()[0], | ||
| resolution)); | ||
| openMVG::image::Image<openMVG::image::RGBColor> img; | ||
| auto is_img_loaded = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right way to access the image path is to use the root path in SfM_data
const std::string sImageName = stlplus::create_filespec(sfm_data.s_root_path, view->s_Img_path);
auto is_img_loaded =
openMVG::image::ReadImage(sImageName.c_str(), &img);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work on these changes today.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmoulon requested changes finished.
|
I ran the example using about 140 images and worked well with the images, but I will double check. |
…ordered_map::emplace_back instead of push_back
|
Waiting for CI and I will merge. |
…penMVG#2284) * adding openMVG sample to visualize sfm_data using rerun sdk * check if the view has observations before logging keyPoints to avoid std::out_of_range exception * using sfm_data s_root_path instead of view s_img_path and use std::unordered_map::emplace_back instead of push_back




No description provided.