Skip to content

Conversation

@pierotofy
Copy link
Contributor

@pierotofy pierotofy commented Mar 8, 2022

Hey there ✋

When trying to reconstruct a small image set (2 or 3 images) and matching_graph_rounds is enabled, the pipeline will fail at the feature matching step:

Traceback (most recent call last):
  File "/code/SuperBuild/install/bin/opensfm/bin/opensfm_main.py", line 25, in <module>
    commands.command_runner(
  File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/command_runner.py", line 37, in command_runner
    command.run(data, args)
  File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/command.py", line 12, in run
    self.run_impl(data, args)
  File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/match_features.py", line 11, in run_impl
    match_features.run_dataset(dataset)
  File "/code/SuperBuild/install/bin/opensfm/opensfm/actions/match_features.py", line 14, in run_dataset
    pairs_matches, preport = matching.match_images(data, {}, images, images)
  File "/code/SuperBuild/install/bin/opensfm/opensfm/matching.py", line 46, in match_images
    pairs, preport = pairs_selection.match_candidates_from_metadata(
  File "/code/SuperBuild/install/bin/opensfm/opensfm/pairs_selection.py", line 630, in match_candidates_from_metadata
    g = match_candidates_by_graph(
  File "/code/SuperBuild/install/bin/opensfm/opensfm/pairs_selection.py", line 253, in match_candidates_by_graph
    triangles = spatial.Delaunay(points).simplices
  File "qhull.pyx", line 1840, in scipy.spatial.qhull.Delaunay.__init__
  File "qhull.pyx", line 356, in scipy.spatial.qhull._Qhull.__init__
scipy.spatial.qhull.QhullError: QH6214 qhull input error: not enough points(2) to construct initial simplex (need 4)

While executing:  | qhull d Qt Qc Q12 Qbb Qz
Options selected for Qhull 2019.1.r 2019/06/21:
  run-id 521442032  delaunay  Qtriangulate  Qcoplanar-keep  Q12-allow-wide
  Qbbound-last  Qz-infinity-point  _pre-merge  _zero-centrum  Qinterior-keep
  _maxoutside  0

This is solved by having match_candidates_by_graph return early if there's less than 4 input images.

@facebook-github-bot
Copy link
Contributor

@fabianschenk has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants