mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-30 17:36:33 +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.')
|
||||
exit(1)
|
||||
|
||||
graph = multiview.photogrammetryPipeline()
|
||||
if args.input:
|
||||
cameraInit = graph.findNode("CameraInit")
|
||||
cameraInit.imageDirectory.value = args.input
|
||||
graph = multiview.photogrammetryPipeline(inputFolder=args.input)
|
||||
|
||||
if args.save:
|
||||
graph.save(args.save)
|
||||
|
|
|
@ -3,10 +3,12 @@ import os
|
|||
from .core.graph import Graph
|
||||
|
||||
|
||||
def photogrammetryPipeline():
|
||||
def photogrammetryPipeline(inputFolder='', inputImages=[], inputViewpoints=[]):
|
||||
# type: () -> Graph
|
||||
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',
|
||||
input=cameraInit.outputSfm)
|
||||
imageMatching = graph.addNewNode('ImageMatching',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue