-
-
Notifications
You must be signed in to change notification settings - Fork 871
Expand file tree
/
Copy pathAddPoseNoise.py
More file actions
67 lines (59 loc) · 2.03 KB
/
AddPoseNoise.py
File metadata and controls
67 lines (59 loc) · 2.03 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
__version__ = "1.0"
from meshroom.core import desc
from meshroom.core.utils import VERBOSE_LEVEL
class AddPoseNoise(desc.AVCommandLineNode):
'''
Add synthetic noise to the camera poses in an SfMData scene.
This node perturbs each camera's position and orientation by a configurable amount of
Gaussian noise. It is primarily intended for testing and benchmarking purposes, allowing
users to evaluate the robustness of downstream algorithms (e.g., bundle adjustment, depth
map estimation) when the input poses are not perfect.
'''
commandLine = 'aliceVision_addPoseNoise {allParams}'
size = desc.DynamicNodeSize('input')
cpu = desc.Level.INTENSIVE
ram = desc.Level.INTENSIVE
category = 'Utils'
inputs = [
desc.File(
name="input",
label="SfMData",
description="SfMData file.",
value="",
),
desc.FloatParam(
name="positionNoise",
label="Position Noise",
description="Noise level to add to view positions.",
value=0.0,
range=(0.0, 1.0, 0.025),
),
desc.FloatParam(
name="rotationNoise",
label="Rotation Noise",
description="Noise level to add to view orientations.",
value=0.0,
range=(0.0, 1.0, 0.025),
),
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="SfMData",
description="Path to the output SfMData file.",
value="{nodeCacheFolder}/sfmFiltered.abc",
),
desc.File(
name="outputViewsAndPoses",
label="Views And Poses",
description="Path to the output SfMData file with cameras (views and poses).",
value="{nodeCacheFolder}/cameras.sfm",
)
]