Describe the bug
When running colmap image_undistorter with --max_image_size on a reconstruction whose cameras are already pinhole models (e.g. PINHOLE or SIMPLE_PINHOLE), the camera resolution stored in the output reconstruction is not rescaled. The images themselves may be resized, but the camera intrinsics in cameras.bin/cameras.txt retain the original resolution.
Root Cause:
In UndistortReconstruction() (src/colmap/image/undistortion.cc), cameras for which IsUndistorted() returns true are skipped entirely
To Reproduce
Have a reconstruction with PINHOLE or SIMPLE_PINHOLE cameras at a high resolution (e.g. 4000×3000).
Run colmap image_undistorter --max_image_size 1000 ....
Inspect the output cameras.bin — the camera width/height are unchanged from the original.
Expected behavior
The camera intrinsics in the output reconstruction should be rescaled to match --max_image_size, consistent with the behavior for distorted cameras.
Environment:
- OS: Linux
- COLMAP Version: main
Describe the bug
When running colmap image_undistorter with --max_image_size on a reconstruction whose cameras are already pinhole models (e.g. PINHOLE or SIMPLE_PINHOLE), the camera resolution stored in the output reconstruction is not rescaled. The images themselves may be resized, but the camera intrinsics in cameras.bin/cameras.txt retain the original resolution.
Root Cause:
In UndistortReconstruction() (src/colmap/image/undistortion.cc), cameras for which IsUndistorted() returns true are skipped entirely
To Reproduce
Have a reconstruction with PINHOLE or SIMPLE_PINHOLE cameras at a high resolution (e.g. 4000×3000).
Run colmap image_undistorter --max_image_size 1000 ....
Inspect the output cameras.bin — the camera width/height are unchanged from the original.
Expected behavior
The camera intrinsics in the output reconstruction should be rescaled to match --max_image_size, consistent with the behavior for distorted cameras.
Environment: