Skip to content

Commit febb825

Browse files
committed
[meshroom] SphereDetection: Add new parameters for manual detection
1 parent caf9c12 commit febb825

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

meshroom/aliceVision/SphereDetection.py

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.0"
1+
__version__ = "2.0"
22

33
from meshroom.core import desc
44
from meshroom.core.utils import VERBOSE_LEVEL
@@ -31,45 +31,43 @@ class SphereDetection(desc.CommandLineNode):
3131
description="Automatic detection of calibration spheres.",
3232
value=False,
3333
),
34+
desc.Circle(
35+
name="sphereShape",
36+
label="Sphere Shape",
37+
description="The shape of the calibration sphere for every image.",
38+
enabled=lambda node: not node.autoDetect.value,
39+
group=lambda node: None if node.sphereFile.value else "allParams",
40+
keyable=True,
41+
keyType="viewId",
42+
),
43+
desc.File(
44+
name="sphereFile",
45+
label="Sphere Shape File",
46+
description="An input JSON file containing the shapes for every image. If provided, "
47+
"the shapes provided with \"Sphere Shape\" will be ignored.",
48+
semantic="shapeFile",
49+
value="",
50+
enabled=lambda node: not node.autoDetect.value,
51+
group=lambda node: None if not node.sphereFile.value else "allParams",
52+
),
53+
desc.BoolParam(
54+
name="fillMissingSpheres",
55+
label="Fill Missing Spheres",
56+
description="Checked if a sphere position is to be written as detected although it "
57+
"was not provided. In that case, the position of the last known sphere "
58+
"will be used.",
59+
value=False,
60+
enabled=lambda node: not node.autoDetect.value,
61+
),
3462
desc.FloatParam(
3563
name="minScore",
3664
label="Minimum Score",
3765
description="Minimum score for the detection.",
3866
value=0.0,
3967
range=(0.0, 50.0, 0.01),
68+
enabled=lambda node: node.autoDetect.value,
4069
advanced=True,
4170
),
42-
desc.GroupAttribute(
43-
name="sphereCenter",
44-
label="Sphere Center",
45-
description="Center of the circle (XY offset to the center of the image in pixels).",
46-
groupDesc=[
47-
desc.FloatParam(
48-
name="x",
49-
label="x",
50-
description="X offset in pixels.",
51-
value=0.0,
52-
range=(-1000.0, 10000.0, 1.0),
53-
),
54-
desc.FloatParam(
55-
name="y",
56-
label="y",
57-
description="Y offset in pixels.",
58-
value=0.0,
59-
range=(-1000.0, 10000.0, 1.0),
60-
),
61-
],
62-
enabled=lambda node: not node.autoDetect.value,
63-
group=None, # skip group from command line
64-
),
65-
desc.FloatParam(
66-
name="sphereRadius",
67-
label="Radius",
68-
description="Sphere radius in pixels.",
69-
value=500.0,
70-
range=(0.0, 10000.0, 0.1),
71-
enabled=lambda node: not node.autoDetect.value,
72-
),
7371
desc.ChoiceParam(
7472
name="verboseLevel",
7573
label="Verbose Level",

0 commit comments

Comments
 (0)