cvg / Hierarchical-Localization

Visual localization made easy with hloc
Apache License 2.0
3.07k stars 571 forks source link

using hloc for reconstruct with existed matches #269

Open ronhaim311 opened 1 year ago

ronhaim311 commented 1 year ago

Hello, if I already have images and matches between them, can I use the hloc to build and reconstruct 3D model? if I can so how? I saw it has a stage for feature extraction, but I have already the matches ready for reconstruction, can I skip this stage?

sarlinpe commented 1 year ago

Sorry for the late reply. You'd need to write keypoints to a feature h5 file and matches between them to another h5 files. Then you can call hloc.reconstruction. See the loading functions for more details on the format:

features:

{
  image_name: {
    'keypoints': array with shape Nx2 
  },
}

matches:

{
  image_name_1/image_name_2: {
    'matches': array with shape N, where N is the number of keypoints in image 1
  },
}