Skip to content

Commit ddc5b29

Browse files
committed
[bin] meshroom_photogrammetry: args.input is optional
1 parent b0b06fd commit ddc5b29

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

bin/meshroom_photogrammetry

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@ views, intrinsics = [], []
7373
# Build image files list from inputImages arguments
7474
images = [f for f in args.inputImages if multiview.isImageFile(f)]
7575

76-
if os.path.isdir(args.input):
77-
# args.input is a folder: extend images list with images in that folder
78-
images += multiview.findImageFiles(args.input)
79-
elif os.path.isfile(args.input) and os.path.splitext(args.input)[-1] in ('.json', '.sfm'):
80-
# args.input is a sfmData file: setup pre-calibrated views and intrinsics
81-
from meshroom.nodes.aliceVision.CameraInit import readSfMData
82-
views, intrinsics = readSfMData(args.input)
83-
else:
84-
raise RuntimeError(args.input + ': format not supported')
76+
if args.input:
77+
if os.path.isdir(args.input):
78+
# args.input is a folder: extend images list with images in that folder
79+
images += multiview.findImageFiles(args.input)
80+
elif os.path.isfile(args.input) and os.path.splitext(args.input)[-1] in ('.json', '.sfm'):
81+
# args.input is a sfmData file: setup pre-calibrated views and intrinsics
82+
from meshroom.nodes.aliceVision.CameraInit import readSfMData
83+
views, intrinsics = readSfMData(args.input)
84+
else:
85+
raise RuntimeError(args.input + ': format not supported.')
8586

8687
# initialize photogrammetry pipeline
8788
if args.pipeline:

0 commit comments

Comments
 (0)