[ui] new pipeline hdriFisheye

Setup the 2 fisheye options on LDRToHDR and PanoramaInit nodes.
This commit is contained in:
Fabien Castan 2020-03-20 17:57:16 +01:00
parent e88651ba01
commit 7b8405c5f6
3 changed files with 17 additions and 0 deletions

View file

@ -117,6 +117,16 @@ def hdri(inputImages=list(), inputViewpoints=list(), inputIntrinsics=list(), out
return graph
def hdriFisheye(inputImages=list(), inputViewpoints=list(), inputIntrinsics=list(), output='', graph=None):
if not graph:
graph = Graph('HDRI-Fisheye')
with GraphModification(graph):
hdri(inputImages, inputViewpoints, inputIntrinsics, output, graph)
for ldrToHdr in graph.nodesByType("LDRToHDR"):
ldrToHdr.attribute("fisheyeLens").value = True
for panoramaInit in graph.nodesByType("PanoramaInit"):
panoramaInit.attribute("useFisheye").value = True
return graph
def hdriPipeline(graph):
"""

View file

@ -343,6 +343,10 @@ ApplicationWindow {
text: "HDRI"
onTriggered: ensureSaved(function() { _reconstruction.new("hdri") })
}
Action {
text: "HDRI Fisheye"
onTriggered: ensureSaved(function() { _reconstruction.new("hdriFisheye") })
}
}
Action {
id: openActionItem

View file

@ -426,6 +426,9 @@ class Reconstruction(UIGraph):
elif p.lower() == "hdri":
# default hdri pipeline
self.setGraph(multiview.hdri())
elif p.lower() == "hdrifisheye":
# default hdri pipeline
self.setGraph(multiview.hdriFisheye())
else:
# use the user-provided default photogrammetry project file
self.load(p, setupProjectFile=False)