mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-09 06:11:59 +02:00
Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only.
127 lines
4.4 KiB
Python
127 lines
4.4 KiB
Python
__version__ = "1.0"
|
|
|
|
import json
|
|
import os
|
|
|
|
from meshroom.core import desc
|
|
|
|
|
|
class GlobalSfM(desc.AVCommandLineNode):
|
|
commandLine = 'aliceVision_globalSfM {allParams}'
|
|
size = desc.DynamicNodeSize('input')
|
|
|
|
category = 'Sparse Reconstruction'
|
|
documentation = '''
|
|
Performs the Structure-From-Motion with a global approach.
|
|
It is known to be faster but less robust to challenging datasets than the Incremental approach.
|
|
'''
|
|
|
|
inputs = [
|
|
desc.File(
|
|
name="input",
|
|
label="SfMData",
|
|
description="Input SfMData file.",
|
|
value="",
|
|
uid=[0],
|
|
),
|
|
desc.ListAttribute(
|
|
elementDesc=desc.File(
|
|
name="featuresFolder",
|
|
label="Features Folder",
|
|
description="Folder containing some extracted features.",
|
|
value="",
|
|
uid=[0],
|
|
),
|
|
name="featuresFolders",
|
|
label="Features Folders",
|
|
description="Folder(s) containing the extracted features."
|
|
),
|
|
desc.ListAttribute(
|
|
elementDesc=desc.File(
|
|
name="matchesFolder",
|
|
label="Matches Folder",
|
|
description="Folder containing some computed matches.",
|
|
value="",
|
|
uid=[0],
|
|
),
|
|
name="matchesFolders",
|
|
label="Matches Folders",
|
|
description="Folder(s) in which computed matches are stored."
|
|
),
|
|
desc.ChoiceParam(
|
|
name="describerTypes",
|
|
label="Describer Types",
|
|
description="Describer types used to describe an image.",
|
|
value=["dspsift"],
|
|
values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4",
|
|
"sift_ocv", "akaze_ocv"],
|
|
exclusive=False,
|
|
uid=[0],
|
|
joinChar=",",
|
|
),
|
|
desc.ChoiceParam(
|
|
name="rotationAveraging",
|
|
label="Rotation Averaging Method",
|
|
description="Method for rotation averaging:\n"
|
|
" - L1 minimization\n"
|
|
" - L2 minimization",
|
|
values=["L1_minimization", "L2_minimization"],
|
|
value="L2_minimization",
|
|
exclusive=True,
|
|
uid=[0],
|
|
),
|
|
desc.ChoiceParam(
|
|
name="translationAveraging",
|
|
label="Translation Averaging Method",
|
|
description="Method for translation averaging:\n"
|
|
" - L1 minimization\n"
|
|
" - L2 minimization of sum of squared Chordal distances\n"
|
|
" - L1 soft minimization",
|
|
values=["L1_minimization", "L2_minimization", "L1_soft_minimization"],
|
|
value="L1_soft_minimization",
|
|
exclusive=True,
|
|
uid=[0],
|
|
),
|
|
desc.BoolParam(
|
|
name="lockAllIntrinsics",
|
|
label="Lock All Intrinsic Camera Parameters",
|
|
description="Force to keep all the intrinsics parameters of the cameras (focal length, \n"
|
|
"principal point, distortion if any) constant during the reconstruction.\n"
|
|
"This may be helpful if the input cameras are already fully calibrated.",
|
|
value=False,
|
|
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="SfMData",
|
|
description="Path to the output SfMData file.",
|
|
value=desc.Node.internalFolder + "sfm.abc",
|
|
uid=[],
|
|
),
|
|
desc.File(
|
|
name="outputViewsAndPoses",
|
|
label="Output Poses",
|
|
description="Path to the output SfMData file with cameras (views and poses).",
|
|
value=desc.Node.internalFolder + "cameras.sfm",
|
|
uid=[],
|
|
),
|
|
desc.File(
|
|
name="extraInfoFolder",
|
|
label="Folder",
|
|
description="Folder for intermediate reconstruction files and additional reconstruction information files.",
|
|
value=desc.Node.internalFolder,
|
|
uid=[],
|
|
),
|
|
]
|