colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.49k stars 96 forks source link

GLOMAP fails with a database initialized with known FULL_OPENCV calibration #82

Open alejandrofontan opened 2 months ago

alejandrofontan commented 2 months ago

I'm creating a COLMAP database with a FULL_OPENCV model:

    colmap feature_extractor \
    --database_path ${database} \
    --image_path ${rgb_path} \
    --ImageReader.camera_model ${calibration_model} \
    --ImageReader.single_camera 1 \
    --ImageReader.single_camera_per_folder 1 \
    --SiftExtraction.use_gpu ${use_gpu} \
    --ImageReader.camera_params "${fx}, ${fy}, ${cx}, ${cy}, ${k1}, ${k2}, ${p1}, ${p2}, ${k3}, ${k4}, ${k5}, ${k6}"

and using GLOMAP mapper:

glomap mapper \
    --database_path ${database} \
    --image_path ${rgb_path} \
    --output_path ${exp_folder_colmap} \
    --skip_view_graph_calibration 1 \
    --BundleAdjustment.optimize_intrinsics 0

The reconstruction works well when I use a PINHOLE model, however fails catastrophically when a provide a FULL_OPENCV model. Could you help me debug how can I provide the calibration to glomap without optimizing it?

Thanks!

ichsan2895 commented 2 months ago

I think this PR maybe solve your problem. https://github.com/colmap/glomap/pull/54

alejandrofontan commented 2 months ago

I've just noticed that PoseLib currently only supports: SIMPLE_PINHOLE, PINHOLE, SIMPLE_RADIAL, RADIAL, OPENCV and OPENCV_FISHEYE.

And not FULL_OPENCV.