Colmap Text export - pinhole option

RC’s COLMAP text export currently writes each image as FULL_OPENCV with trailing zero distortion parameters in cameras.txt, even when images are undistorted. This causes compatibility issues with tools like Brush and can crash COLMAP GUI without a project .ini. A quick workaround is to replace FULL_OPENCV with PINHOLE and remove the extra zeros in cameras.txt. A suggested improvement is for RC to offer a “PINHOLE” export option and deduplicate identical cameras, producing clean, ready-to-use COLMAP datasets without manual edits.

Hi, this is not exactly true. The export depends also on the used Prior lens distortion settings. If this is set as No lens distortion for undistorted images, then the exported Cameras.txt shows camera model as Simple_Pinhole.

Hi, yeah sorry I don’t think I was very clear in my explanation. There is an option to export the undistorted images with colmap format, however, the cameras.txt doesn’t use the pinhole option, it just uses a distortion flag, but offers no correction. I think it should be a pinhole flag instead. There are a couple of programs that cannot handle the empty and extra intrinsics in the file, and are unnecessary anyway, because the instructions should be simple pinhole, not a zero correction.

As you can see on the attached images, there is the SIMPLE_PINHOLE option for camera model in the exported cameras.txt file. And it is the same format as there. The params are empty for used and exported undistorted images. Should it be different or do you want just PINHOLE? Should be there also a 0 as a parameter according to you?

Sorry, I didn’t mean to confuse the subject further by mentioning simple pinhole as well as pinhole.

What I’m finding …

On export of colmap format and on attempt to import into Brush for Gaussian splatting, Brush says something about too many camera parameters. If I open the cameras.txt file, delete all the zeros and change all camera flags to “pinhole”, then everything imports and works fine.

I’m just wondering why when exporting undistorted images from RC, why it doesn’t just select the pinhole flag instead of setting it as a distorted camera, but with zero corrections? Seems that isn’t correct, but this is beyond my knowledge, so sorry if this is just none sense!!

PINHOLE/SIMPLE_PINHOLE is used if your images are undistorted a priori. When not, the other formats are used. To use the images as undistorted (when they are) you need to use the settings mentioned above (Prior: Fixed, Camera model: No lens distortion). Then the exported COLMAP has the wanted camera model.

Ok, thanks for the clarification.

So, rather than RC setting the colmap transforms to pinhole (when selecting the undistorted image export) the cameras.txt will say radial with zero lens corrections? Is that right?

When the images are undistorted a priori and applying that as a setting for the images, then the exported file has pinhole camera model directly. Otherwise as you wrote (which is following the COLMAP’s specification page).

Ok, thanks for the patience to explain. Cheers.