alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.9k stars 807 forks source link

[sfm] SequentialSfM: Initialize the resection ID in the constructor and set it for the initial pair #1593

Closed cbentejac closed 7 months ago

cbentejac commented 8 months ago

Description

This PR does the following:

  1. Move the initialization of the resection ID from the reconstruction process to the constructor: the highest resection ID is searched and set in a class-member variable instead of being local to a function.
  2. Set the resection ID of the SfM's initial pair: the resection ID for the initial pair was never set, meaning it always remained UndefinedIndexT. It is now set to 0, and the resection ID is incremented from there. A consequence of setting the resection ID of the initial pair is that it allows to visualize it clearly in Meshroom's 3D Viewer with https://github.com/alicevision/QtAliceVision/pull/51 and https://github.com/alicevision/Meshroom/pull/2235.