mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-19 20:16:30 +02:00
[nodes] KeyframeSelection: Remove old parameters and add new method
This commit removes most of the existing parameters for the keyframe selection and adds new ones to enable the regular keyframe selection. Since the regular method is the only one available for now, the parameter that allows the user to enable it or not is disabled.
This commit is contained in:
parent
d21b70f45d
commit
e09554c410
1 changed files with 61 additions and 112 deletions
|
@ -24,9 +24,9 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
|
||||||
value="",
|
value="",
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
name='mediaPaths',
|
name="mediaPaths",
|
||||||
label='Media Paths',
|
label="Media Paths",
|
||||||
description='Input video files or image sequence directories.',
|
description="Input video files or image sequence directories.",
|
||||||
),
|
),
|
||||||
desc.ListAttribute(
|
desc.ListAttribute(
|
||||||
elementDesc=desc.File(
|
elementDesc=desc.File(
|
||||||
|
@ -56,124 +56,73 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
|
||||||
elementDesc=desc.FloatParam(
|
elementDesc=desc.FloatParam(
|
||||||
name="mmFocal",
|
name="mmFocal",
|
||||||
label="mmFocal",
|
label="mmFocal",
|
||||||
description="Focal in mm (will be use 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="mmFocals",
|
||||||
description="Focals in mm (will be use if not 0)."
|
description="Focals in mm (will be used if not 0)."
|
||||||
),
|
|
||||||
desc.ListAttribute(
|
|
||||||
elementDesc=desc.FloatParam(
|
|
||||||
name="pxFocal",
|
|
||||||
label="pxFocal",
|
|
||||||
description="Focal in px (will be use and convert in mm if not 0).",
|
|
||||||
value=0.0,
|
|
||||||
range=(0.0, 500.0, 1.0),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
name="pxFocals",
|
|
||||||
label="pxFocals",
|
|
||||||
description="Focals in px (will be use and convert in mm if not 0)."
|
|
||||||
),
|
|
||||||
desc.ListAttribute(
|
|
||||||
elementDesc=desc.IntParam(
|
|
||||||
name="frameOffset",
|
|
||||||
label="Frame Offset",
|
|
||||||
description="Frame offset.",
|
|
||||||
value=0,
|
|
||||||
range=(0, 100, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
name="frameOffsets",
|
|
||||||
label="Frame Offsets",
|
|
||||||
description="Frame offsets."
|
|
||||||
),
|
),
|
||||||
desc.File(
|
desc.File(
|
||||||
name='sensorDbPath',
|
name="sensorDbPath",
|
||||||
label='Sensor Db Path',
|
label="Sensor Db Path",
|
||||||
description='''Camera sensor width database path.''',
|
description="Camera sensor width database path.",
|
||||||
value='${ALICEVISION_SENSOR_DB}',
|
value="${ALICEVISION_SENSOR_DB}",
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.File(
|
desc.GroupAttribute(
|
||||||
name='voctreePath',
|
name="regularSelection",
|
||||||
label='Voctree Path',
|
label="Regular Keyframe Selection",
|
||||||
description='''Vocabulary tree path.''',
|
description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.",
|
||||||
value='${ALICEVISION_VOCTREE}',
|
group=None, # skip group from command line
|
||||||
uid=[0],
|
groupDesc=[
|
||||||
),
|
desc.BoolParam(
|
||||||
desc.BoolParam(
|
name="useRegularSelection",
|
||||||
name='useSparseDistanceSelection',
|
label="Use Regular Selection",
|
||||||
label='Use Sparse Distance Selection',
|
description="Enable and use the regular keyframe selection.",
|
||||||
description='Use sparseDistance selection in order to avoid similar keyframes.',
|
value=True,
|
||||||
value=False,
|
uid=[0],
|
||||||
uid=[0],
|
enabled=False, # only method for now, it must always be enabled
|
||||||
),
|
),
|
||||||
desc.BoolParam(
|
desc.IntParam(
|
||||||
name='useSharpnessSelection',
|
name="minFrameStep",
|
||||||
label='Use Sharpness Selection',
|
label="Min Frame Step",
|
||||||
description='Use frame sharpness score for keyframe selection.',
|
description="Minimum number of frames between two keyframes.",
|
||||||
value=False,
|
value=12,
|
||||||
uid=[0],
|
range=(1, 1000, 1),
|
||||||
),
|
uid=[0],
|
||||||
desc.FloatParam(
|
enabled=lambda node: node.regularSelection.useRegularSelection.value
|
||||||
name='sparseDistMaxScore',
|
),
|
||||||
label='Sparse Distance Max Score',
|
desc.IntParam(
|
||||||
description='Maximum number of strong common points between two keyframes.',
|
name="maxFrameStep",
|
||||||
value=100.0,
|
label="Max Frame Step",
|
||||||
range=(1.0, 200.0, 1.0),
|
description="Maximum number of frames between two keyframes. Ignored if equal to 0.",
|
||||||
uid=[0],
|
value=0,
|
||||||
|
range=(0, 1000, 1),
|
||||||
|
uid=[0],
|
||||||
|
enabled=lambda node: node.regularSelection.useRegularSelection.value
|
||||||
|
),
|
||||||
|
desc.IntParam(
|
||||||
|
name="maxNbOutFrames",
|
||||||
|
label="Max Nb Output Frames",
|
||||||
|
description="Maximum number of output frames (0 = no limit).\n"
|
||||||
|
"'minFrameStep' and 'maxFrameStep' will always be respected, so combining them with this parameter\n"
|
||||||
|
"might cause the selection to stop before reaching the end of the input sequence(s).",
|
||||||
|
value=0,
|
||||||
|
range=(0, 10000, 1),
|
||||||
|
uid=[0],
|
||||||
|
enabled=lambda node: node.regularSelection.useRegularSelection.value
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
desc.ChoiceParam(
|
desc.ChoiceParam(
|
||||||
name='sharpnessPreset',
|
name="verboseLevel",
|
||||||
label='Sharpness Preset',
|
label="Verbose Level",
|
||||||
description='Preset for sharpnessSelection : {ultra, high, normal, low, very_low, none}',
|
description="Verbosity level (fatal, error, warning, info, debug, trace).",
|
||||||
value='normal',
|
value="info",
|
||||||
values=['ultra', 'high', 'normal', 'low', 'very_low', 'none'],
|
values=["fatal", "error", "warning", "info", "debug", "trace"],
|
||||||
exclusive=True,
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='sharpSubset',
|
|
||||||
label='Sharp Subset',
|
|
||||||
description='''sharp part of the image (1 = all, 2 = size/2, ...)''',
|
|
||||||
value=4,
|
|
||||||
range=(1, 100, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='minFrameStep',
|
|
||||||
label='Min Frame Step',
|
|
||||||
description='''minimum number of frames between two keyframes''',
|
|
||||||
value=1,
|
|
||||||
range=(1, 100, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='maxFrameStep',
|
|
||||||
label='Max Frame Step',
|
|
||||||
description='''maximum number of frames after which a keyframe can be taken''',
|
|
||||||
value=2,
|
|
||||||
range=(2, 1000, 1),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.IntParam(
|
|
||||||
name='maxNbOutFrame',
|
|
||||||
label='Max Nb Out Frame',
|
|
||||||
description='''maximum number of output frames (0 = no limit)''',
|
|
||||||
value=0,
|
|
||||||
range=(0, 10000, 1),
|
|
||||||
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,
|
exclusive=True,
|
||||||
uid=[],
|
uid=[],
|
||||||
),
|
),
|
||||||
|
@ -181,9 +130,9 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
desc.File(
|
desc.File(
|
||||||
name='outputFolder',
|
name="outputFolder",
|
||||||
label='Folder',
|
label="Folder",
|
||||||
description='''Output keyframes folder for extracted frames.''',
|
description="Output keyframes folder for extracted frames.",
|
||||||
value=desc.Node.internalFolder,
|
value=desc.Node.internalFolder,
|
||||||
uid=[],
|
uid=[],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue