[nodes] Align FloatParams' and IntParams' ranges with their params' type

This commit is contained in:
Candice Bentéjac 2022-09-27 12:08:54 +02:00
parent 545f3a7218
commit e7290313bf
9 changed files with 29 additions and 29 deletions

View file

@ -34,8 +34,8 @@ Intrinsic = [
"So this value is used to limit the range of possible values in the optimization. \n" "So this value is used to limit the range of possible values in the optimization. \n"
"If you put -1, this value will not be used and the focal length will not be bounded.", "If you put -1, this value will not be used and the focal length will not be bounded.",
value=-1.0, uid=[0], range=None), value=-1.0, uid=[0], range=None),
desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0, 10000, 1)), desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)),
desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0, 10, 0.1)), desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)),
desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked',
description='the pixelRatio value is locked for estimation', description='the pixelRatio value is locked for estimation',
value=True, uid=[0]), value=True, uid=[0]),
@ -53,12 +53,12 @@ Intrinsic = [
value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]),
desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)),
desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)),
desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0, 1000, 1)), desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)),
desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0, 1000, 1)), desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)),
desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]),
desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[
desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0, 10000, 1)), desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)),
desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0, 10000, 1)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)),
]), ]),
desc.ChoiceParam(name="initializationMode", label="Initialization Mode", desc.ChoiceParam(name="initializationMode", label="Initialization Mode",
@ -168,7 +168,7 @@ The metadata needed are:
label='Default Field Of View', label='Default Field Of View',
description='Empirical value for the field of view in degree.', description='Empirical value for the field of view in degree.',
value=45.0, value=45.0,
range=(0, 180.0, 1), range=(0.0, 180.0, 1.0),
uid=[], uid=[],
advanced=True, advanced=True,
), ),

View file

@ -59,7 +59,7 @@ Use a downscale factor of one (full-resolution) only if the quality of the input
label='Max View Angle', label='Max View Angle',
description='Maximum angle between two views.', description='Maximum angle between two views.',
value=70.0, value=70.0,
range=(10.0, 120.0, 1), range=(10.0, 120.0, 1.0),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),

View file

@ -45,7 +45,7 @@ This allows to filter unstable points before starting the fusion of all depth ma
label='Max View Angle', label='Max View Angle',
description='Maximum angle between two views.', description='Maximum angle between two views.',
value=70.0, value=70.0,
range=(10.0, 120.0, 1), range=(10.0, 120.0, 1.0),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),

View file

@ -43,7 +43,7 @@ class ImageMasking(desc.CommandLineNode):
description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.',
semantic='color/hue', semantic='color/hue',
value=0.33, value=0.33,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
desc.FloatParam( desc.FloatParam(
@ -51,7 +51,7 @@ class ImageMasking(desc.CommandLineNode):
label='Tolerance', label='Tolerance',
description='Tolerance around the hue value to isolate.', description='Tolerance around the hue value to isolate.',
value=0.1, value=0.1,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
desc.FloatParam( desc.FloatParam(
@ -59,7 +59,7 @@ class ImageMasking(desc.CommandLineNode):
label='Min Saturation', label='Min Saturation',
description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.',
value=0.3, value=0.3,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
desc.FloatParam( desc.FloatParam(
@ -67,7 +67,7 @@ class ImageMasking(desc.CommandLineNode):
label='Max Saturation', label='Max Saturation',
description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.',
value=1.0, value=1.0,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
desc.FloatParam( desc.FloatParam(
@ -75,7 +75,7 @@ class ImageMasking(desc.CommandLineNode):
label='Min Value', label='Min Value',
description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', description='Hue is meaningless if value is low. Do not mask pixels below this threshold.',
value=0.3, value=0.3,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
desc.FloatParam( desc.FloatParam(
@ -83,7 +83,7 @@ class ImageMasking(desc.CommandLineNode):
label='Max Value', label='Max Value',
description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.',
value=1.0, value=1.0,
range=(0, 1, 0.01), range=(0.0, 1.0, 0.01),
uid=[0] uid=[0]
), ),
]), ]),

View file

@ -84,7 +84,7 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
label="Frame Offset", label="Frame Offset",
description="Frame offset.", description="Frame offset.",
value=0, value=0,
range=(0, 100.0, 1.0), range=(0, 100, 1),
uid=[0], uid=[0],
), ),
name="frameOffsets", name="frameOffsets",

View file

@ -94,19 +94,19 @@ A Graph Cut Max-Flow is applied to optimally cut the volume. This cut represents
name="x", label="x", description="Euler X Rotation", name="x", label="x", description="Euler X Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-90.0, 90.0, 1) range=(-90.0, 90.0, 1.0)
), ),
desc.FloatParam( desc.FloatParam(
name="y", label="y", description="Euler Y Rotation", name="y", label="y", description="Euler Y Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-180.0, 180.0, 1) range=(-180.0, 180.0, 1.0)
), ),
desc.FloatParam( desc.FloatParam(
name="z", label="z", description="Euler Z Rotation", name="z", label="z", description="Euler Z Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-180.0, 180.0, 1) range=(-180.0, 180.0, 1.0)
) )
], ],
joinChar="," joinChar=","
@ -164,7 +164,7 @@ A Graph Cut Max-Flow is applied to optimally cut the volume. This cut represents
label='Min Observations Angle For SfM Space Estimation', label='Min Observations Angle For SfM Space Estimation',
description='Minimum angle between two observations for SfM space estimation.', description='Minimum angle between two observations for SfM space estimation.',
value=10.0, value=10.0,
range=(0, 120, 1), range=(0.0, 120.0, 1.0),
uid=[0], uid=[0],
enabled=lambda node: node.estimateSpaceFromSfM.value, enabled=lambda node: node.estimateSpaceFromSfM.value,
), ),

