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

A little question about track.hpp #2267

Open
StraySparks opened this issue Nov 30, 2023 · 4 comments
Open

A little question about track.hpp #2267

StraySparks opened this issue Nov 30, 2023 · 4 comments

Comments

@StraySparks
Copy link

StraySparks commented Nov 30, 2023

Line 135-136 in track.hpp, I wonder if "const auto & feat = map_node_to_index[k]; const uint32_t & track_id = uf_tree.Find(feat.second);" make it more reasonable?
Because in line 188, the input of "uf_tree.Union()" is "map_node_to_index[k].second", the input of "uf_tree.Find()" should be the same, but "k" (line 135) is the index of "m_vec" in "class flat_pair_map". The code works well in line 135 because the value of "k" and "map_node_to_index[k].second" is the same when elements are already sorted after allFeatures.emplace() (type "set", line 74, 85), which means "map_node_to_index.sort()" actually did not work in line 100. If "map_node_to_index.sort()" worked, then the value of "k" and "map_node_to_index[k].second" will be different. The same question also happens in line 184.
I wonder if I've figured it out. Looking forward to your answers and thank you!

Best wishes!

@pmoulon
Copy link
Member

pmoulon commented Nov 30, 2023

Can you propose the change in a PR so we can investigate and clearly see the change you are proposing?

@StraySparks
Copy link
Author

Can you propose the change in a PR so we can investigate and clearly see the change you are proposing?
I will try it later.

@StraySparks
Copy link
Author

Another issue but not related to the above, line 54 in file "multiview/solver_resection_p3p_kneip.cpp" why using " ((P2-P1).cross(P3-Vec3(1,1,1))).norm() == 0" not "((P2-P1).cross(P3-P1))" to verify that world points are not colinear?
solver_resection_p3p_kneip

@pmoulon
Copy link
Member

pmoulon commented Dec 10, 2023

For this last one.. fell free to make the change locally and run the unit test. It seems indeed a bit strange.

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