Line2Point icon indicating copy to clipboard operation
Line2Point copied to clipboard

Have a question on a method calculating nearest neigbors

Open Fusroda-h opened this issue 2 years ago • 0 comments

Hi there, Thank you again for providing your code implementation.

Meanwhile, I was just wondering about the NN (nearest neighbour) implementation - as far as I can see, the code includes the reference point when calculating NN lines and points (inside get_n_closest_lines_from_line, get_n_closest_points_from_line and get_n_closest_lines_from_point), and this distance (reference vs reference) seems to be set to 0. But doesn't that induce a bias on the line offset towards ground truth? (as the offset is set as ground truth point location?)

So I changed the 3 methods get_n_closest_lines_from_line, get_n_closest_points_from_line, get_n_closest_lines_from_point to exclude the reference point (or line) from nearest neighbor calculation. (It seems to degrade the InvSfM inversion performance a little overall.)

Fusroda-h avatar Jan 10 '23 04:01 Fusroda-h