mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-30 21:09:58 +08:00
realitycapture: allow periods within filename, not only for file extension (#1649)
allow periods within filename, not only for file extension
This commit is contained in:
1 parent
9b99802042
commit
2c79d9fe52
1 file changed
+2
-2
@@ -60,7 +60,7 @@ def realitycapture_to_json(
|
|||||||
cameras.setdefault(column, []).append(value)
|
cameras.setdefault(column, []).append(value)
|
||||||
|
|
||||||
for name in cameras["#name"]:
|
for name in cameras["#name"]:
|
||||||
camera_label = name.split(".")[0]
|
camera_label = name.rpartition(".")[0]
|
||||||
if camera_label in image_filename_map:
|
if camera_label in image_filename_map:
|
||||||
img = np.array(Image.open(output_dir / image_filename_map[camera_label]))
|
img = np.array(Image.open(output_dir / image_filename_map[camera_label]))
|
||||||
break
|
break
|
||||||
@@ -73,7 +73,7 @@ def realitycapture_to_json(
|
|||||||
missing_image_data = 0
|
missing_image_data = 0
|
||||||
|
|
||||||
for i, name in enumerate(cameras["#name"]):
|
for i, name in enumerate(cameras["#name"]):
|
||||||
basename = name.split(".")[0]
|
basename = name.rpartition(".")[0]
|
||||||
if basename not in image_filename_map:
|
if basename not in image_filename_map:
|
||||||
if verbose:
|
if verbose:
|
||||||
CONSOLE.print(f"Missing image for camera data {basename}, Skipping")
|
CONSOLE.print(f"Missing image for camera data {basename}, Skipping")
|
||||||
|
|||||||
Reference in new issue
Block a user