-
-
Notifications
You must be signed in to change notification settings - Fork 872
Expand file tree
/
Copy pathConvertSfMFormat.py
More file actions
109 lines (102 loc) · 3.26 KB
/
ConvertSfMFormat.py
File metadata and controls
109 lines (102 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
__version__ = "2.0"
from meshroom.core import desc
from meshroom.core.utils import DESCRIBER_TYPES, VERBOSE_LEVEL
class ConvertSfMFormat(desc.AVCommandLineNode):
"""
Convert an SfM scene from one file format to another.
Supported output formats include Alembic (ABC), SfMData (SFM/JSON), and others.
The node can also be used to remove specific parts of the scene, such as filtering out
all 3D landmarks or removing 2D feature observations, which is useful for reducing file size
or preparing data for tools that only need camera poses and intrinsics.
"""
commandLine = "aliceVision_convertSfMFormat {allParams}"
size = desc.DynamicNodeSize("input")
category = "Utils"
inputs = [
desc.File(
name="input",
label="Input",
description="Input SfMData file.",
value="",
),
desc.ChoiceParam(
name="fileExt",
label="SfM File Format",
description="Output SfM file format.",
value="abc",
values=["abc", "sfm", "json", "ply", "baf"],
commandLineGroup="", # exclude from command line
),
desc.ChoiceParam(
name="describerTypes",
label="Describer Types",
description="Describer types to keep.",
values=DESCRIBER_TYPES,
value=["dspsift"],
exclusive=False,
joinChar=",",
exposed=True,
),
desc.ListAttribute(
elementDesc=desc.File(
name="imageId",
label="Image ID",
description="UID or path of an image to add to the white list.",
value="",
),
name="imageWhiteList",
label="Image White List",
description="Image white list (UIDs or image paths).",
),
desc.BoolParam(
name="views",
label="Views",
description="Export views.",
value=True,
),
desc.BoolParam(
name="intrinsics",
label="Intrinsics",
description="Export intrinsics.",
value=True,
),
desc.BoolParam(
name="extrinsics",
label="Extrinsics",
description="Export extrinsics.",
value=True,
),
desc.BoolParam(
name="structure",
label="Structure",
description="Export structure.",
value=True,
),
desc.BoolParam(
name="observations",
label="Observations",
description="Export observations.",
value=True,
),
desc.BoolParam(
name="surveys",
label="Surveys",
description="Export surveys.",
value=True,
),
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="Output",
description="Path to the output SfMData file.",
value="{nodeCacheFolder}/sfm.{fileExtValue}",
),
]