[nodes] I-L: Harmonize and improve labels and descriptions

Use CamelCase for all labels, always end descriptions with periods, and
replace the mixed use of single and double quotes with double quotes
only.
This commit is contained in:
Candice Bentéjac 2023-06-16 10:31:18 +02:00
parent 5c2865968d
commit 3146dcface
11 changed files with 978 additions and 889 deletions

View file

@ -9,138 +9,143 @@ class ImageMasking(desc.AVCommandLineNode):
parallelization = desc.Parallelization(blockSize=40) parallelization = desc.Parallelization(blockSize=40)
commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}'
documentaiton = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="SfMData",
description='''SfMData file.''', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='algorithm', name="algorithm",
label='Algorithm', label="Algorithm",
description='', description="",
value='HSV', value="HSV",
values=['HSV', 'AutoGrayscaleThreshold'], values=["HSV", "AutoGrayscaleThreshold"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.GroupAttribute( desc.GroupAttribute(
name="hsv", name="hsv",
label="HSV Parameters", label="HSV Parameters",
description="""Values to select: description="Values to select:\n"
- Green: default values " - Green: default values\n"
- White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 " - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1\n"
- Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 " - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2",
""",
group=None, group=None,
enabled=lambda node: node.algorithm.value == 'HSV', enabled=lambda node: node.algorithm.value == "HSV",
groupDesc=[ groupDesc=[
desc.FloatParam( desc.FloatParam(
name='hsvHue', name="hsvHue",
label='Hue', label="Hue",
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.\n"
semantic='color/hue', "0 = red, 0.33 = green, 0.66 = blue, 1 = red.",
value=0.33, semantic="color/hue",
range=(0.0, 1.0, 0.01), value=0.33,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
desc.FloatParam( ),
name='hsvHueRange', desc.FloatParam(
label='Tolerance', name="hsvHueRange",
description='Tolerance around the hue value to isolate.', label="Tolerance",
value=0.1, description="Tolerance around the hue value to isolate.",
range=(0.0, 1.0, 0.01), value=0.1,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
desc.FloatParam( ),
name='hsvMinSaturation', desc.FloatParam(
label='Min Saturation', name="hsvMinSaturation",
description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', label="Min Saturation",
value=0.3, description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.",
range=(0.0, 1.0, 0.01), value=0.3,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
desc.FloatParam( ),
name='hsvMaxSaturation', desc.FloatParam(
label='Max Saturation', name="hsvMaxSaturation",
description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', label="Max Saturation",
value=1.0, description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.",
range=(0.0, 1.0, 0.01), value=1.0,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
desc.FloatParam( ),
name='hsvMinValue', desc.FloatParam(
label='Min Value', name="hsvMinValue",
description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', label="Min Value",
value=0.3, description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.",
range=(0.0, 1.0, 0.01), value=0.3,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
desc.FloatParam( ),
name='hsvMaxValue', desc.FloatParam(
label='Max Value', name="hsvMaxValue",
description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', label="Max Value",
value=1.0, description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.",
range=(0.0, 1.0, 0.01), value=1.0,
uid=[0] range=(0.0, 1.0, 0.01),
), uid=[0]
]), ),
]
),
desc.BoolParam( desc.BoolParam(
name='invert', name="invert",
label='Invert', label="Invert",
description='''If ticked, the selected area is ignored. description="If selected, the selected area is ignored.\n"
If not, only the selected area is considered.''', "If not, only the selected area is considered.",
value=True, value=True,
uid=[0] uid=[0]
), ),
desc.IntParam( desc.IntParam(
name='growRadius', name="growRadius",
label='Grow Radius', label="Grow Radius",
description='Grow the selected area. It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.', description="Grow the selected area.\n"
"It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.",
value=0, value=0,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0] uid=[0]
), ),
desc.IntParam( desc.IntParam(
name='shrinkRadius', name="shrinkRadius",
label='Shrink Radius', label="Shrink Radius",
description='Shrink the selected area.', description="Shrink the selected area.",
value=0, value=0,
range=(0, 50, 1), range=(0, 50, 1),
uid=[0] uid=[0]
), ),
desc.File( desc.File(
name='depthMapFolder', name="depthMapFolder",
label='Depth Mask Folder', label="Depth Mask Folder",
description='''Depth Mask Folder''', description="Depth mask folder.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.StringParam( desc.StringParam(
name='depthMapExp', name="depthMapExp",
label='Depth Mask Expression', label="Depth Mask Expression",
description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', description="Depth mask expression, like '{inputFolder}/{stem}-depth.{ext}'.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='''verbosity level (fatal, error, warning, info, debug, trace).''', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
), )
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Output', label="Output",
description='''Output folder.''', description="Output folder.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
), ),

View file

@ -35,17 +35,17 @@ If images have known poses, use frustum intersection else use VocabularuTree.
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='SfmData', label="SfMData",
description='SfMData file .', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ListAttribute( desc.ListAttribute(
elementDesc=desc.File( elementDesc=desc.File(
name="featuresFolder", name="featuresFolder",
label="Features Folder", label="Features Folder",
description="", description="Folder containing some extracted features and descriptors.",
value="", value="",
uid=[0], uid=[0],
), ),
@ -54,85 +54,87 @@ If images have known poses, use frustum intersection else use VocabularuTree.
description="Folder(s) containing the extracted features and descriptors." description="Folder(s) containing the extracted features and descriptors."
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='method', name="method",
label='Method', label="Method",
description='Method used to select the image pairs to match:\n' description="Method used to select the image pairs to match:\n"
' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n"
'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n"
'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n"
' * Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n' " - Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n"
' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n"
' * Exhaustive: Export all image pairs.\n' " - Exhaustive: Export all image pairs.\n"
' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n"
' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n",
value='SequentialAndVocabularyTree', value="SequentialAndVocabularyTree",
values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='tree', name="tree",
label='Voc Tree: Tree', label="Voc Tree: Tree",
description='Input name for the vocabulary tree file.', description="Input name for the vocabulary tree file.",
value='${ALICEVISION_VOCTREE}', value="${ALICEVISION_VOCTREE}",
uid=[], uid=[],
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.File( desc.File(
name='weights', name="weights",
label='Voc Tree: Weights', label="Voc Tree: Weights",
description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', description="Input name for the weight file.\n"
value='', "If not provided, the weights will be computed on the database built with the provided set.",
value="",
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='minNbImages', name="minNbImages",
label='Voc Tree: Minimal Number of Images', label="Voc Tree: Minimum Number Of Images",
description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', description="Minimum number of images to use the vocabulary tree.\n"
"If we have less features than this threshold, we will compute all matching combinations.",
value=200, value=200,
range=(0, 500, 1), range=(0, 500, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='maxDescriptors', name="maxDescriptors",
label='Voc Tree: Max Descriptors', label="Voc Tree: Max Descriptors",
description='Limit the number of descriptors you load per image. Zero means no limit.', description="Limit the number of descriptors you load per image. 0 means no limit.",
value=500, value=500,
range=(0, 100000, 1), range=(0, 100000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='nbMatches', name="nbMatches",
label='Voc Tree: Nb Matches', label="Voc Tree: Nb Matches",
description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).",
value=40, value=40,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='nbNeighbors', name="nbNeighbors",
label='Sequential: Nb Neighbors', label="Sequential: Nb Neighbors",
description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).",
value=5, value=5,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'Sequential' in node.method.value, enabled=lambda node: "Sequential" in node.method.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
@ -140,10 +142,10 @@ If images have known poses, use frustum intersection else use VocabularuTree.
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Image Pairs', label="Image Pairs",
description='Filepath to the output file with the list of selected image pairs.', description="Filepath to the output file with the list of selected image pairs.",
value=desc.Node.internalFolder + 'imageMatches.txt', value=desc.Node.internalFolder + "imageMatches.txt",
uid=[], uid=[],
), ),
] ]

View file

@ -20,24 +20,24 @@ Thanks to this node, the FeatureMatching node will only compute the matches betw
''' '''
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input A', label="Input A",
description='SfMData file .', description="First input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='inputB', name="inputB",
label='Input B', label="Input B",
description='SfMData file .', description="Second input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ListAttribute( desc.ListAttribute(
elementDesc=desc.File( elementDesc=desc.File(
name="featuresFolder", name="featuresFolder",
label="Features Folder", label="Features Folder",
description="", description="Folder containing some extracted features and descriptors.",
value="", value="",
uid=[0], uid=[0],
), ),
@ -46,93 +46,98 @@ Thanks to this node, the FeatureMatching node will only compute the matches betw
description="Folder(s) containing the extracted features and descriptors." description="Folder(s) containing the extracted features and descriptors."
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='method', name="method",
label='Method', label="Method",
description='Method used to select the image pairs to match:\n' description="Method used to select the image pairs to match:\n"
' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n"
'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n"
'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n"
' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n"
' * Exhaustive: Export all image pairs.\n' " - Exhaustive: Export all image pairs.\n"
' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n"
' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection. Otherwise, use VocabularyTree.\n",
value='SequentialAndVocabularyTree', value="SequentialAndVocabularyTree",
values=['VocabularyTree', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum'], values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='tree', name="tree",
label='Voc Tree: Tree', label="Voc Tree: Tree",
description='Input name for the vocabulary tree file.', description="Input name for the vocabulary tree file.",
value='${ALICEVISION_VOCTREE}', value="${ALICEVISION_VOCTREE}",
uid=[], uid=[],
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.File( desc.File(
name='weights', name="weights",
label='Voc Tree: Weights', label="Voc Tree: Weights",
description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', description="Input name for the weight file.\n"
value='', "If not provided, the weights will be computed on the database built with the provided set.",
value="",
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='matchingMode', name="matchingMode",
label='Matching Mode', label="Matching Mode",
description='The mode to combine image matching between the input SfMData A and B:\n"a/a+a/b" for A with A + A with B.\n"a/ab" for A with A and B.\n"a/b" for A with B.', description="The mode to combine image matching between the input SfMData A and B:\n"
value='a/a+a/b', "- 'a/a+a/b' for A with A + A with B.\n"
values=['a/a+a/b','a/ab', 'a/b'], "- 'a/ab' for A with A and B.\n"
"- 'a/b' for A with B.",
value="a/a+a/b",
values=["a/a+a/b","a/ab", "a/b"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='minNbImages', name="minNbImages",
label='Voc Tree: Minimal Number of Images', label="Voc Tree: Minimum Number Of Images",
description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', description="Minimum number of images to use the vocabulary tree.\n"
"If we have less features than this threshold, we will compute all the matching combinations.",
value=200, value=200,
range=(0, 500, 1), range=(0, 500, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='maxDescriptors', name="maxDescriptors",
label='Voc Tree: Max Descriptors', label="Voc Tree: Max Descriptors",
description='Limit the number of descriptors you load per image. Zero means no limit.', description="Limit the number of descriptors you load per image. 0 means no limit.",
value=500, value=500,
range=(0, 100000, 1), range=(0, 100000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='nbMatches', name="nbMatches",
label='Voc Tree: Nb Matches', label="Voc Tree: Nb Matches",
description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).",
value=40, value=40,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'VocabularyTree' in node.method.value, enabled=lambda node: "VocabularyTree" in node.method.value,
), ),
desc.IntParam( desc.IntParam(
name='nbNeighbors', name="nbNeighbors",
label='Sequential: Nb Neighbors', label="Sequential: Nb Neighbors",
description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).",
value=5, value=5,
range=(0, 1000, 1), range=(0, 1000, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
enabled=lambda node: 'Sequential' in node.method.value, enabled=lambda node: "Sequential" in node.method.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
@ -140,17 +145,17 @@ Thanks to this node, the FeatureMatching node will only compute the matches betw
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='List File', label="List File",
description='Filepath to the output file with the list of selected image pairs.', description="Filepath to the output file with the list of selected image pairs.",
value=desc.Node.internalFolder + 'imageMatches.txt', value=desc.Node.internalFolder + "imageMatches.txt",
uid=[], uid=[],
), ),
desc.File( desc.File(
name='outputCombinedSfM', name="outputCombinedSfM",
label='Combined SfM', label="Combined SfM",
description='Path for the combined SfMData file', description="Path for the combined SfMData file.",
value=desc.Node.internalFolder + 'combineSfM.sfm', value=desc.Node.internalFolder + "combineSfM.sfm",
uid=[], uid=[],
), ),
] ]

File diff suppressed because it is too large Load diff

View file

@ -13,28 +13,37 @@ class ImportKnownPoses(desc.AVCommandLineNode):
inputs = [ inputs = [
desc.File( desc.File(
name='sfmData', name="sfmData",
label='SfmData', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='knownPosesData', name="knownPosesData",
label='KnownPosesData', label="Known Poses Data",
description='KnownPoses data in the json or xmp format', description="Known poses data in the JSON or XMP format.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam(
name="verboseLevel",
label="Verbose Level",
description="Verbosity level (fatal, error, warning, info, debug, trace).",
value="info",
values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True,
uid=[],
)
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Output', label="Output",
description='Path to the output smfData file.', description="Path to the output SfMData file.",
value=desc.Node.internalFolder + "/sfmData.abc", value=desc.Node.internalFolder + "/sfmData.abc",
uid=[], uid=[],
), ),
] ]

View file

@ -102,14 +102,14 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
desc.ListAttribute( desc.ListAttribute(
elementDesc=desc.FloatParam( elementDesc=desc.FloatParam(
name="mmFocal", name="mmFocal",
label="mmFocal", label="Focal",
description="Focal in mm (will be used if not 0).", description="Focal in mm (will be used if not 0).",
value=0.0, value=0.0,
range=(0.0, 500.0, 1.0), range=(0.0, 500.0, 1.0),
uid=[0], uid=[0],
), ),
name="mmFocals", name="mmFocals",
label="mmFocals", label="Focals",
description="Focals in mm (will be used if not 0)." description="Focals in mm (will be used if not 0)."
), ),
desc.File( desc.File(
@ -128,8 +128,8 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
group=None, # skip group from command line group=None, # skip group from command line
groupDesc=[ groupDesc=[
desc.BoolParam( desc.BoolParam(
name='useSmartSelection', name="useSmartSelection",
label='Use Smart Keyframe Selection', label="Use Smart Keyframe Selection",
description="Use the smart keyframe selection.", description="Use the smart keyframe selection.",
value=True, value=True,
uid=[0] uid=[0]
@ -137,7 +137,8 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
desc.GroupAttribute( desc.GroupAttribute(
name="regularSelection", name="regularSelection",
label="Regular Keyframe Selection", label="Regular Keyframe Selection",
description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", description="Parameters for the regular keyframe selection.\n"
"Keyframes are selected regularly over the sequence with respect to the set parameters.",
group=None, # skip group from command line group=None, # skip group from command line
enabled=lambda node: node.selectionMethod.useSmartSelection.value is False, enabled=lambda node: node.selectionMethod.useSmartSelection.value is False,
groupDesc=[ groupDesc=[
@ -175,14 +176,15 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
desc.GroupAttribute( desc.GroupAttribute(
name="smartSelection", name="smartSelection",
label="Smart Keyframe Selection", label="Smart Keyframe Selection",
description="Parameters for the smart keyframe selection.\nKeyframes are selected based on their sharpness and optical flow scores.", description="Parameters for the smart keyframe selection.\n"
"Keyframes are selected based on their sharpness and optical flow scores.",
group=None, # skip group from command line group=None, # skip group from command line
enabled=lambda node: node.selectionMethod.useSmartSelection.value, enabled=lambda node: node.selectionMethod.useSmartSelection.value,
groupDesc=[ groupDesc=[
desc.FloatParam( desc.FloatParam(
name="pxDisplacement", name="pxDisplacement",
label="Pixel Displacement", label="Pixel Displacement",
description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection", description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection.",
value=10.0, value=10.0,
range=(0.0, 100.0, 1.0), range=(0.0, 100.0, 1.0),
uid=[0], uid=[0],
@ -277,10 +279,10 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
name="storageDataType", name="storageDataType",
label="EXR Storage Data Type", label="EXR Storage Data Type",
description="Storage image data type for keyframes written to EXR files:\n" description="Storage image data type for keyframes written to EXR files:\n"
" * float: Use full floating point (32 bits per channel)\n" " - float: Use full floating point (32 bits per channel).\n"
" * half: Use half float (16 bits per channel)\n" " - half: Use half float (16 bits per channel).\n"
" * halfFinite: Use half float, but clamp values to avoid non-finite values\n" " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n"
" * auto: Use half float if all values can fit, else use full float\n", " - auto: Use half float if all values can fit, else use full float.",
value="float", value="float",
values=["float", "half", "halfFinite", "auto"], values=["float", "half", "halfFinite", "auto"],
exclusive=True, exclusive=True,

View file

@ -36,76 +36,78 @@ Calibrate LDR to HDR response curve from samples.
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='samples', name="samples",
label='Samples folder', label="Samples Folder",
description='Samples folder', description="Samples folder.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='userNbBrackets', name="userNbBrackets",
label='Number of Brackets', label="Number Of Brackets",
description='Number of exposure brackets per HDR image (0 for automatic detection).', description="Number of exposure brackets per HDR image (0 for automatic detection).",
value=0, value=0,
range=(0, 15, 1), range=(0, 15, 1),
uid=[], uid=[],
group='user', # not used directly on the command line group="user", # not used directly on the command line
), ),
desc.IntParam( desc.IntParam(
name='nbBrackets', name="nbBrackets",
label='Automatic Nb Brackets', label="Automatic Nb Brackets",
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', description="Number of exposure brackets used per HDR image.\n"
"It is detected automatically from input Viewpoints metadata if 'userNbBrackets' is 0,\n"
"else it is equal to 'userNbBrackets'.",
value=0, value=0,
range=(0, 10, 1), range=(0, 10, 1),
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='byPass', name="byPass",
label='Bypass', label="Bypass",
description="Bypass HDR creation and use the medium bracket as the source for the next steps", description="Bypass HDR creation and use the medium bracket as the source for the next steps.",
value=False, value=False,
uid=[0], uid=[0],
enabled= lambda node: node.nbBrackets.value != 1, enabled= lambda node: node.nbBrackets.value != 1,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='calibrationMethod', name="calibrationMethod",
label='Calibration Method', label="Calibration Method",
description="Method used for camera calibration \n" description="Method used for camera calibration:\n"
" * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n"
" * Debevec: This is the standard method for HDR calibration. \n" " - Debevec: This is the standard method for HDR calibration.\n"
" * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n"
" * Laguerre: Simple but robust method estimating the minimal number of parameters.", " - Laguerre: Simple but robust method estimating the minimal number of parameters.",
values=['linear', 'debevec', 'grossberg', 'laguerre'], values=["linear", "debevec", "grossberg", "laguerre"],
value='debevec', value="debevec",
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='calibrationWeight', name="calibrationWeight",
label='Calibration Weight', label="Calibration Weight",
description="Weight function used to calibrate camera response \n" description="Weight function used to calibrate camera response:\n"
" * default (automatically selected according to the calibrationMethod) \n" " - default (automatically selected according to the calibrationMethod)\n"
" * gaussian \n" " - gaussian\n"
" * triangle \n" " - triangle\n"
" * plateau", " - plateau",
value='default', value="default",
values=['default', 'gaussian', 'triangle', 'plateau'], values=["default", "gaussian", "triangle", "plateau"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='channelQuantizationPower', name="channelQuantizationPower",
label='Channel Quantization Power', label="Channel Quantization Power",
description='Quantization level like 8 bits or 10 bits.', description="Quantization level like 8 bits or 10 bits.",
value=10, value=10,
range=(8, 14, 1), range=(8, 14, 1),
uid=[0], uid=[0],
@ -113,21 +115,22 @@ Calibrate LDR to HDR response curve from samples.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='workingColorSpace', name="workingColorSpace",
label='Working Color Space', label="Working Color Space",
description='Allows you to choose the color space in which the data are processed.', description="Allows you to choose the color space in which the data are processed.",
value='sRGB', value="sRGB",
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], values=["sRGB", "Linear", "ACES2065-1", "ACEScg"],
exclusive=True, exclusive=True,
uid=[], uid=[],
group='user', # not used directly on the command line group="user", # not used directly on the command line
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='maxTotalPoints', name="maxTotalPoints",
label='Max Number of Points', label="Max Number Of Points",
description='Max number of points used from the sampling. This ensures that the number of pixels values extracted by the sampling\n' description="Maximum number of points used from the sampling.\n"
'can be managed by the calibration step (in term of computation time and memory usage).', "This ensures that the number of pixels values extracted by the sampling\n"
"can be managed by the calibration step (in term of computation time and memory usage).",
value=1000000, value=1000000,
range=(8, 10000000, 1000), range=(8, 10000000, 1000),
uid=[0], uid=[0],
@ -135,11 +138,11 @@ Calibrate LDR to HDR response curve from samples.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
@ -147,10 +150,10 @@ Calibrate LDR to HDR response curve from samples.
outputs = [ outputs = [
desc.File( desc.File(
name='response', name="response",
label='Response File', label="Response File",
description='Path to the output response file', description="Path to the output response file.",
value=desc.Node.internalFolder + 'response.csv', value=desc.Node.internalFolder + "response.csv",
uid=[], uid=[],
) )
] ]

View file

@ -35,94 +35,97 @@ Merge LDR images into HDR images.
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='response', name="response",
label='Response file', label="Response File",
description='Response file', description="Response file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='userNbBrackets', name="userNbBrackets",
label='Number of Brackets', label="Number Of Brackets",
description='Number of exposure brackets per HDR image (0 for automatic detection).', description="Number of exposure brackets per HDR image (0 for automatic detection).",
value=0, value=0,
range=(0, 15, 1), range=(0, 15, 1),
uid=[], uid=[],
group='user', # not used directly on the command line group="user", # not used directly on the command line
), ),
desc.IntParam( desc.IntParam(
name='nbBrackets', name="nbBrackets",
label='Automatic Nb Brackets', label="Automatic Nb Brackets",
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', description="Number of exposure brackets used per HDR image.\n"
"It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n"
"is 0, else it is equal to 'userNbBrackets'.",
value=0, value=0,
range=(0, 10, 1), range=(0, 10, 1),
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='offsetRefBracketIndexEnabled', name="offsetRefBracketIndexEnabled",
label='Manually Specify Ref Bracket', label="Manually Specify Ref Bracket",
description='Manually specify the reference bracket index to control the exposure of the HDR image.', description="Manually specify the reference bracket index to control the exposure of the HDR image.",
value=False, value=False,
uid=[0], uid=[0],
group='user', # not used directly on the command line group="user", # not used directly on the command line
), ),
desc.IntParam( desc.IntParam(
name='offsetRefBracketIndex', name="offsetRefBracketIndex",
label='Offset Ref Bracket Index', label="Offset Ref Bracket Index",
description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', description="0 to use the center bracket.\n"
"+N to use a more exposed bracket or -N to use a less exposed bracket.",
value=1, value=1,
range=(-4, 4, 1), range=(-4, 4, 1),
uid=[0], uid=[0],
enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value),
), ),
desc.FloatParam( desc.FloatParam(
name='meanTargetedLumaForMerging', name="meanTargetedLumaForMerging",
label='Targeted Luminance For Merging', label="Targeted Luminance For Merging",
description='Expected mean luminance of the HDR images used to compute the final panorama', description="Expected mean luminance of the HDR images used to compute the final panorama.",
value=0.4, value=0.4,
range=(0.0, 1.0, 0.01), range=(0.0, 1.0, 0.01),
uid=[0], uid=[0],
enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value),
), ),
desc.BoolParam( desc.BoolParam(
name='byPass', name="byPass",
label='Bypass', label="Bypass",
description="Bypass HDR creation and use the medium bracket as the source for the next steps.", description="Bypass HDR creation and use the medium bracket as the source for the next steps.",
value=False, value=False,
uid=[0], uid=[0],
enabled= lambda node: node.nbBrackets.value != 1, enabled= lambda node: node.nbBrackets.value != 1,
), ),
desc.BoolParam( desc.BoolParam(
name='keepSourceImageName', name="keepSourceImageName",
label='Keep Source Image Name', label="Keep Source Image Name",
description="Keep the filename of the input image selected as central image for the output image filename.", description="Keep the filename of the input image selected as central image for the output image filename.",
value=False, value=False,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='fusionWeight', name="fusionWeight",
label='Fusion Weight', label="Fusion Weight",
description="Weight function used to fuse all LDR images together:\n" description="Weight function used to fuse all LDR images together:\n"
" * gaussian \n" " - gaussian\n"
" * triangle \n" " - triangle\n"
" * plateau", " - plateau",
value='gaussian', value="gaussian",
values=['gaussian', 'triangle', 'plateau'], values=["gaussian", "triangle", "plateau"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='channelQuantizationPower', name="channelQuantizationPower",
label='Channel Quantization Power', label="Channel Quantization Power",
description='Quantization level like 8 bits or 10 bits.', description="Quantization level like 8 bits or 10 bits.",
value=10, value=10,
range=(8, 14, 1), range=(8, 14, 1),
uid=[0], uid=[0],
@ -130,79 +133,79 @@ Merge LDR images into HDR images.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='workingColorSpace', name="workingColorSpace",
label='Working Color Space', label="Working Color Space",
description='Allows you to choose the color space in which the data are processed.', description="Allows you to choose the color space in which the data are processed.",
value='sRGB', value="sRGB",
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.BoolParam( desc.BoolParam(
name='enableHighlight', name="enableHighlight",
label='Enable Highlight', label="Enable Highlight",
description="Enable highlights correction.", description="Enable highlights correction.",
value=False, value=False,
uid=[0], uid=[0],
group='user', # not used directly on the command line group="user", # not used directly on the command line
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.FloatParam( desc.FloatParam(
name='highlightCorrectionFactor', name="highlightCorrectionFactor",
label='Highlights Correction', label="Highlights Correction",
description='Pixels saturated in all input images have a partial information about their real luminance.\n' description="Pixels saturated in all input images have a partial information about their real luminance.\n"
'We only know that the value should be >= to the standard hdr fusion.\n' "We only know that the value should be >= to the standard HDRfusion.\n"
'This parameter allows to perform a post-processing step to put saturated pixels to a constant\n' "This parameter allows to perform a post-processing step to put saturated pixels to a constant\n"
'value defined by the `highlightsMaxLuminance` parameter.\n' "value defined by the `highlightsMaxLuminance` parameter.\n"
'This parameter is float to enable to weight this correction.', "This parameter is float to enable to weight this correction.",
value=1.0, value=1.0,
range=(0.0, 1.0, 0.01), range=(0.0, 1.0, 0.01),
uid=[0], uid=[0],
enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value, enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value,
), ),
desc.FloatParam( desc.FloatParam(
name='highlightTargetLux', name="highlightTargetLux",
label='Highlight Target Luminance (Lux)', label="Highlight Target Luminance (Lux)",
description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' description="This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n"
'\n' "\n"
'Some Outdoor Reference Light Levels:\n' "Some Outdoor Reference Light Levels:\n"
' * 120,000 lux: Brightest sunlight\n' " - 120,000 lux: Brightest sunlight\n"
' * 110,000 lux: Bright sunlight\n' " - 110,000 lux: Bright sunlight\n"
' * 20,000 lux: Shade illuminated by entire clear blue sky, midday\n' " - 20,000 lux: Shade illuminated by entire clear blue sky, midday\n"
' * 1,000 lux: Typical overcast day, midday\n' " - 1,000 lux: Typical overcast day, midday\n"
' * 400 lux: Sunrise or sunset on a clear day\n' " - 400 lux: Sunrise or sunset on a clear day\n"
' * 40 lux: Fully overcast, sunset/sunrise\n' " - 40 lux: Fully overcast, sunset/sunrise\n"
'\n' "\n"
'Some Indoor Reference Light Levels:\n' "Some Indoor Reference Light Levels:\n"
' * 20000 lux: Max Usually Used Indoor\n' " - 20000 lux: Max Usually Used Indoor\n"
' * 750 lux: Supermarkets\n' " - 750 lux: Supermarkets\n"
' * 500 lux: Office Work\n' " - 500 lux: Office Work\n"
' * 150 lux: Home\n', " - 150 lux: Home\n",
value=120000.0, value=120000.0,
range=(1000.0, 150000.0, 1.0), range=(1000.0, 150000.0, 1.0),
uid=[0], uid=[0],
enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='storageDataType', name="storageDataType",
label='Storage Data Type', label="Storage Data Type",
description='Storage image data type:\n' description="Storage image data type:\n"
' * float: Use full floating point (32 bits per channel)\n' " - float: Use full floating point (32 bits per channel).\n"
' * half: Use half float (16 bits per channel)\n' " - half: Use half float (16 bits per channel).\n"
' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n"
' * auto: Use half float if all values can fit, else use full float\n', " - auto: Use half float if all values can fit, else use full float.",
value='float', value="float",
values=['float', 'half', 'halfFinite', 'auto'], values=["float", "half", "halfFinite", "auto"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
@ -210,18 +213,18 @@ Merge LDR images into HDR images.
outputs = [ outputs = [
desc.File( desc.File(
name='outputFolder', name="outputFolder",
label='Output Folder', label="Folder",
description='Path to the folder containing the merged HDR images.', description="Path to the folder containing the merged HDR images.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
group='', # do not export on the command line group="", # do not export on the command line
), ),
desc.File( desc.File(
name='outSfMData', name="outSfMData",
label='SfMData File', label="SfMData",
description='Path to the output sfmdata file', description="Path to the output SfMData file.",
value=desc.Node.internalFolder + 'sfmData.sfm', value=desc.Node.internalFolder + "sfmData.sfm",
uid=[], uid=[],
) )
] ]

View file

@ -53,55 +53,57 @@ Sample pixels from Low range images for HDR creation.
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.IntParam( desc.IntParam(
name='userNbBrackets', name="userNbBrackets",
label='Number of Brackets', label="Number Of Brackets",
description='Number of exposure brackets per HDR image (0 for automatic detection).', description="Number of exposure brackets per HDR image (0 for automatic detection).",
value=0, value=0,
range=(0, 15, 1), range=(0, 15, 1),
uid=[], uid=[],
group='user', # not used directly on the command line group="user", # not used directly on the command line
), ),
desc.IntParam( desc.IntParam(
name='nbBrackets', name="nbBrackets",
label='Automatic Nb Brackets', label="Automatic Nb Brackets",
description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', description="Number of exposure brackets used per HDR image.\n"
"It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n"
"is 0, else it is equal to 'userNbBrackets'.",
value=0, value=0,
range=(0, 10, 1), range=(0, 10, 1),
uid=[0], uid=[0],
), ),
desc.BoolParam( desc.BoolParam(
name='byPass', name="byPass",
label='Bypass', label="Bypass",
description="Bypass HDR creation and use the medium bracket as the source for the next steps", description="Bypass HDR creation and use the medium bracket as the source for the next steps.",
value=False, value=False,
uid=[0], uid=[0],
enabled= lambda node: node.nbBrackets.value != 1, enabled= lambda node: node.nbBrackets.value != 1,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='calibrationMethod', name="calibrationMethod",
label='Calibration Method', label="Calibration Method",
description="Method used for camera calibration \n" description="Method used for camera calibration:\n"
" * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" " - Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n"
" * Debevec: This is the standard method for HDR calibration. \n" " - Debevec: This is the standard method for HDR calibration.\n"
" * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n"
" * Laguerre: Simple but robust method estimating the minimal number of parameters.", " - Laguerre: Simple but robust method estimating the minimal number of parameters.",
values=['linear', 'debevec', 'grossberg', 'laguerre'], values=["linear", "debevec", "grossberg", "laguerre"],
value='debevec', value="debevec",
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='channelQuantizationPower', name="channelQuantizationPower",
label='Channel Quantization Power', label="Channel Quantization Power",
description='Quantization level like 8 bits or 10 bits.', description="Quantization level like 8 bits or 10 bits.",
value=10, value=10,
range=(8, 14, 1), range=(8, 14, 1),
uid=[0], uid=[0],
@ -109,19 +111,19 @@ Sample pixels from Low range images for HDR creation.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='workingColorSpace', name="workingColorSpace",
label='Working Color Space', label="Working Color Space",
description='Allows you to choose the color space in which the data are processed.', description="Allows you to choose the color space in which the data are processed.",
value='sRGB', value="sRGB",
values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='blockSize', name="blockSize",
label='Block Size', label="Block Size",
description='Size of the image tile to extract a sample.', description="Size of the image tile to extract a sample.",
value=256, value=256,
range=(8, 1024, 1), range=(8, 1024, 1),
uid=[0], uid=[0],
@ -129,9 +131,9 @@ Sample pixels from Low range images for HDR creation.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='radius', name="radius",
label='Patch Radius', label="Patch Radius",
description='Radius of the patch used to analyze the sample statistics.', description="Radius of the patch used to analyze the sample statistics.",
value=5, value=5,
range=(0, 10, 1), range=(0, 10, 1),
uid=[0], uid=[0],
@ -139,9 +141,9 @@ Sample pixels from Low range images for HDR creation.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.IntParam( desc.IntParam(
name='maxCountSample', name="maxCountSample",
label='Max Number of Samples', label="Max Number Of Samples",
description='Max number of samples per image group.', description="Maximum number of samples per image group.",
value=200, value=200,
range=(10, 1000, 10), range=(10, 1000, 10),
uid=[0], uid=[0],
@ -149,19 +151,19 @@ Sample pixels from Low range images for HDR creation.
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.BoolParam( desc.BoolParam(
name='debug', name="debug",
label='Export Debug Files', label="Export Debug Files",
description="Export debug files to analyze the sampling strategy.", description="Export debug files to analyze the sampling strategy.",
value=False, value=False,
uid=[], uid=[],
enabled= lambda node: node.byPass.enabled and not node.byPass.value, enabled= lambda node: node.byPass.enabled and not node.byPass.value,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
) )
@ -169,9 +171,9 @@ Sample pixels from Low range images for HDR creation.
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Folder', label="Folder",
description='Output path for the samples.', description="Output path for the samples.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
), ),

View file

@ -13,52 +13,53 @@ Can also be used to calibrate a lighting dome (RTI type).
inputs = [ inputs = [
desc.File( desc.File(
name='inputPath', name="inputPath",
label='SfMData', label="SfMData",
description='Input SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0] uid=[0]
), ),
desc.File( desc.File(
name='inputJSON', name="inputJSON",
label='Sphere Detection File', label="Sphere Detection File",
description='Input JSON file containing sphere centers and radiuses.', description="Input JSON file containing sphere centers and radiuses.",
value='', value="",
uid=[0] uid=[0]
), ),
desc.BoolParam( desc.BoolParam(
name='saveAsModel', name="saveAsModel",
label='Save As Model', label="Save As Model",
description='Check if this calibration file will be used with other datasets.', description="Check if this calibration file will be used with other datasets.",
value=False, value=False,
uid=[0] uid=[0]
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='method', name="method",
label='Calibration Method', label="Calibration Method",
description='Method used for light calibration. Use "brightestPoint" for shiny spheres and "whiteSphere" for white matte spheres.', description="Method used for light calibration.\n"
values=['brightestPoint', 'whiteSphere'], "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.",
value='brightestPoint', values=["brightestPoint", "whiteSphere"],
value="brightestPoint",
exclusive=True, exclusive=True,
uid=[0] uid=[0]
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='Verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[] uid=[],
) )
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='outputFile', name="outputFile",
label='Light File', label="Light File",
description='Light information will be written here.', description="Light information will be written here.",
value=desc.Node.internalFolder +'/lights.json' , value=desc.Node.internalFolder + "/lights.json",
uid=[] uid=[]
) )
] ]

View file

@ -7,84 +7,87 @@ class LightingEstimation(desc.AVCommandLineNode):
commandLine = 'aliceVision_lightingEstimation {allParams}' commandLine = 'aliceVision_lightingEstimation {allParams}'
category = 'Utils' category = 'Utils'
documentation = '''
'''
inputs = [ inputs = [
desc.File( desc.File(
name='input', name="input",
label='Input', label="SfMData",
description='SfMData file.', description="Input SfMData file.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name="depthMapsFilterFolder", name="depthMapsFilterFolder",
label='Filtered Depth Maps Folder', label="Filtered Depth Maps Folder",
description='Input filtered depth maps folder', description="Input filtered depth maps folder.",
value='', value="",
uid=[0], uid=[0],
), ),
desc.File( desc.File(
name='imagesFolder', name="imagesFolder",
label='Images Folder', label="Images Folder",
description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', description="Use images from a specific folder instead of those specify in the SfMData file.\n"
value='', "Filename should be the image UID.",
value="",
uid=[0], uid=[0],
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='lightingEstimationMode', name="lightingEstimationMode",
label='Lighting Estimation Mode', label="Lighting Estimation Mode",
description='Lighting Estimation Mode.', description="Lighting estimation mode.",
value='global', value="global",
values=['global', 'per_image'], values=["global", "per_image"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='lightingColor', name="lightingColor",
label='Lighting Color Mode', label="Lighting Color Mode",
description='Lighting Color Mode.', description="Lighting color mode.",
value='RGB', value="RGB",
values=['RGB', 'Luminance'], values=["RGB", "Luminance"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='albedoEstimationName', name="albedoEstimationName",
label='Albedo Estimation Name', label="Albedo Estimation Name",
description='Albedo estimation method used for light estimation.', description="Albedo estimation method used for light estimation.",
value='constant', value="constant",
values=['constant', 'picture', 'median_filter', 'blur_filter'], values=["constant", "picture", "median_filter", "blur_filter"],
exclusive=True, exclusive=True,
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.IntParam( desc.IntParam(
name='albedoEstimationFilterSize', name="albedoEstimationFilterSize",
label='Albedo Estimation Filter Size', label="Albedo Estimation Filter Size",
description='Albedo filter size for estimation method using filter.', description="Albedo filter size for estimation method using filter.",
value=3, value=3,
range=(0, 100, 1), range=(0, 100, 1),
uid=[0], uid=[0],
advanced=True, advanced=True,
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='verboseLevel', name="verboseLevel",
label='Verbose Level', label="Verbose Level",
description='Verbosity level (fatal, error, warning, info, debug, trace).', description="Verbosity level (fatal, error, warning, info, debug, trace).",
value='info', value="info",
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'], values=["fatal", "error", "warning", "info", "debug", "trace"],
exclusive=True, exclusive=True,
uid=[], uid=[],
), )
] ]
outputs = [ outputs = [
desc.File( desc.File(
name='output', name="output",
label='Folder', label="Folder",
description='Folder for output lighting vector files.', description="Folder for output lighting vector files.",
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
), ),