Skip to content

Commit

Permalink
[nodes] SfMTransform: new option to align on markers
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencastan committed Sep 23, 2019
1 parent 06543f8 commit d8b2a54
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions meshroom/nodes/aliceVision/SfMTransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ class SfMTransform(desc.CommandLineNode):
" * transformation: Apply a given transformation\n"
" * auto_from_cameras: Use cameras\n"
" * auto_from_landmarks: Use landmarks\n"
" * from_single_camera: Use a specific camera as the origin of the coordinate system",
" * from_single_camera: Use a specific camera as the origin of the coordinate system\n"
" * from_markers: Align specific markers to custom coordinates",
value='auto_from_landmarks',
values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera'],
values=['transformation', 'auto_from_cameras', 'auto_from_landmarks', 'from_single_camera', 'from_markers'],
exclusive=True,
uid=[0],
),
Expand All @@ -51,10 +52,44 @@ class SfMTransform(desc.CommandLineNode):
name='scale',
label='Additional Scale',
description='Additional scale to apply.',
value=10.0,
range=(1, 100.0, 1),
value=1.0,
range=(0.0, 100.0, 0.1),
uid=[0],
),
desc.ListAttribute(
name="markers",
elementDesc=desc.GroupAttribute(name="markerAlign", label="Marker Align", description="", joinChar=":", groupDesc=[
desc.IntParam(name="markerId", label="Marker", description="Marker Id", value=0, uid=[0], range=(0, 32, 1)),
desc.GroupAttribute(name="markerCoord", label="Coord", description="", joinChar=",", groupDesc=[
desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)),
desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)),
desc.FloatParam(name="z", label="z", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)),
])
]),
label="Markers",
description="Markers alignment points",
),
desc.BoolParam(
name='applyScale',
label='Scale',
description='Apply scale transformation.',
value=True,
uid=[0]
),
desc.BoolParam(
name='applyRotation',
label='Rotation',
description='Apply rotation transformation.',
value=True,
uid=[0]
),
desc.BoolParam(
name='applyTranslation',
label='Translation',
description='Apply translation transformation.',
value=True,
uid=[0]
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
Expand Down

0 comments on commit d8b2a54

Please sign in to comment.