Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CameraRigLocalization.py « aliceVision « nodes « meshroom - github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6cff2d31c3aeec653951abdb01f38e5f60778cb7 (plain)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
__version__ = "1.0"

import os
from meshroom.core import desc


class CameraRigLocalization(desc.CommandLineNode):
    commandLine = 'aliceVision_rigLocalization {allParams}'

    category = 'Utils'

    inputs = [
        desc.File(
            name='sfmdata',
            label='Sfm Data',
            description='''The sfmData file.''',
            value='',
            uid=[0],
            ),
        desc.File(
            name='mediapath',
            label='Media Path',
            description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''',
            value='',
            uid=[0],
            ),
        desc.File(
            name='calibration',
            label='Rig Calibration File',
            description='''The file containing the calibration data for the rig (subposes)''',
            value='',
            uid=[0],
            ),
        desc.File(
            name='cameraIntrinsics',
            label='Camera Intrinsics',
            description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''',
            value='',
            uid=[0],
            ),
        desc.File(
            name='descriptorPath',
            label='Descriptor Path',
            description='''Folder containing the .desc.''',
            value='',
            uid=[0],
            ),
        desc.ChoiceParam(
            name='matchDescTypes',
            label='Match Describer Types',
            description='''The describer types to use for the matching''',
            value=['dspsift'],
            values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'],
            exclusive=False,
            uid=[0],
            joinChar=',',
        ),
        desc.ChoiceParam(
            name='preset',
            label='Preset',
            description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''',
            value='normal',
            values=['low', 'medium', 'normal', 'high', 'ultra'],
            exclusive=True,
            uid=[0],
            ),
        desc.ChoiceParam(
            name='resectionEstimator',
            label='Resection Estimator',
            description='''The type of *sac framework to use for resection (acransac, loransac)''',
            value='acransac',
            values=['acransac', 'loransac'],
            exclusive=True,
            uid=[0],
            ),
        desc.ChoiceParam(
            name='matchingEstimator',
            label='Matching Estimator',
            description='''The type of *sac framework to use for matching (acransac, loransac)''',
            value='acransac',
            values=['acransac', 'loransac'],
            exclusive=True,
            uid=[0],
            ),
        desc.StringParam(
            name='refineIntrinsics',
            label='Refine Intrinsics',
            description='''Enable/Disable camera intrinsics refinement for each localized image''',
            value='',
            uid=[0],
            ),
        desc.FloatParam(
            name='reprojectionError',
            label='Reprojection Error',
            description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''',
            value=4.0,
            range=(0.0, 10.0, 0.1),
            uid=[0],
            ),
        desc.BoolParam(
            name='useLocalizeRigNaive',
            label='Use Localize Rig Naive',
            description='''Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.''',
            value=False,
            uid=[0],
            ),
        desc.FloatParam(
            name='angularThreshold',
            label='Angular Threshold',
            description='''The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.''',
            value=0.1,
            range=(0.0, 10.0, 0.01),
            uid=[0],
            ),
        desc.File(
            name='voctree',
            label='Voctree',
            description='''[voctree] Filename for the vocabulary tree''',
            value='${ALICEVISION_VOCTREE}',
            uid=[0],
            ),
        desc.File(
            name='voctreeWeights',
            label='Voctree Weights',
            description='''[voctree] Filename for the vocabulary tree weights''',
            value='',
            uid=[0],
            ),
        desc.ChoiceParam(
            name='algorithm',
            label='Algorithm',
            description='''[voctree] Algorithm type: {FirstBest,AllResults}''',
            value='AllResults',
            values=['FirstBest', 'AllResults'],
            exclusive=True,
            uid=[0],
            ),
        desc.IntParam(
            name='nbImageMatch',
            label='Nb Image Match',
            description='''[voctree] Number of images to retrieve in the database''',
            value=4,
            range=(0, 100, 1),
            uid=[0],
            ),
        desc.IntParam(
            name='maxResults',
            label='Max Results',
            description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''',
            value=10,
            range=(0, 100, 1),
            uid=[0],
            ),
        desc.FloatParam(
            name='matchingError',
            label='Matching Error',
            description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''',
            value=4.0,
            range=(0.0, 10.0, 0.1),
            uid=[0],
            ),
        desc.IntParam(
            name='nNearestKeyFrames',
            label='N Nearest Key Frames',
            description='''[cctag] Number of images to retrieve in database''',
            value=5,
            range=(0, 50, 1),
            uid=[0],
            ),
    ]

    outputs = [
        desc.File(
            name='outputAlembic',
            label='Output Alembic',
            description='''Filename for the SfMData export file (where camera poses will be stored).''',
            value=desc.Node.internalFolder + 'trackedcameras.abc',
            uid=[],
            ),
    ]