Skip to content

Commit c4b5da2

Browse files
authored
Merge pull request #125 from D31T4/main
Fix vggt_to_colmap images.bin output format
2 parents 3d56b6b + 3fc15ea commit c4b5da2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vggt_to_colmap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,9 @@ def write_colmap_images_bin(file_path, quaternions, translations, image_points2D
483483
# Camera ID (uint32)
484484
fid.write(struct.pack('<I', camera_id))
485485
# Image name
486-
fid.write(struct.pack('<I', len(image_name)))
487-
fid.write(image_name)
486+
for char in image_name:
487+
fid.write(struct.pack('<c', bytes([char])))
488+
fid.write(struct.pack('<c', b'\x00'))
488489

489490
# Write number of 2D points (uint64)
490491
fid.write(struct.pack('<Q', len(points)))

0 commit comments

Comments
 (0)