Skip to content

Commit

Permalink
Merge pull request #2556 from alicevision/dev/generateDepth
Browse files Browse the repository at this point in the history
Generate depthmaps from sfmData and mesh
  • Loading branch information
fabiencastan authored Oct 17, 2024
2 parents ea92b72 + 4c76564 commit d296e6c
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
60 changes: 60 additions & 0 deletions meshroom/nodes/aliceVision/DepthMapRendering.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
__version__ = "1.0"

from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL


class DepthMapRendering(desc.AVCommandLineNode):
commandLine = "aliceVision_depthMapRendering {allParams}"

category = "Utils"
documentation = """
Using camera parameters and mesh, render depthmaps for each view
"""

inputs = [
desc.File(
name="input",
label="Input SfMData",
description="Input SfMData file.",
value="",
),
desc.File(
name="mesh",
label="Input Mesh",
description="Input mesh file.",
value="",
),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
values=VERBOSE_LEVEL,
value="info",
),
]

outputs = [
desc.File(
name="output",
label="Folder",
description="Output folder.",
value=desc.Node.internalFolder,
),
desc.File(
name="depth",
label="Depth Maps",
description="Rendered depth maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_depthMap.exr",
group="", # do not export on the command line
),
desc.File(
name="mask",
label="Masks",
description="Masks.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_mask.exr",
group="", # do not export on the command line
),
]
52 changes: 52 additions & 0 deletions meshroom/nodes/aliceVision/NormalMapRendering.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
__version__ = "1.0"

from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL


class NormalMapRendering(desc.AVCommandLineNode):
commandLine = "aliceVision_normalMapRendering {allParams}"

category = "Utils"
documentation = """
Using camera parameters and mesh, render normalmaps for each view
"""

inputs = [
desc.File(
name="input",
label="Input SfMData",
description="Input SfMData file.",
value="",
),
desc.File(
name="mesh",
label="Input Mesh",
description="Input mesh file.",
value="",
),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
values=VERBOSE_LEVEL,
value="info",
),
]

outputs = [
desc.File(
name="output",
label="Folder",
description="Output folder.",
value=desc.Node.internalFolder,
),
desc.File(
name="normal",
label="Normal Maps",
description="Rendered normal maps.",
semantic="image",
value=desc.Node.internalFolder + "<VIEW_ID>_normalMap.exr",
group="", # do not export on the command line
),
]

0 comments on commit d296e6c

Please sign in to comment.