View file

@ -99,19 +99,19 @@ The transformation can be based on:
name="x", label="x", description="Euler X Rotation", name="x", label="x", description="Euler X Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-90.0, 90.0, 1) range=(-90.0, 90.0, 1.0)
), ),
desc.FloatParam( desc.FloatParam(
name="y", label="y", description="Euler Y Rotation", name="y", label="y", description="Euler Y Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-180.0, 180.0, 1) range=(-180.0, 180.0, 1.0)
), ),
desc.FloatParam( desc.FloatParam(
name="z", label="z", description="Euler Z Rotation", name="z", label="z", description="Euler Z Rotation",
value=0.0, value=0.0,
uid=[0], uid=[0],
range=(-180.0, 180.0, 1) range=(-180.0, 180.0, 1.0)
) )
], ],
joinChar="," joinChar=","

View file

@ -213,7 +213,7 @@ It iterates like that, adding cameras and triangulating new 2D features into 3D
label='Min Angle For Triangulation', label='Min Angle For Triangulation',
description='Minimum angle for triangulation.', description='Minimum angle for triangulation.',
value=3.0, value=3.0,
range=(0.1, 10, 0.1), range=(0.1, 10.0, 0.1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
@ -222,7 +222,7 @@ It iterates like that, adding cameras and triangulating new 2D features into 3D
label='Min Angle For Landmark', label='Min Angle For Landmark',
description='Minimum angle for landmark.', description='Minimum angle for landmark.',
value=2.0, value=2.0,
range=(0.1, 10, 0.1), range=(0.1, 10.0, 0.1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
@ -231,7 +231,7 @@ It iterates like that, adding cameras and triangulating new 2D features into 3D
label='Max Reprojection Error', label='Max Reprojection Error',
description='Maximum reprojection error.', description='Maximum reprojection error.',
value=4.0, value=4.0,
range=(0.1, 10, 0.1), range=(0.1, 10.0, 0.1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
@ -240,7 +240,7 @@ It iterates like that, adding cameras and triangulating new 2D features into 3D
label='Min Angle Initial Pair', label='Min Angle Initial Pair',
description='Minimum angle for the initial pair.', description='Minimum angle for the initial pair.',
value=5.0, value=5.0,
range=(0.1, 10, 0.1), range=(0.1, 10.0, 0.1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
@ -249,7 +249,7 @@ It iterates like that, adding cameras and triangulating new 2D features into 3D
label='Max Angle Initial Pair', label='Max Angle Initial Pair',
description='Maximum angle for the initial pair.', description='Maximum angle for the initial pair.',
value=40.0, value=40.0,
range=(0.1, 60, 0.1), range=(0.1, 60.0, 0.1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),

View file

@ -80,7 +80,7 @@ class RenderAnimatedCamera(desc.CommandLineNode):
label='Particle Size', label='Particle Size',
description='''Scale of particles used to show the point cloud''', description='''Scale of particles used to show the point cloud''',
value=0.1, value=0.1,
range=(0.01, 1, 0.01), range=(0.01, 1.0, 0.01),
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(