Skip to content

Commit

Permalink
Merge pull request #1284 from alicevision/dev/graphCutPostProcessing
Browse files Browse the repository at this point in the history
[nodes] Meshing: More control on graph cut post processing
  • Loading branch information
fabiencastan authored Feb 19, 2021
2 parents 5ee1ebd + 7be1aac commit 06244a7
Showing 1 changed file with 128 additions and 15 deletions.
143 changes: 128 additions & 15 deletions meshroom/nodes/aliceVision/Meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,29 +295,77 @@ class Meshing(desc.CommandLineNode):
uid=[0],
advanced=True,
),
desc.FloatParam(
name='minSolidAngleRatio',
label='minSolidAngleRatio',
description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.',
value=0.2,
range=(0.0, 0.5, 0.01),
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],
advanced=True,
),
desc.IntParam(
name='nbSolidAngleFilteringIterations',
label='Nb Solid Angle Filtering Iterations',
description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.',
value=2,
range=(0, 30, 1),
name='helperPointsGridSize',
label='Helper Points Grid Size',
description='Grid Size for the helper points.',
value=10,
range=(0, 50, 1),
uid=[0],
advanced=True,
),
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,
name='densify',
label='Densify',
description='Densify scene with helper points around vertices.',
value=False,
uid=[],
advanced=True,
group='',
),
desc.IntParam(
name='densifyNbFront',
label='Densify: Front',
description='Densify vertices: front.',
value=1,
range=(0, 5, 1),
uid=[0],
advanced=True,
enabled=lambda node: node.densify.value,
),
desc.IntParam(
name='densifyNbBack',
label='Densify: Back',
description='Densify vertices: back.',
value=1,
range=(0, 5, 1),
uid=[0],
advanced=True,
enabled=lambda node: node.densify.value,
),
desc.FloatParam(
name='densifyScale',
label='Densify Scale',
description='Scale between points used to densify the scene.',
value=20.0,
range=(0.0, 10.0, 0.1),
uid=[0],
advanced=True,
enabled=lambda node: node.densify.value,
),
desc.FloatParam(
name='nPixelSizeBehind',
label='Nb Pixel Size Behind',
description='Number of pixel size units to vote behind the vertex as FULL status.',
value=4.0,
range=(0.0, 10.0, 0.1),
uid=[0],
advanced=True,
),
desc.FloatParam(
name='fullWeight',
label='Full Weight',
description='Weighting for full status.',
value=1.0,
range=(0.0, 10.0, 0.1),
uid=[0],
advanced=True,
),
Expand All @@ -336,6 +384,33 @@ class Meshing(desc.CommandLineNode):
uid=[0],
advanced=True,
),
desc.IntParam(
name='invertTetrahedronBasedOnNeighborsNbIterations',
label='Tretrahedron Neighbors Coherency Nb Iterations',
description='Invert cells status around surface to improve smoothness. Zero to disable.',
value=10,
range=(0, 30, 1),
uid=[0],
advanced=True,
),
desc.FloatParam(
name='minSolidAngleRatio',
label='minSolidAngleRatio',
description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.',
value=0.2,
range=(0.0, 0.5, 0.01),
uid=[0],
advanced=True,
),
desc.IntParam(
name='nbSolidAngleFilteringIterations',
label='Nb Solid Angle Filtering Iterations',
description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.',
value=2,
range=(0, 30, 1),
uid=[0],
advanced=True,
),
desc.BoolParam(
name='colorizeOutput',
label='Colorize Output',
Expand All @@ -348,6 +423,36 @@ class Meshing(desc.CommandLineNode):
label='Add Mask Helper Points',
description='Add Helper points on the outline of the depth maps masks.',
value=False,
uid=[],
advanced=True,
group='',
),
desc.FloatParam(
name='maskHelperPointsWeight',
label='Mask Helper Points Weight',
description='Weight value for mask helper points. Zero means no helper point.',
value=1.0,
range=(0.0, 20.0, 1.0),
uid=[0],
advanced=True,
enabled=lambda node: node.addMaskHelperPoints.value,
),
desc.IntParam(
name='maskBorderSize',
label='Mask Border Size',
description='How many pixels on mask borders?',
value=4,
range=(0, 20, 1),
uid=[0],
advanced=True,
enabled=lambda node: node.addMaskHelperPoints.value,
),
desc.IntParam(
name='maxNbConnectedHelperPoints',
label='Helper Points: Max Segment Size',
description='Maximum size of a segment of connected helper points before we remove it. Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes. 0 means that we remove all helper points. -1 means that we do not filter helper points at all.',
value=50,
range=(-1, 100, 1),
uid=[0],
advanced=True,
),
Expand All @@ -359,6 +464,14 @@ class Meshing(desc.CommandLineNode):
uid=[],
advanced=True,
),
desc.BoolParam(
name='exportDebugTetrahedralization',
label='Export DEBUG Tetrahedralization',
description='Export debug cells score as tetrahedral mesh.\nWARNING: Could create HUGE meshes, only use on very small datasets.',
value=False,
uid=[],
advanced=True,
),
desc.IntParam(
name='seed',
label='Seed',
Expand Down

0 comments on commit 06244a7

Please sign in to comment.