Skip to content

Commit

Permalink
Merge pull request #768 from alicevision/dev/imageMatchingMethods
Browse files Browse the repository at this point in the history
Add methods in ImageMatching and features in StructureFromMotion and FeatureMatching
  • Loading branch information
fabiencastan authored Feb 4, 2020
2 parents 84bd825 + 4afa3c5 commit 5e5cc7b
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 11 deletions.
18 changes: 18 additions & 0 deletions meshroom/nodes/aliceVision/FeatureMatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ class FeatureMatching(desc.CommandLineNode):
uid=[0],
advanced=True,
),
desc.FloatParam(
name='knownPosesGeometricErrorMax',
label='Known Poses Geometric Error Max',
description='Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n'
'If set to 0 it lets the ACRansac select an optimal value.',
value=5.0,
range=(0.0, 100.0, 1.0),
uid=[0],
advanced=True,
),
desc.IntParam(
name='maxMatches',
label='Max Matches',
Expand All @@ -140,6 +150,14 @@ class FeatureMatching(desc.CommandLineNode):
value=False,
uid=[0],
),
desc.BoolParam(
name='matchFromKnownCameraPoses',
label='Match From Known Camera Poses',
description='Enable the usage of geometric information from known camera poses to guide the feature matching.\n'
'If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.',
value=False,
uid=[0],
),
desc.BoolParam(
name='exportDebugFiles',
label='Export Debug Files',
Expand Down
30 changes: 24 additions & 6 deletions meshroom/nodes/aliceVision/ImageMatching.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0"
__version__ = "1.1"

import os
from meshroom.core import desc
Expand Down Expand Up @@ -28,24 +28,33 @@ class ImageMatching(desc.CommandLineNode):
label="Features Folders",
description="Folder(s) containing the extracted features and descriptors."
),
desc.ChoiceParam(
name='method',
label='Method',
description='Method used to select the image pairs to match.',
value='VocabularyTree',
values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'],
exclusive=True,
uid=[0],
),
desc.File(
name='tree',
label='Tree',
label='Voc Tree: Tree',
description='Input name for the vocabulary tree file.',
value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[],
),
desc.File(
name='weights',
label='Weights',
label='Voc Tree: 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],
advanced=True,
),
desc.IntParam(
name='minNbImages',
label='Minimal Number of Images',
label='Voc Tree: 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.',
value=200,
range=(0, 500, 1),
Expand All @@ -54,7 +63,7 @@ class ImageMatching(desc.CommandLineNode):
),
desc.IntParam(
name='maxDescriptors',
label='Max Descriptors',
label='Voc Tree: Max Descriptors',
description='Limit the number of descriptors you load per image. Zero means no limit.',
value=500,
range=(0, 100000, 1),
Expand All @@ -63,13 +72,22 @@ class ImageMatching(desc.CommandLineNode):
),
desc.IntParam(
name='nbMatches',
label='Nb Matches',
label='Voc Tree: Nb Matches',
description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).',
value=50,
range=(0, 1000, 1),
uid=[0],
advanced=True,
),
desc.IntParam(
name='nbNeighbors',
label='Sequential: Nb Neighbors',
description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).',
value=50,
range=(0, 1000, 1),
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
Expand Down
28 changes: 23 additions & 5 deletions meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,25 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
label="Features Folders",
description="Folder(s) containing the extracted features and descriptors."
),
desc.ChoiceParam(
name='method',
label='Method',
description='Method used to select the image pairs to match.',
value='VocabularyTree',
values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree','Exhaustive','Frustum'],
exclusive=True,
uid=[0],
),
desc.File(
name='tree',
label='Tree',
label='Voc Tree: Tree',
description='Input name for the vocabulary tree file.',
value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[],
),
desc.File(
name='weights',
label='Weights',
label='Voc Tree: 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],
Expand All @@ -62,7 +71,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
),
desc.IntParam(
name='minNbImages',
label='Minimal Number of Images',
label='Voc Tree: 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.',
value=200,
range=(0, 500, 1),
Expand All @@ -71,7 +80,7 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
),
desc.IntParam(
name='maxDescriptors',
label='Max Descriptors',
label='Voc Tree: Max Descriptors',
description='Limit the number of descriptors you load per image. Zero means no limit.',
value=500,
range=(0, 100000, 1),
Expand All @@ -80,13 +89,22 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
),
desc.IntParam(
name='nbMatches',
label='Nb Matches',
label='Voc Tree: Nb Matches',
description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).',
value=50,
range=(0, 1000, 1),
uid=[0],
advanced=True,
),
desc.IntParam(
name='nbNeighbors',
label='Sequential: Nb Neighbors',
description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).',
value=50,
range=(0, 1000, 1),
uid=[0],
advanced=True,
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
Expand Down
17 changes: 17 additions & 0 deletions meshroom/nodes/aliceVision/StructureFromMotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ class StructureFromMotion(desc.CommandLineNode):
range=(0, 50000, 1),
uid=[0],
),
desc.IntParam(
name='minNumberOfMatches',
label='Minimum Number of Matches',
description='Minimum number of matches per image pair (and per feature type). \n'
'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.',
value=0,
range=(0, 50000, 1),
uid=[0],
),
desc.IntParam(
name='minInputTrackLength',
label='Min Input Track Length',
Expand Down Expand Up @@ -207,6 +216,14 @@ class StructureFromMotion(desc.CommandLineNode):
value=False,
uid=[0],
),
desc.BoolParam(
name='filterTrackForks',
label='Filter Track Forks',
description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n'
'lead to multiple features in the same image for a single track. \n',
value=True,
uid=[0],
),
desc.File(
name='initialPairA',
label='Initial Pair A',
Expand Down

0 comments on commit 5e5cc7b

Please sign in to comment.