colmap
colmap copied to clipboard
Rig Bundle Adjustment Crashes with std::out_of_range Exception
Describe the bug The COLMAP mapper crashes during the Rig Bundle Adjustment phase with an "std::out_of_range" exception. This occurs when attempting to access an element in an unordered map using the at() method, this maybe cased by not all images are registered in the reconstruction or not all registered images is in snapshots?
log
Camera rig configuration
==============================================================================
I20240906 09:09:09.592996 922107 misc.cc:205]
Estimating relative rig poses
-----------------------------
I20240906 09:09:09.593307 922107 misc.cc:205]
Camera Rig 1
------------
I20240906 09:09:09.593312 922107 sfm.cc:663] Cameras: 2
I20240906 09:09:09.593315 922107 sfm.cc:664] Snapshots: 3511
I20240906 09:09:09.593443 922107 misc.cc:198]
==============================================================================
Rig bundle adjustment
==============================================================================
terminate called after throwing an instance of 'std::out_of_range'
what(): unordered_map::at
*** Aborted at 1725584957 (unix time) try "date -d @1725584957" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGABRT (@0x3e9000e11fb) received by PID 922107 (TID 0x7c61f7d53000) from PID 922107; stack trace: ***
@ 0x7c61fb9e8206 (unknown)
@ 0x7c61f9a45320 (unknown)
@ 0x7c61f9a9eb1c pthread_kill
@ 0x7c61f9a4526e gsignal
@ 0x7c61f9a288ff abort
@ 0x7c61f9ea5ffe (unknown)
@ 0x7c61f9ebae9c (unknown)
@ 0x7c61f9ea5a49 std::terminate()
@ 0x7c61f9ebb128 __cxa_throw
@ 0x7c61f9ea93d8 std::__throw_out_of_range()
@ 0x5df6094eb08b colmap::RigBundleAdjuster::AddImageToProblem()
@ 0x5df6094eba5a colmap::RigBundleAdjuster::SetUpProblem()
@ 0x5df6094ec197 colmap::RigBundleAdjuster::Solve()
@ 0x5df608ed1ed7 colmap::RunRigBundleAdjuster()
@ 0x5df608eb8ad7 main
@ 0x7c61f9a2a1ca (unknown)
@ 0x7c61f9a2a28b __libc_start_main
@ 0x5df608ebdd55 _start
Aborted (core dumped)
ERROR:root:Mapper failed with code 34304. Exiting.
rig config
[
{
"ref_camera_id": 3,
"cameras": [
{
"camera_id": 3,
"image_prefix": "R/"
},
{
"camera_id": 2,
"image_prefix": "L/"
}
]
}
]
To Reproduce
Expected behavior Instead of crashing, the COLMAP mapper should handle cases where not all images are registered gracefully.
Environment:
- OS: ubuntu 24.04
- COLMAP Version:https://github.com/colmap/colmap/tree/4ccfeb55e6548a2d15636796e42e1df292c073c5
- Capture Device : GoPro