From 589856ecdcdbd93f87efa5067f15deb63c67990b Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Sat, 5 Sep 2020 01:16:51 +0200 Subject: [PATCH] Rename hdri into panoramaHdr --- bin/meshroom_photogrammetry | 18 +++++++++--------- meshroom/multiview.py | 18 +++++++++--------- meshroom/ui/app.py | 2 +- meshroom/ui/qml/main.qml | 8 ++++---- meshroom/ui/reconstruction.py | 12 ++++++------ 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/bin/meshroom_photogrammetry b/bin/meshroom_photogrammetry index 24477592..2959866b 100755 --- a/bin/meshroom_photogrammetry +++ b/bin/meshroom_photogrammetry @@ -10,7 +10,7 @@ meshroom.setupEnvironment() import meshroom.core.graph from meshroom import multiview -parser = argparse.ArgumentParser(description='Launch the full photogrammetry or HDRI pipeline.') +parser = argparse.ArgumentParser(description='Launch the full photogrammetry or Panorama HDR pipeline.') parser.add_argument('-i', '--input', metavar='SFM/FOLDERS/IMAGES', type=str, nargs='*', default=[], help='Input folder containing images or folders of images or file (.sfm or .json) ' @@ -19,8 +19,8 @@ parser.add_argument('-I', '--inputRecursive', metavar='FOLDERS/IMAGES', type=str default=[], help='Input folders containing all images recursively.') -parser.add_argument('-p', '--pipeline', metavar='photogrammetry/hdri/MG_FILE', type=str, default='photogrammetry', - help='"photogrammetry" pipeline, "hdri" pipeline or a Meshroom file containing a custom pipeline to run on input images. ' +parser.add_argument('-p', '--pipeline', metavar='photogrammetry/panoramaHdr/panoramaFisheyeHdr/MG_FILE', type=str, default='photogrammetry', + help='"photogrammetry" pipeline, "panotamaHdr" pipeline, "panotamaFisheyeHdr" pipeline or a Meshroom file containing a custom pipeline to run on input images. ' 'Requirements: the graph must contain one CameraInit node, ' 'and one Publish node if --output is set.') @@ -112,12 +112,12 @@ with multiview.GraphModification(graph): if args.pipeline.lower() == "photogrammetry": # default photogrammetry pipeline multiview.photogrammetry(inputViewpoints=views, inputIntrinsics=intrinsics, output=args.output, graph=graph) - elif args.pipeline.lower() == "hdri": - # default hdri pipeline - multiview.hdri(inputViewpoints=views, inputIntrinsics=intrinsics, output=args.output, graph=graph) - elif args.pipeline.lower() == "hdrifisheye": - # default hdriFisheye pipeline - multiview.hdriFisheye(inputViewpoints=views, inputIntrinsics=intrinsics, output=args.output, graph=graph) + elif args.pipeline.lower() == "panoramahdr": + # default panorama Hdr pipeline + multiview.panoramaHdr(inputViewpoints=views, inputIntrinsics=intrinsics, output=args.output, graph=graph) + elif args.pipeline.lower() == "panoramafisheyehdr": + # default panorama Fisheye Hdr pipeline + multiview.panoramaFisheyeHdr(inputViewpoints=views, inputIntrinsics=intrinsics, output=args.output, graph=graph) else: # custom pipeline graph.load(args.pipeline) diff --git a/meshroom/multiview.py b/meshroom/multiview.py index 4427a875..f9448f38 100644 --- a/meshroom/multiview.py +++ b/meshroom/multiview.py @@ -143,9 +143,9 @@ def findFilesByTypeInFolder(folder, recursive=False): return output -def hdri(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='', graph=None): +def panoramaHdr(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='', graph=None): """ - Create a new Graph with a complete HDRI pipeline. + Create a new Graph with a Panorama HDR pipeline. Args: inputImages (list of str, optional): list of image file paths @@ -156,9 +156,9 @@ def hdri(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='' Graph: the created graph """ if not graph: - graph = Graph('HDRI') + graph = Graph('PanoramaHDR') with GraphModification(graph): - nodes = hdriPipeline(graph) + nodes = panoramaHdrPipeline(graph) cameraInit = nodes[0] if inputImages: cameraInit.viewpoints.extend([{'path': image} for image in inputImages]) @@ -173,18 +173,18 @@ def hdri(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='' return graph -def hdriFisheye(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='', graph=None): +def panoramaFisheyeHdr(inputImages=None, inputViewpoints=None, inputIntrinsics=None, output='', graph=None): if not graph: - graph = Graph('HDRI-Fisheye') + graph = Graph('PanoramaFisheyeHDR') with GraphModification(graph): - hdri(inputImages, inputViewpoints, inputIntrinsics, output, graph) + panoramaHdr(inputImages, inputViewpoints, inputIntrinsics, output, graph) for panoramaInit in graph.nodesByType("PanoramaInit"): panoramaInit.attribute("useFisheye").value = True return graph -def hdriPipeline(graph): +def panoramaHdrPipeline(graph): """ - Instantiate an HDRI pipeline inside 'graph'. + Instantiate an PanoramaHDR pipeline inside 'graph'. Args: graph (Graph/UIGraph): the graph in which nodes should be instantiated diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 56502e7b..323cc1a5 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -69,7 +69,7 @@ class MeshroomApp(QApplication): help='Import images to reconstruct from specified folder and sub-folders.') parser.add_argument('-s', '--save', metavar='PROJECT.mg', type=str, default='', help='Save the created scene.') - parser.add_argument('-p', '--pipeline', metavar='MESHROOM_FILE/photogrammetry/hdri', type=str, default=os.environ.get("MESHROOM_DEFAULT_PIPELINE", "photogrammetry"), + parser.add_argument('-p', '--pipeline', metavar='MESHROOM_FILE/photogrammetry/panoramaHdr/panoramaFisheyeHdr', type=str, default=os.environ.get("MESHROOM_DEFAULT_PIPELINE", "photogrammetry"), help='Override the default Meshroom pipeline with this external graph.') parser.add_argument("--verbose", help="Verbosity level", default='warning', choices=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],) diff --git a/meshroom/ui/qml/main.qml b/meshroom/ui/qml/main.qml index c4249fbd..56a037fe 100755 --- a/meshroom/ui/qml/main.qml +++ b/meshroom/ui/qml/main.qml @@ -340,12 +340,12 @@ ApplicationWindow { onTriggered: ensureSaved(function() { _reconstruction.new("photogrammetry") }) } Action { - text: "HDRI" - onTriggered: ensureSaved(function() { _reconstruction.new("hdri") }) + text: "Panorama HDR" + onTriggered: ensureSaved(function() { _reconstruction.new("panoramahdr") }) } Action { - text: "HDRI Fisheye" - onTriggered: ensureSaved(function() { _reconstruction.new("hdriFisheye") }) + text: "Panorama Fisheye HDR" + onTriggered: ensureSaved(function() { _reconstruction.new("panoramahdrfisheyehdr") }) } } Action { diff --git a/meshroom/ui/reconstruction.py b/meshroom/ui/reconstruction.py index 54518b88..4b9f5aa0 100755 --- a/meshroom/ui/reconstruction.py +++ b/meshroom/ui/reconstruction.py @@ -484,12 +484,12 @@ class Reconstruction(UIGraph): if p.lower() == "photogrammetry": # default photogrammetry pipeline self.setGraph(multiview.photogrammetry()) - elif p.lower() == "hdri": - # default hdri pipeline - self.setGraph(multiview.hdri()) - elif p.lower() == "hdrifisheye": - # default hdri pipeline - self.setGraph(multiview.hdriFisheye()) + elif p.lower() == "panoramahdr": + # default panorama hdr pipeline + self.setGraph(multiview.panoramaHdr()) + elif p.lower() == "panoramafisheyehdr": + # default panorama fisheye hdr pipeline + self.setGraph(multiview.panoramaFisheyeHdr()) else: # use the user-provided default photogrammetry project file self.load(p, setupProjectFile=False)