[nodes] split Panorama into PanoramaEstimation and PanoramaStitching

This commit is contained in:
Fabien Castan 2019-09-18 12:40:23 +02:00
parent 0cdb1932b7
commit fad4d537a6
2 changed files with 97 additions and 5 deletions

View file

@ -6,8 +6,8 @@ import os
from meshroom.core import desc
class Panorama(desc.CommandLineNode):
commandLine = 'aliceVision_panorama {allParams}'
class PanoramaEstimation(desc.CommandLineNode):
commandLine = 'aliceVision_panoramaEstimation {allParams}'
size = desc.DynamicNodeSize('input')
inputs = [
@ -53,6 +53,14 @@ class Panorama(desc.CommandLineNode):
uid=[0],
joinChar=',',
),
desc.IntParam(
name='orientation',
label='Orientation',
description='Orientation',
value=0,
range=(0, 6, 1),
uid=[0],
),
desc.ChoiceParam(
name='rotationAveraging',
label='Rotation Averaging Method',
@ -63,6 +71,7 @@ class Panorama(desc.CommandLineNode):
value='L2_minimization',
exclusive=True,
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='relativeRotation',
@ -74,6 +83,7 @@ class Panorama(desc.CommandLineNode):
value='essential_matrix',
exclusive=True,
uid=[0],
advanced=True,
),
desc.BoolParam(
name='lockAllIntrinsics',
@ -83,6 +93,7 @@ class Panorama(desc.CommandLineNode):
'This may be helpful if the input cameras are already fully calibrated.',
value=False,
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='verboseLevel',
@ -92,7 +103,7 @@ class Panorama(desc.CommandLineNode):
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True,
uid=[],
)
),
]
outputs = [
@ -107,7 +118,7 @@ class Panorama(desc.CommandLineNode):
name='outSfMDataFilename',
label='Output SfMData File',
description='Path to the output sfmdata file',
value=desc.Node.internalFolder + 'SfmData.abc',
value=desc.Node.internalFolder + 'sfmData.abc',
uid=[],
),
]
]

View file

@ -0,0 +1,81 @@
__version__ = "1.0"
import json
import os
from meshroom.core import desc
class PanoramaStitching(desc.CommandLineNode):
commandLine = 'aliceVision_panoramaStitching {allParams}'
size = desc.DynamicNodeSize('input')
inputs = [
desc.File(
name='input',
label='Input',
description="SfM Data File",
value='',
uid=[0],
),
desc.ChoiceParam(
name='outputFileType',
label='Output File Type',
description='Output file type for the undistorted images.',
value='exr',
values=['jpg', 'png', 'tif', 'exr'],
exclusive=True,
uid=[0],
group='', # not part of allParams, as this is not a parameter for the command line
),
desc.FloatParam(
name='scaleFactor',
label='Scale Factor',
description='Scale factor to resize the output resolution (e.g. 0.5 for downscaling to half resolution).',
value=0.2,
range=(0.0, 2.0, 0.1),
uid=[0],
),
desc.BoolParam(
name='fisheyeMasking',
label='Enable Fisheye Masking',
description='For fisheye images, skip the invalid pixels on the borders.',
value=False,
uid=[0],
),
desc.FloatParam(
name='fisheyeMaskingMargin',
label='Fisheye Masking Margin',
description='Margin for fisheye images.',
value=0.05,
range=(0.0, 0.5, 0.01),
uid=[0],
),
desc.FloatParam(
name='transitionSize',
label='Transition Size',
description='Size of the transition between images (in pixels).',
value=10.0,
range=(0.0, 100.0, 1.0),
uid=[0],
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
description='Verbosity level (fatal, error, warning, info, debug, trace).',
value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True,
uid=[],
)
]
outputs = [
desc.File(
name='output',
label='Output Panorama',
description='',
value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}',
uid=[],
),
]