Skip to content

Support for dual-camera datasets (stereo/multi-camera reconstruction) #473

@DuVogel87

Description

@DuVogel87

Hello,

I would like to ask how to use dual-camera datasets with HLOC.
In my case, I have two cameras capturing images simultaneously (stereo setup).

With tools like COLMAP or Agisoft Metashape, handling such datasets works fine, but for HLOC I couldn’t find any documentation or examples regarding multi-camera support.

Question

  • How can I reconstruct images captured from two cameras simultaneously with HLOC?
  • Is there a recommended workflow for multi-camera systems (e.g., stereo rigs), or do I need to adapt the pipeline manually?

This is the pipeline I currently use (paths are kept generic here):

# Feature extraction
python -m hloc.extract_features \
    --conf superpoint_aachen \
    --image_dir path/to/images \
    --export_dir path/to/outputs/sfm/

# Image retrieval and pair selection
python -m hloc.extract_features \
    --conf netvlad \
    --image_dir path/to/images \
    --export_dir path/to/outputs/sfm/

python -m hloc.pairs_from_retrieval \
    --descriptors path/to/outputs/sfm/global-feats-netvlad.h5 \
    --output path/to/outputs/sfm/pairs-netvlad.txt \
    --num_matched 5

# Feature matching
python -m hloc.match_features \
    --conf superglue \
    --pairs path/to/outputs/sfm/pairs-netvlad.txt \
    --features feats-superpoint-n4096-r1024 \
    --export_dir path/to/outputs/sfm/

# SfM reconstruction
python -m hloc.reconstruction \
    --sfm_dir path/to/outputs/sfm/sfm_superpoint+superglue \
    --image_dir path/to/images \
    --pairs path/to/outputs/sfm/pairs-netvlad.txt \
    --features path/to/outputs/sfm/feats-superpoint-n4096-r1024.h5 \
    --matches path/to/outputs/sfm/feats-superpoint-n4096-r1024_matches-superglue_pairs-netvlad.h5

# Example for fisheye
python -m hloc.reconstruction \
    --sfm_dir path/to/outputs/sfm/sfm_superpoint+superglue \
    --image_dir path/to/images \
    --pairs path/to/outputs/sfm/pairs-netvlad.txt \
    --features path/to/outputs/sfm/feats-superpoint-n4096-r1024.h5 \
    --matches path/to/outputs/sfm/feats-superpoint-n4096-r1024_matches-superglue_pairs-netvlad.h5 \
    --camera_mode SINGLE \
    --image_options camera_model="'OPENCV_FISHEYE'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions