COLMAP export is broken for camera rigs (support for img subdirectories)

The latest COLMAP export option doesnt work for camera rigs.

Example dataset to download and try: GDrive


Repro steps:

input images have the same name but stored in different subdirectories, as seen here:

  • images
    • img1
      • image1.jpeg
      • image2.jpeg
    • img2
      • image1.jpeg
      • image2.jpeg

Drag and drop the images folder in RS, align, and export COLMAP. Image undistort (OFF), and export images (ON or OFF, both have issues).


Proposed Solution

The issue can be fixed by writing the image subdirectories into the images.txt file.

Currently, it’s (notice the Image1.jpeg in the last line)

Image list with two lines of data per image:
IMAGE_ID, QW, QX, QY, QZ, TX, TY, TZ, CAMERA_ID, NAME
POINTS2D[ ] as (X, Y, POINT3D_ID)
Number of images: 4
1 0.9876865345934064 -0.1466633181505287 -5.396150068141813e-002 -7.303214097507367e-003 4.017992861634165 8.302859773270768 12.35944206354738 3 image1.jpeg

but it should be (notice the added subdir by the Image1.jpeg in the last line)

Image list with two lines of data per image:
IMAGE_ID, QW, QX, QY, QZ, TX, TY, TZ, CAMERA_ID, NAME
POINTS2D[ ] as (X, Y, POINT3D_ID)
Number of images: 4
1 0.9876865345934064 -0.1466633181505287 -5.396150068141813e-002 -7.303214097507367e-003 4.017992861634165 8.302859773270768 12.35944206354738 3 img1/image1.jpeg