Repository navigation
fix: vector out of bounds in ViewGraph::KeepLargestConnectedComponents - #99
Conversation
lpanaf
left a comment
There was a problem hiding this comment.
LGTM. However, in what condition did this error get triggered? Is it when no images are provided? If at least 1 image is present, it should not have this issue :)
|
I am trying to calibrate cameras with only several images (currently 4). If matches between images are not good, image pairs are easily filtered out by RelPoseFilter, and there could be no valid image pairs for KeepLargestConnectedComponents() 😆 |
Hi, thanks for the info! However, in this case, the view-graph should output that the connected component is every single image, instead of 0. Some other parts may also have bug in this case |
In this case, all image_pairs are marked invalid from relative pose estimation, and the AdjacencyList is empty from here, and no connected components will be generated. So I think no more bugs |
colmap#99) * fix: vector out of bounds in ViewGraph::KeepLargestConnectedComponents * fix: return GlobalMapper::Solve when no connected components
In the most extreme condition, all image pairs could be invalid and there are no connected_components. This will crash the program with a SIGSEGV signal like:
I think some conditional statements should be added here to avoid crash. And the
GlobalMapper::Solvefunction should return when no connected components are found.After adding this statement, the program doesn't crash and the log looks like: