Merge pull request #135 from alicevision/dev_sfmOptions

Add support for AliceVision dev_sfmOptions branch
This commit is contained in:
Fabien Castan 2018-07-02 16:15:34 +02:00 committed by GitHub
commit 6e815c5d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 377 additions and 231 deletions

View file

@ -81,16 +81,15 @@ def sfmPipeline(graph):
input=cameraInit.output) input=cameraInit.output)
imageMatching = graph.addNewNode('ImageMatching', imageMatching = graph.addNewNode('ImageMatching',
input=featureExtraction.input, input=featureExtraction.input,
featuresFolder=featureExtraction.output, featuresFolders=[featureExtraction.output])
)
featureMatching = graph.addNewNode('FeatureMatching', featureMatching = graph.addNewNode('FeatureMatching',
input=imageMatching.input, input=imageMatching.input,
featuresFolder=imageMatching.featuresFolder, featuresFolders=imageMatching.featuresFolders,
imagePairsList=imageMatching.output) imagePairsList=imageMatching.output)
structureFromMotion = graph.addNewNode('StructureFromMotion', structureFromMotion = graph.addNewNode('StructureFromMotion',
input=featureMatching.input, input=featureMatching.input,
featuresFolder=featureMatching.featuresFolder, featuresFolders=featureMatching.featuresFolders,
matchesFolder=featureMatching.output) matchesFolders=[featureMatching.output])
return [ return [
cameraInit, cameraInit,
featureExtraction, featureExtraction,
@ -163,16 +162,16 @@ def sfmAugmentation(graph, sourceSfm, withMVS=False):
input=cameraInit.output) input=cameraInit.output)
imageMatchingMulti = graph.addNewNode('ImageMatchingMultiSfM', imageMatchingMulti = graph.addNewNode('ImageMatchingMultiSfM',
input=featureExtraction.input, input=featureExtraction.input,
featuresFolder=featureExtraction.output featuresFolders=[featureExtraction.output]
) )
featureMatching = graph.addNewNode('FeatureMatching', featureMatching = graph.addNewNode('FeatureMatching',
input=imageMatchingMulti.outputCombinedSfM, input=imageMatchingMulti.outputCombinedSfM,
featuresFolder=imageMatchingMulti.featuresFolder, featuresFolders=imageMatchingMulti.featuresFolders,
imagePairsList=imageMatchingMulti.output) imagePairsList=imageMatchingMulti.output)
structureFromMotion = graph.addNewNode('StructureFromMotion', structureFromMotion = graph.addNewNode('StructureFromMotion',
input=featureMatching.input, input=featureMatching.input,
featuresFolder=featureMatching.featuresFolder, featuresFolders=featureMatching.featuresFolders,
matchesFolder=featureMatching.output) matchesFolders=[featureMatching.output])
graph.addEdge(sourceSfm.output, imageMatchingMulti.inputB) graph.addEdge(sourceSfm.output, imageMatchingMulti.inputB)
sfmNodes = [ sfmNodes = [

View file

@ -63,6 +63,13 @@ class CameraInit(desc.CommandLineNode):
description="Camera Intrinsics", description="Camera Intrinsics",
group="", group="",
), ),
desc.File(
name='sensorDatabase',
label='Sensor Database',
description='''Camera sensor width database path.''',
value=os.environ.get('ALICEVISION_SENSOR_DB', ''),
uid=[],
),
desc.FloatParam( desc.FloatParam(
name='defaultFieldOfView', name='defaultFieldOfView',
label='Default Field Of View', label='Default Field Of View',
@ -71,13 +78,6 @@ class CameraInit(desc.CommandLineNode):
range=(0, 180.0, 1), range=(0, 180.0, 1),
uid=[0], uid=[0],
), ),
desc.File(
name='sensorDatabase',
label='Sensor Database',
description='''Camera sensor width database path.''',
value=os.environ.get('ALICEVISION_SENSOR_DB', ''),
uid=[],
),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
@ -92,7 +92,7 @@ class CameraInit(desc.CommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output SfMData File',
description='''Output SfMData.''', description='''Output SfMData.''',
value='{cache}/{nodeType}/{uid0}/cameraInit.sfm', value='{cache}/{nodeType}/{uid0}/cameraInit.sfm',
uid=[], uid=[],
@ -136,6 +136,7 @@ class CameraInit(desc.CommandLineNode):
# Reload result of aliceVision_cameraInit # Reload result of aliceVision_cameraInit
cameraInitSfM = node.output.value cameraInitSfM = node.output.value
jsonData = open(cameraInitSfM, 'r').read() jsonData = open(cameraInitSfM, 'r').read()
jsonData = jsonData.decode('utf8', errors='ignore')
data = json.loads(jsonData) data = json.loads(jsonData)
intrinsicsKeys = [i.name for i in Intrinsic] intrinsicsKeys = [i.name for i in Intrinsic]

View file

@ -39,8 +39,8 @@ class CameraLocalization(desc.CommandLineNode):
name='matchDescTypes', name='matchDescTypes',
label='Match Desc Types', label='Match Desc Types',
description='''Describer types to use for the matching.''', description='''Describer types to use for the matching.''',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
@ -48,9 +48,9 @@ class CameraLocalization(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name='preset',
label='Preset', label='Preset',
description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''',
value='NORMAL', value='normal',
values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], values=['low', 'medium', 'normal', 'high', 'ultra'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
@ -212,10 +212,10 @@ class CameraLocalization(desc.CommandLineNode):
uid=[], uid=[],
), ),
desc.File( desc.File(
name='outputBinary', name='outputJSON',
label='Output Binary', label='Output JSON',
description='''Filename for the localization results (raw data) as .bin''', description='''Filename for the localization results as .json''',
value='{cache}/{nodeType}/{uid0}/trackedCameras.bin', value='{cache}/{nodeType}/{uid0}/trackedCameras.json',
uid=[], uid=[],
), ),
] ]

View file

@ -46,9 +46,8 @@ class CameraRigCalibration(desc.CommandLineNode):
name='matchDescTypes', name='matchDescTypes',
label='Match Describer Types', label='Match Describer Types',
description='''The describer types to use for the matching''', description='''The describer types to use for the matching''',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
'AKAZE_OCV'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
@ -56,9 +55,9 @@ class CameraRigCalibration(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name='preset',
label='Preset', label='Preset',
description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''',
value='NORMAL', value='normal',
values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], values=['low', 'medium', 'normal', 'high', 'ultra'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),

View file

@ -46,9 +46,8 @@ class CameraRigLocalization(desc.CommandLineNode):
name='matchDescTypes', name='matchDescTypes',
label='Match Describer Types', label='Match Describer Types',
description='''The describer types to use for the matching''', description='''The describer types to use for the matching''',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
'AKAZE_OCV'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
@ -56,9 +55,9 @@ class CameraRigLocalization(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='preset', name='preset',
label='Preset', label='Preset',
description='''Preset for the feature extractor when localizing a new image {LOW,MEDIUM,NORMAL,HIGH,ULTRA}''', description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''',
value='NORMAL', value='normal',
values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], values=['low', 'medium', 'normal', 'high', 'ultra'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),

View file

@ -20,7 +20,7 @@ class ConvertAnimatedCamera(desc.CommandLineNode):
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output',
description='''Path to the output Alembic file.''', description='Path to the output Alembic file.',
value='{cache}/{nodeType}/{uid0}/animatedCamera.abc', value='{cache}/{nodeType}/{uid0}/animatedCamera.abc',
uid=[], uid=[],
), ),

View file

@ -10,16 +10,16 @@ class ConvertSfMFormat(desc.CommandLineNode):
desc.File( desc.File(
name='input', name='input',
label='Input', label='Input',
description='''SfMData file.''', description='SfMData file.',
value='', value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='fileExt', name='fileExt',
label='SfM File Format', label='SfM File Format',
description='''SfM File Format''', description='SfM File Format',
value='abc', value='abc',
values=['abc', 'sfm', 'ply', 'bin', 'json'], values=['abc', 'sfm', 'json', 'ply', 'baf'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
group='', # exclude from command line group='', # exclude from command line
@ -27,42 +27,42 @@ class ConvertSfMFormat(desc.CommandLineNode):
desc.BoolParam( desc.BoolParam(
name='views', name='views',
label='Views', label='Views',
description='''Export views.''', description='Export views.',
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='intrinsics', name='intrinsics',
label='Intrinsics', label='Intrinsics',
description='''Export intrinsics.''', description='Export intrinsics.',
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='extrinsics', name='extrinsics',
label='Extrinsics', label='Extrinsics',
description='''Export extrinsics.''', description='Export extrinsics.',
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='structure', name='structure',
label='Structure', label='Structure',
description='''Export structure.''', description='Export structure.',
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='observations', name='observations',
label='Observations', label='Observations',
description='''Export observations.''', description='Export observations.',
value=True, value=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description='verbosity level (fatal, error, warning, info, debug, trace).',
value='info', value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True, exclusive=True,
@ -74,7 +74,7 @@ class ConvertSfMFormat(desc.CommandLineNode):
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output',
description='''Path to the output SfM Data file.''', description='Path to the output SfM Data file.',
value='{cache}/{nodeType}/{uid0}/sfm.{fileExtValue}', value='{cache}/{nodeType}/{uid0}/sfm.{fileExtValue}',
uid=[], uid=[],
), ),

View file

@ -0,0 +1,42 @@
from meshroom.core import desc
class ExportAnimatedCamera(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'aliceVision_exportAnimatedCamera {allParams}'
inputs = [
desc.File(
name='input',
label='Input SfMData',
description='SfMData file containing a complete SfM.',
value='',
uid=[0],
),
desc.File(
name='filter',
label='SfMData Filter',
description='A SfMData file use as filter.',
value='',
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 filename',
description='Output filename for the alembic animated camera.',
value='{cache}/{nodeType}/{uid0}/camera.abc',
uid=[],
),
]

View file

@ -0,0 +1,43 @@
from meshroom.core import desc
class ExportUndistortedImages(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'aliceVision_exportUndistortedImages {allParams}'
inputs = [
desc.File(
name='input',
label='Input SfMData',
description='SfMData file containing a complete SfM.',
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],
),
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 Folder',
description='Output folder for the undistorted images.',
value='{cache}/{nodeType}/{uid0}/',
uid=[],
),
]

View file

@ -13,16 +13,16 @@ class FeatureExtraction(desc.CommandLineNode):
desc.File( desc.File(
name='input', name='input',
label='Input', label='Input',
description='''SfMData file.''', description='SfMData file.',
value='', value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='describerTypes', name='describerTypes',
label='Describer Types', label='Describer Types',
description='''Describer types used to describe an image.''', description='Describer types used to describe an image.',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
@ -30,30 +30,23 @@ class FeatureExtraction(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='describerPreset', name='describerPreset',
label='Describer Preset', label='Describer Preset',
description='''Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration 'ultra' can take long time !''', description='Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration "ultra" can take long time !',
value='NORMAL', value='normal',
values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'], values=['low', 'medium', 'normal', 'high', 'ultra'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.BoolParam(
name='upright',
label='Upright',
description='''Upright feature.''',
value=False,
uid=[0],
),
desc.BoolParam( desc.BoolParam(
name='forceCpuExtraction', name='forceCpuExtraction',
label='Force CPU Extraction', label='Force CPU Extraction',
description='''Use only CPU feature extraction.''', description='Use only CPU feature extraction.',
value=True, value=True,
uid=[], uid=[],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description='verbosity level (fatal, error, warning, info, debug, trace).',
value='info', value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True, exclusive=True,
@ -64,8 +57,8 @@ class FeatureExtraction(desc.CommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output Folder',
description='''Output path for the features and descriptors files (*.feat, *.desc).''', description='Output path for the features and descriptors files (*.feat, *.desc).',
value='{cache}/{nodeType}/{uid0}/', value='{cache}/{nodeType}/{uid0}/',
uid=[], uid=[],
), ),

View file

@ -13,49 +13,39 @@ class FeatureMatching(desc.CommandLineNode):
desc.File( desc.File(
name='input', name='input',
label='Input', label='Input',
description='''SfMData file.''', description='SfMData file.',
value='', value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ListAttribute(
name='geometricModel', elementDesc=desc.File(
label='Geometric Model', name="featuresFolder",
description='Geometric validation method to filter features matches:\n' label="Features Folder",
' * f: fundamental matrix\n' description="",
' * e: essential matrix\n' value="",
' * h: homography matrix\n' uid=[0],
' * hg: homography growing\n' ),
' * none: no geometric filtering', name="featuresFolders",
value='f', label="Features Folders",
values=['f', 'e', 'h', 'hg', 'none'], description="Folder(s) containing the extracted features and descriptors."
exclusive=True, ),
desc.File(
name='imagePairsList',
label='Image Pairs List',
description='Path to a file which contains the list of image pairs to match.',
value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='describerTypes', name='describerTypes',
label='Describer Types', label='Describer Types',
description='''Describer types used to describe an image.''', description='Describer types used to describe an image.',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
'AKAZE_OCV'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
), ),
desc.File(
name='featuresFolder',
label='Features Folder',
description='''Path to a folder containing the extracted features.''',
value='',
uid=[0],
),
desc.File(
name='imagePairsList',
label='Image Pairs List',
description='''Path to a file which contains the list of image pairs to match.''',
value='',
uid=[0],
),
desc.ChoiceParam( desc.ChoiceParam(
name='photometricMatchingMethod', name='photometricMatchingMethod',
label='Photometric Matching Method', label='Photometric Matching Method',
@ -74,30 +64,30 @@ class FeatureMatching(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='geometricEstimator', name='geometricEstimator',
label='Geometric Estimator', label='Geometric Estimator',
description='''Geometric estimator: * acransac: A-Contrario Ransac * loransac: LO-Ransac (only available for fundamental matrix)''', description='Geometric estimator: (acransac: A-Contrario Ransac, loransac: LO-Ransac (only available for "fundamental_matrix" model)',
value='acransac', value='acransac',
values=['acransac', 'loransac'], values=['acransac', 'loransac'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.ChoiceParam(
name='savePutativeMatches', name='geometricFilterType',
label='Save Putative Matches', label='Geometric Filter Type',
description='''putative matches.''', description='Geometric validation method to filter features matches: \n'
value=False, ' * fundamental_matrix\n'
uid=[0], ' * essential_matrix\n'
), ' * homography_matrix\n'
desc.BoolParam( ' * homography_growing\n'
name='guidedMatching', ' * no_filtering',
label='Guided Matching', value='fundamental_matrix',
description='''the found model to improve the pairwise correspondences.''', values=['fundamental_matrix', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'],
value=False, exclusive=True,
uid=[0], uid=[0],
), ),
desc.FloatParam( desc.FloatParam(
name='distanceRatio', name='distanceRatio',
label='Distance Ratio', label='Distance Ratio',
description='''Distance ratio to discard non meaningful matches.''', description='Distance ratio to discard non meaningful matches.',
value=0.8, value=0.8,
range=(0.0, 1.0, 0.01), range=(0.0, 1.0, 0.01),
uid=[0], uid=[0],
@ -105,42 +95,55 @@ class FeatureMatching(desc.CommandLineNode):
desc.IntParam( desc.IntParam(
name='maxIteration', name='maxIteration',
label='Max Iteration', label='Max Iteration',
description='''Maximum number of iterations allowed in ransac step.''', description='Maximum number of iterations allowed in ransac step.',
value=2048, value=2048,
range=(1, 20000, 1), range=(1, 20000, 1),
uid=[0], uid=[0],
), ),
desc.IntParam(
name='maxMatches',
label='Max Matches',
description='Maximum number of matches to keep.',
value=0,
range=(0, 10000, 1),
uid=[0],
),
desc.BoolParam(
name='savePutativeMatches',
label='Save Putative Matches',
description='putative matches.',
value=False,
uid=[0],
),
desc.BoolParam(
name='guidedMatching',
label='Guided Matching',
description='the found model to improve the pairwise correspondences.',
value=False,
uid=[0],
),
desc.BoolParam( desc.BoolParam(
name='exportDebugFiles', name='exportDebugFiles',
label='Export Debug Files', label='Export Debug Files',
description='''debug files (svg, dot).''', description='debug files (svg, dot).',
value=False, value=False,
uid=[], uid=[],
), ),
desc.IntParam(
name='maxMatches',
label='Max Matches',
description='''Maximum number pf matches to keep.''',
value=0,
range=(0, 10000, 1),
uid=[0],
),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description='verbosity level (fatal, error, warning, info, debug, trace).',
value='info', value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output Folder',
description='''Path to a folder in which computed matches will be stored.''', description='Path to a folder in which computed matches will be stored.',
value='{cache}/{nodeType}/{uid0}/', value='{cache}/{nodeType}/{uid0}/',
uid=[], uid=[],
), ),

View file

@ -12,28 +12,40 @@ class ImageMatching(desc.CommandLineNode):
desc.File( desc.File(
name='input', name='input',
label='Input', label='Input',
description='''SfMData file .''', description='SfMData file .',
value='', value='',
uid=[0], uid=[0],
), ),
desc.File( desc.ListAttribute(
name='featuresFolder', elementDesc=desc.File(
label='Features Folder', name="featuresFolder",
description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''', label="Features Folder",
value='', description="",
value="",
uid=[0], uid=[0],
), ),
name="featuresFolders",
label="Features Folders",
description="Folder(s) containing the extracted features and descriptors."
),
desc.File( desc.File(
name='tree', name='tree',
label='Tree', label='Tree',
description='''Input name for the vocabulary tree file.''', description='Input name for the vocabulary tree file.',
value=os.environ.get('ALICEVISION_VOCTREE', ''), value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[0], uid=[0],
), ),
desc.File(
name='weights',
label='Weights',
description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.',
value='',
uid=[0],
),
desc.IntParam( desc.IntParam(
name='minNbImages', name='minNbImages',
label='Minimal Number of Images', label='Minimal Number of Images',
description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.',
value=200, value=200,
range=(0, 500, 1), range=(0, 500, 1),
uid=[0], uid=[0],
@ -41,7 +53,7 @@ class ImageMatching(desc.CommandLineNode):
desc.IntParam( desc.IntParam(
name='maxDescriptors', name='maxDescriptors',
label='Max Descriptors', label='Max Descriptors',
description='''Limit the number of descriptors you load per image. Zero means no limit.''', description='Limit the number of descriptors you load per image. Zero means no limit.',
value=500, value=500,
range=(0, 100000, 1), range=(0, 100000, 1),
uid=[0], uid=[0],
@ -49,22 +61,15 @@ class ImageMatching(desc.CommandLineNode):
desc.IntParam( desc.IntParam(
name='nbMatches', name='nbMatches',
label='Nb Matches', label='Nb Matches',
description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).',
value=50, value=50,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
), ),
desc.File(
name='weights',
label='Weights',
description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''',
value='',
uid=[0],
),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description='verbosity level (fatal, error, warning, info, debug, trace).',
value='info', value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True, exclusive=True,
@ -75,8 +80,8 @@ class ImageMatching(desc.CommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output List File',
description='''Filepath to the output file with the list of selected image pairs.''', description='Filepath to the output file with the list of selected image pairs.',
value='{cache}/{nodeType}/{uid0}/imageMatches.txt', value='{cache}/{nodeType}/{uid0}/imageMatches.txt',
uid=[], uid=[],
), ),

View file

@ -13,44 +13,56 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
desc.File( desc.File(
name='input', name='input',
label='Input A', label='Input A',
description='''SfMData file .''', description='SfMData file .',
value='', value='',
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='inputB', name='inputB',
label='Input B', label='Input B',
description='''SfMData file .''', description='SfMData file .',
value='',
uid=[0],
),
desc.ListAttribute(
elementDesc=desc.File(
name="featuresFolder",
label="Features Folder",
description="",
value="",
uid=[0],
),
name="featuresFolders",
label="Features Folders",
description="Folder(s) containing the extracted features and descriptors."
),
desc.File(
name='tree',
label='Tree',
description='Input name for the vocabulary tree file.',
value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[0],
),
desc.File(
name='weights',
label='Weights',
description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.',
value='', value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='modeMultiSfM', name='modeMultiSfM',
label='Multiple SfM mode', label='Multiple SfM mode',
description='''Image matching multiple SfM mode. "a_ab" for images in input SfMData A plus between A and B. "a_b" for images between input SfMData A and B''', description='Image matching multiple SfM mode.\n"a_ab" for images in input SfMData A plus between A and B.\n"a_b" for images between input SfMData A and B.',
value='a_ab', value='a_ab',
values=['a_ab', 'a_b'], values=['a_ab', 'a_b'],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.File(
name='featuresFolder',
label='Features Folder',
description='''Folder containing the extracted features and descriptors. By default, it is the folder containing the SfMData.''',
value='',
uid=[0],
),
desc.File(
name='tree',
label='Tree',
description='''Input name for the vocabulary tree file.''',
value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[0],
),
desc.IntParam( desc.IntParam(
name='minNbImages', name='minNbImages',
label='Minimal Number of Images', label='Minimal Number of Images',
description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''', description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.',
value=200, value=200,
range=(0, 500, 1), range=(0, 500, 1),
uid=[0], uid=[0],
@ -58,7 +70,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
desc.IntParam( desc.IntParam(
name='maxDescriptors', name='maxDescriptors',
label='Max Descriptors', label='Max Descriptors',
description='''Limit the number of descriptors you load per image. Zero means no limit.''', description='Limit the number of descriptors you load per image. Zero means no limit.',
value=500, value=500,
range=(0, 100000, 1), range=(0, 100000, 1),
uid=[0], uid=[0],
@ -66,22 +78,15 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
desc.IntParam( desc.IntParam(
name='nbMatches', name='nbMatches',
label='Nb Matches', label='Nb Matches',
description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''', description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).',
value=50, value=50,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
), ),
desc.File(
name='weights',
label='Weights',
description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''',
value='',
uid=[0],
),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description='verbosity level (fatal, error, warning, info, debug, trace).',
value='info', value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True, exclusive=True,
@ -92,15 +97,15 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output', label='Output List File',
description='''Filepath to the output file with the list of selected image pairs.''', description='Filepath to the output file with the list of selected image pairs.',
value='{cache}/{nodeType}/{uid0}/imageMatches.txt', value='{cache}/{nodeType}/{uid0}/imageMatches.txt',
uid=[], uid=[],
), ),
desc.File( desc.File(
name='outputCombinedSfM', name='outputCombinedSfM',
label='Output Combined SfM', label='Output Combined SfM',
description='''Path for the combined SfMData file''', description='Path for the combined SfMData file',
value='{cache}/{nodeType}/{uid0}/combineSfM.sfm', value='{cache}/{nodeType}/{uid0}/combineSfM.sfm',
uid=[], uid=[],
), ),

View file

@ -35,9 +35,9 @@ class SfMTransform(desc.CommandLineNode):
desc.ChoiceParam( desc.ChoiceParam(
name='landmarksDescriberTypes', name='landmarksDescriberTypes',
label='Landmarks Describer Types', label='Landmarks Describer Types',
description='''Image describer types used to compute the mean of the point cloud. (only for 'landmarks' method)''', description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).',
value=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], value=['sift', 'akaze'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'], values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',

View file

@ -17,39 +17,48 @@ class StructureFromMotion(desc.CommandLineNode):
value='', value='',
uid=[0], uid=[0],
), ),
desc.File( desc.ListAttribute(
name='featuresFolder', elementDesc=desc.File(
label='Features Folder', name="featuresFolder",
description='Path to a folder containing the extracted features.', label="Features Folder",
value='', description="",
value="",
uid=[0], uid=[0],
), ),
desc.File( name="featuresFolders",
name='matchesFolder', label="Features Folders",
label='Matches Folder', description="Folder(s) containing the extracted features and descriptors."
description='Path to a folder in which computed matches are stored.', ),
value='', desc.ListAttribute(
elementDesc=desc.File(
name="matchesFolder",
label="Matches Folder",
description="",
value="",
uid=[0], uid=[0],
), ),
name="matchesFolders",
label="Matches Folders",
description="Folder(s) in which computed matches are stored."
),
desc.ChoiceParam( desc.ChoiceParam(
name='describerTypes', name='describerTypes',
label='Describer Types', label='Describer Types',
description='Describer types used to describe an image.', description='Describer types used to describe an image.',
value=['SIFT'], value=['sift'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
'AKAZE_OCV'],
exclusive=False, exclusive=False,
uid=[0], uid=[0],
joinChar=',', joinChar=',',
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='interFileExtension', name='localizerEstimator',
label='Inter File Extension', label='Localizer Estimator',
description='Extension of the intermediate file export.', description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).',
value='.abc', value='acransac',
values=('.abc', '.ply'), values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'],
exclusive=True, exclusive=True,
uid=[], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='useLocalBA', name='useLocalBA',
@ -67,13 +76,14 @@ class StructureFromMotion(desc.CommandLineNode):
range=(2, 10, 1), range=(2, 10, 1),
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.IntParam(
name='localizerEstimator', name='maxNumberOfMatches',
label='Localizer Estimator', label='Maximum Number of Matches',
description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', description='Maximum number of matches per image pair (and per feature type). \n'
value='acransac', 'This can be useful to have a quick reconstruction overview. \n'
values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], '0 means no limit.',
exclusive=True, value=0,
range=(0, 50000, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
@ -95,16 +105,54 @@ class StructureFromMotion(desc.CommandLineNode):
range=(2, 10, 1), range=(2, 10, 1),
uid=[0], uid=[0],
), ),
desc.IntParam( desc.FloatParam(
name='maxNumberOfMatches', name='minAngleForTriangulation',
label='Maximum Number of Matches', label='Min Angle For Triangulation',
description='Maximum number of matches per image pair (and per feature type). \n' description='Minimum angle for triangulation.',
'This can be useful to have a quick reconstruction overview. \n' value=3.0,
'0 means no limit.', range=(0.1, 10, 0.1),
value=0,
range=(0, 50000, 1),
uid=[0], uid=[0],
), ),
desc.FloatParam(
name='minAngleForLandmark',
label='Min Angle For Landmark',
description='Minimum angle for landmark.',
value=2.0,
range=(0.1, 10, 0.1),
uid=[0],
),
desc.FloatParam(
name='maxReprojectionError',
label='Max Reprojection Error',
description='Maximum reprojection error.',
value=4.0,
range=(0.1, 10, 0.1),
uid=[0],
),
desc.FloatParam(
name='minAngleInitialPair',
label='Min Angle Initial Pair',
description='Minimum angle for the initial pair.',
value=5.0,
range=(0.1, 10, 0.1),
uid=[0],
),
desc.FloatParam(
name='maxAngleInitialPair',
label='Max Angle Initial Pair',
description='Maximum angle for the initial pair.',
value=40.0,
range=(0.1, 60, 0.1),
uid=[0],
),
desc.BoolParam(
name='useOnlyMatchesFromInputFolder',
label='Use Only Matches From Input Folder',
description='Use only matches from the input matchesFolder parameter.\n'
'Matches folders previously added to the SfMData file will be ignored.',
value=False,
uid=[],
),
desc.File( desc.File(
name='initialPairA', name='initialPairA',
label='Initial Pair A', label='Initial Pair A',
@ -119,6 +167,15 @@ class StructureFromMotion(desc.CommandLineNode):
value='', value='',
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name='interFileExtension',
label='Inter File Extension',
description='Extension of the intermediate file export.',
value='.abc',
values=('.abc', '.ply'),
exclusive=True,
uid=[],
),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name='verboseLevel',
label='Verbose Level', label='Verbose Level',
@ -133,21 +190,21 @@ class StructureFromMotion(desc.CommandLineNode):
outputs = [ outputs = [
desc.File( desc.File(
name='output', name='output',
label='Output SfM data file', label='Output SfMData File',
description='Path to the output sfmdata file', description='Path to the output sfmdata file',
value='{cache}/{nodeType}/{uid0}/sfm.abc', value='{cache}/{nodeType}/{uid0}/sfm.abc',
uid=[], uid=[],
), ),
desc.File( desc.File(
name='outputViewsAndPoses', name='outputViewsAndPoses',
label='Output SfM data file', label='Output SfMData File',
description='''Path to the output sfmdata file with cameras (views and poses).''', description='''Path to the output sfmdata file with cameras (views and poses).''',
value='{cache}/{nodeType}/{uid0}/cameras.sfm', value='{cache}/{nodeType}/{uid0}/cameras.sfm',
uid=[], uid=[],
), ),
desc.File( desc.File(
name='extraInfoFolder', name='extraInfoFolder',
label='Output', label='Output Folder',
description='Folder for intermediate reconstruction files and additional reconstruction information files.', description='Folder for intermediate reconstruction files and additional reconstruction information files.',
value='{cache}/{nodeType}/{uid0}/', value='{cache}/{nodeType}/{uid0}/',
uid=[], uid=[],