mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-11 15:21:59 +02:00
[multiview] add arguments to directly provide input images to the pipeline
This commit is contained in:
parent
46f6865a25
commit
2e035d5a7a
2 changed files with 5 additions and 6 deletions
|
@ -27,10 +27,7 @@ if not args.output and not args.save:
|
||||||
print('Nothing to do. You need to set --output or --save.')
|
print('Nothing to do. You need to set --output or --save.')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
graph = multiview.photogrammetryPipeline()
|
graph = multiview.photogrammetryPipeline(inputFolder=args.input)
|
||||||
if args.input:
|
|
||||||
cameraInit = graph.findNode("CameraInit")
|
|
||||||
cameraInit.imageDirectory.value = args.input
|
|
||||||
|
|
||||||
if args.save:
|
if args.save:
|
||||||
graph.save(args.save)
|
graph.save(args.save)
|
||||||
|
|
|
@ -3,10 +3,12 @@ import os
|
||||||
from .core.graph import Graph
|
from .core.graph import Graph
|
||||||
|
|
||||||
|
|
||||||
def photogrammetryPipeline():
|
def photogrammetryPipeline(inputFolder='', inputImages=[], inputViewpoints=[]):
|
||||||
# type: () -> Graph
|
# type: () -> Graph
|
||||||
graph = Graph('pipeline')
|
graph = Graph('pipeline')
|
||||||
cameraInit = graph.addNewNode('CameraInit')
|
cameraInit = graph.addNewNode('CameraInit', imageDirectory=inputFolder)
|
||||||
|
cameraInit.viewpoints.value = [{'image': image, 'focal': -1} for image in inputImages]
|
||||||
|
cameraInit.viewpoints.extend(inputViewpoints)
|
||||||
featureExtraction = graph.addNewNode('FeatureExtraction',
|
featureExtraction = graph.addNewNode('FeatureExtraction',
|
||||||
input=cameraInit.outputSfm)
|
input=cameraInit.outputSfm)
|
||||||
imageMatching = graph.addNewNode('ImageMatching',
|
imageMatching = graph.addNewNode('ImageMatching',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue