Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions meshroom/aliceVision/MeshResection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
__version__ = "1.0"

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


class MeshResection(desc.CommandLineNode):

category = "Utils"

commandLine = 'aliceVision_meshResection {allParams}'
size = desc.DynamicNodeSize('input')

inputs = [
desc.File(
name="input",
label="SfmData",
description="SfMData file input",
exposed=True,
value=""
),
desc.File(
name="mesh",
label="Reference Mesh",
description="Reference mesh file input",
exposed=True,
value="",

commandLineGroup = ''
),
desc.ShapeList(
name="observations",
label="Observations",
description="Keyable observations (3D + 2D).",

shape=desc.SurveyPoint(
name="point",
label="Point",
description="A 3d+2d point",
keyable=True,
keyType="viewId"
),

commandLineGroup = ''
),
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="json",
label="Shape Json",
description="Shapes output",
semantic="shapeFile",
value="{nodeCacheFolder}/output.json",
),
desc.File(
name="output",
label="Output",
description="SfMData file output",
value="{nodeCacheFolder}/output.usda",
)
]

def preprocess(self, node):

import json
liste = [item.getShapeAsDict() for item in node.observations]

with open(node.json.value, "w") as f:
json.dump(liste, f)

1 change: 1 addition & 0 deletions src/aliceVision/sfmDataIO/sfmDataIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum ESfMData
SURVEYS = 1024,

UNCERTAINTY = LANDMARKS_UNCERTAINTY | POSES_UNCERTAINTY,
CAMERAS = VIEWS | EXTRINSICS | INTRINSICS,
ALL_DENSE = VIEWS | EXTRINSICS | INTRINSICS | STRUCTURE | OBSERVATIONS | CONSTRAINTS2D | ANCESTORS,
ALL = VIEWS | EXTRINSICS | INTRINSICS | STRUCTURE | OBSERVATIONS | OBSERVATIONS_WITH_FEATURES | UNCERTAINTY | CONSTRAINTS2D | ANCESTORS | SURVEYS
};
Expand Down
13 changes: 13 additions & 0 deletions src/software/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ if (ALICEVISION_BUILD_SFM)
${Boost_LIBRARIES}
)

alicevision_add_software(aliceVision_meshResection
SOURCE main_meshResection.cpp
FOLDER ${FOLDER_SOFTWARE_UTILS}
LINKS aliceVision_system
aliceVision_cmdline
aliceVision_sfmData
aliceVision_sfmDataIO
aliceVision_sfm
Boost::program_options
Boost::json
${Boost_LIBRARIES}
)

alicevision_add_software(aliceVision_maskProcessing
SOURCE main_maskProcessing.cpp
FOLDER ${FOLDER_SOFTWARE_UTILS}
Expand Down
Loading
Loading