mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
Rename hdri into panoramaHdr
This commit is contained in:
parent
f20db3abe3
commit
589856ecdc
5 changed files with 29 additions and 29 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'],)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue