mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
Merge pull request #103 from alicevision/dev_meshingMultiRes
Meshing: New multi-resolution depth maps fusion
This commit is contained in:
commit
fe87984a36
6 changed files with 189 additions and 43 deletions
|
@ -127,9 +127,12 @@ def mvsPipeline(graph, sfm=None):
|
||||||
depthMapFolder=depthMapFilter.depthMapFolder,
|
depthMapFolder=depthMapFilter.depthMapFolder,
|
||||||
depthMapFilterFolder=depthMapFilter.output,
|
depthMapFilterFolder=depthMapFilter.output,
|
||||||
ini=depthMapFilter.ini)
|
ini=depthMapFilter.ini)
|
||||||
|
meshFiltering = graph.addNewNode('MeshFiltering',
|
||||||
|
input=meshing.output)
|
||||||
texturing = graph.addNewNode('Texturing',
|
texturing = graph.addNewNode('Texturing',
|
||||||
ini=meshing.ini,
|
ini=meshing.ini,
|
||||||
inputDenseReconstruction=meshing.outputDenseReconstruction)
|
inputDenseReconstruction=meshing.outputDenseReconstruction,
|
||||||
|
inputMesh=meshFiltering.output)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
prepareDenseScene,
|
prepareDenseScene,
|
||||||
|
@ -137,6 +140,7 @@ def mvsPipeline(graph, sfm=None):
|
||||||
depthMap,
|
depthMap,
|
||||||
depthMapFilter,
|
depthMapFilter,
|
||||||
meshing,
|
meshing,
|
||||||
|
meshFiltering,
|
||||||
texturing
|
texturing
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,15 @@ class MeshDecimate(desc.CommandLineNode):
|
||||||
value=False,
|
value=False,
|
||||||
uid=[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 = [
|
outputs = [
|
||||||
|
|
|
@ -75,6 +75,15 @@ class MeshDenoising(desc.CommandLineNode):
|
||||||
exclusive=True,
|
exclusive=True,
|
||||||
uid=[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 = [
|
outputs = [
|
||||||
|
|
|
@ -14,11 +14,26 @@ class MeshFiltering(desc.CommandLineNode):
|
||||||
value='',
|
value='',
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='removeLargeTrianglesFactor',
|
||||||
|
label='Filter Large Triangles Factor',
|
||||||
|
description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.',
|
||||||
|
value=60.0,
|
||||||
|
range=(1.0, 100.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.BoolParam(
|
||||||
|
name='keepLargestMeshOnly',
|
||||||
|
label='Keep Only the Largest Mesh',
|
||||||
|
description='Keep only the largest connected triangles group.',
|
||||||
|
value=True,
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='iterations',
|
name='iterations',
|
||||||
label='Nb Iterations',
|
label='Nb Iterations',
|
||||||
description='',
|
description='',
|
||||||
value=10,
|
value=2,
|
||||||
range=(0, 50, 1),
|
range=(0, 50, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
|
@ -30,6 +45,15 @@ class MeshFiltering(desc.CommandLineNode):
|
||||||
range=(0.0, 10.0, 0.1),
|
range=(0.0, 10.0, 0.1),
|
||||||
uid=[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 = [
|
outputs = [
|
||||||
|
|
|
@ -62,6 +62,15 @@ class MeshResampling(desc.CommandLineNode):
|
||||||
value=False,
|
value=False,
|
||||||
uid=[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 = [
|
outputs = [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from meshroom.core import desc
|
from meshroom.core import desc
|
||||||
|
|
||||||
|
|
||||||
class Meshing(desc.CommandLineNode):
|
class Meshing(desc.CommandLineNode):
|
||||||
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
internalFolder = '{cache}/{nodeType}/{uid0}/'
|
||||||
commandLine = 'aliceVision_meshing {allParams}'
|
commandLine = 'aliceVision_meshing {allParams}'
|
||||||
|
@ -15,47 +16,6 @@ class Meshing(desc.CommandLineNode):
|
||||||
value='',
|
value='',
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
|
||||||
name='maxPts',
|
|
||||||
label='maxPts',
|
|
||||||
description='Max points',
|
|
||||||
value=6000000,
|
|
||||||
range=(500000, 30000000, 1000),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='maxPtsPerVoxel',
|
|
||||||
label='maxPtsPerVoxel',
|
|
||||||
description='Max points per voxel',
|
|
||||||
value=1000000,
|
|
||||||
range=(500000, 30000000, 1000),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.ChoiceParam(
|
|
||||||
name='partitioning',
|
|
||||||
label='Partitioning',
|
|
||||||
description='',
|
|
||||||
value='singleBlock',
|
|
||||||
values=('singleBlock', 'auto'),
|
|
||||||
exclusive=True,
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='smoothingIteration',
|
|
||||||
label='Smoothing Iteration',
|
|
||||||
description='Number of Smoothing Iterations',
|
|
||||||
value=10,
|
|
||||||
range=(0, 50, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.FloatParam(
|
|
||||||
name='smoothingWeight',
|
|
||||||
label='Smoothing Weight',
|
|
||||||
description='Smoothing Weight',
|
|
||||||
value=1.0,
|
|
||||||
range=(0, 2, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.File(
|
desc.File(
|
||||||
name="depthMapFolder",
|
name="depthMapFolder",
|
||||||
label='Depth Maps Folder',
|
label='Depth Maps Folder',
|
||||||
|
@ -70,6 +30,137 @@ class Meshing(desc.CommandLineNode):
|
||||||
value='',
|
value='',
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
|
desc.IntParam(
|
||||||
|
name='maxInputPoints',
|
||||||
|
label='Max Input Points',
|
||||||
|
description='Max input points loaded from depth map images.',
|
||||||
|
value=50000000,
|
||||||
|
range=(500000, 500000000, 1000),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.IntParam(
|
||||||
|
name='maxPoints',
|
||||||
|
label='Max Points',
|
||||||
|
description='Max points at the end of the depth maps fusion.',
|
||||||
|
value=5000000,
|
||||||
|
range=(100000, 10000000, 1000),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.IntParam(
|
||||||
|
name='maxPointsPerVoxel',
|
||||||
|
label='Max Points Per Voxel',
|
||||||
|
description='Max points per voxel',
|
||||||
|
value=1000000,
|
||||||
|
range=(500000, 30000000, 1000),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.IntParam(
|
||||||
|
name='minStep',
|
||||||
|
label='Min Step',
|
||||||
|
description='The step used to load depth values from depth maps is computed from maxInputPts. '
|
||||||
|
'Here we define the minimal value for this step, so on small datasets we will not spend '
|
||||||
|
'too much time at the beginning loading all depth values.',
|
||||||
|
value=2,
|
||||||
|
range=(1, 20, 1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.ChoiceParam(
|
||||||
|
name='partitioning',
|
||||||
|
label='Partitioning',
|
||||||
|
description='',
|
||||||
|
value='singleBlock',
|
||||||
|
values=('singleBlock', 'auto'),
|
||||||
|
exclusive=True,
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.ChoiceParam(
|
||||||
|
name='repartition',
|
||||||
|
label='Repartition',
|
||||||
|
description='',
|
||||||
|
value='multiResolution',
|
||||||
|
values=('multiResolution', 'regularGrid'),
|
||||||
|
exclusive=True,
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='angleFactor',
|
||||||
|
label='angleFactor',
|
||||||
|
description='angleFactor',
|
||||||
|
value=15.0,
|
||||||
|
range=(0.0, 200.0, 1.0),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='simFactor',
|
||||||
|
label='simFactor',
|
||||||
|
description='simFactor',
|
||||||
|
value=15.0,
|
||||||
|
range=(0.0, 200.0, 1.0),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='pixSizeMarginInitCoef',
|
||||||
|
label='pixSizeMarginInitCoef',
|
||||||
|
description='pixSizeMarginInitCoef',
|
||||||
|
value=2.0,
|
||||||
|
range=(0.0, 10.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='pixSizeMarginFinalCoef',
|
||||||
|
label='pixSizeMarginFinalCoef',
|
||||||
|
description='pixSizeMarginFinalCoef',
|
||||||
|
value=1.0,
|
||||||
|
range=(0.0, 10.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='voteMarginFactor',
|
||||||
|
label='voteMarginFactor',
|
||||||
|
description='voteMarginFactor',
|
||||||
|
value=4.0,
|
||||||
|
range=(0.1, 10.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='contributeMarginFactor',
|
||||||
|
label='contributeMarginFactor',
|
||||||
|
description='contributeMarginFactor',
|
||||||
|
value=2.0,
|
||||||
|
range=(0.0, 10.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='simGaussianSizeInit',
|
||||||
|
label='simGaussianSizeInit',
|
||||||
|
description='simGaussianSizeInit',
|
||||||
|
value=10.0,
|
||||||
|
range=(0.0, 50.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='simGaussianSize',
|
||||||
|
label='simGaussianSize',
|
||||||
|
description='simGaussianSize',
|
||||||
|
value=10.0,
|
||||||
|
range=(0.0, 50.0, 0.1),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.FloatParam(
|
||||||
|
name='minAngleThreshold',
|
||||||
|
label='minAngleThreshold',
|
||||||
|
description='minAngleThreshold',
|
||||||
|
value=1.0,
|
||||||
|
range=(0.0, 10.0, 0.01),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
desc.BoolParam(
|
||||||
|
name='refineFuse',
|
||||||
|
label='Refine Fuse',
|
||||||
|
description='Refine depth map fusion with the new pixels size defined by angle and similarity scores.',
|
||||||
|
value=True,
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
desc.ChoiceParam(
|
desc.ChoiceParam(
|
||||||
name='verboseLevel',
|
name='verboseLevel',
|
||||||
label='Verbose Level',
|
label='Verbose Level',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue