mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 19:02:29 +02:00
[nodes] KeyframeSelection
Add / update options
KeyframeSelection node is now 2.0
This commit is contained in:
parent
a13b9b1ee3
commit
f07628e5bd
1 changed files with 115 additions and 46 deletions
|
@ -1,4 +1,4 @@
|
||||||
__version__ = "1.0"
|
__version__ = "2.0"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from meshroom.core import desc
|
from meshroom.core import desc
|
||||||
|
@ -8,74 +8,126 @@ class KeyframeSelection(desc.CommandLineNode):
|
||||||
commandLine = 'aliceVision_utils_keyframeSelection {allParams}'
|
commandLine = 'aliceVision_utils_keyframeSelection {allParams}'
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
desc.File(
|
desc.ListAttribute(
|
||||||
|
elementDesc=desc.File(
|
||||||
|
name="mediaPath",
|
||||||
|
label="Media Path",
|
||||||
|
description="Media path.",
|
||||||
|
value="",
|
||||||
|
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.',
|
||||||
value='',
|
),
|
||||||
uid=[0],
|
desc.ListAttribute(
|
||||||
|
elementDesc=desc.File(
|
||||||
|
name="brand",
|
||||||
|
label="Brand",
|
||||||
|
description="Camera brand.",
|
||||||
|
value="",
|
||||||
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
name="brands",
|
||||||
name='maxNbOutFrame',
|
label="Brands",
|
||||||
label='Max Nb Out Frame',
|
description="Camera brands."
|
||||||
description='''maximum number of output frames (0 = no limit)''',
|
),
|
||||||
value=1000,
|
desc.ListAttribute(
|
||||||
range=(0, 10000, 1),
|
elementDesc=desc.File(
|
||||||
uid=[],
|
name="model",
|
||||||
|
label="Model",
|
||||||
|
description="Camera model.",
|
||||||
|
value="",
|
||||||
|
uid=[0],
|
||||||
),
|
),
|
||||||
|
name="models",
|
||||||
|
label="Models",
|
||||||
|
description="Camera models."
|
||||||
|
),
|
||||||
|
desc.ListAttribute(
|
||||||
|
elementDesc=desc.FloatParam(
|
||||||
|
name="mmFocal",
|
||||||
|
label="mmFocal",
|
||||||
|
description="Focal in mm (will be use if not 0).",
|
||||||
|
value=0.0,
|
||||||
|
range=(0.0, 500.0, 1.0),
|
||||||
|
uid=[0],
|
||||||
|
),
|
||||||
|
name="mmFocals",
|
||||||
|
label="mmFocals",
|
||||||
|
description="Focals in mm (will be use 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.0, 1.0),
|
||||||
|
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=os.environ.get('ALICEVISION_SENSOR_DB', ''),
|
value=os.environ.get('ALICEVISION_SENSOR_DB', ''),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.File(
|
desc.File(
|
||||||
name='voctreePath',
|
name='voctreePath',
|
||||||
label='Voctree Path',
|
label='Voctree Path',
|
||||||
description='''Vocabulary tree path.''',
|
description='''Vocabulary tree path.''',
|
||||||
value=os.environ.get('ALICEVISION_VOCTREE', ''),
|
value=os.environ.get('ALICEVISION_VOCTREE', ''),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.StringParam(
|
desc.BoolParam(
|
||||||
name='brands',
|
name='useSparseDistanceSelection',
|
||||||
label='Brands',
|
label='Use Sparse Distance Selection',
|
||||||
description='''Camera brands.''',
|
description='Use sparseDistance selection in order to avoid similar keyframes.',
|
||||||
value='',
|
value=True,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.StringParam(
|
desc.BoolParam(
|
||||||
name='models',
|
name='useSharpnessSelection',
|
||||||
label='Models',
|
label='Use Sharpness Selection',
|
||||||
description='''Camera models.''',
|
description='Use frame sharpness score for keyframe selection.',
|
||||||
value='',
|
value=True,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.FloatParam(
|
desc.FloatParam(
|
||||||
name='mmFocals',
|
name='sparseDistMaxScore',
|
||||||
label='Mm Focals',
|
label='Sparse Distance Max Score',
|
||||||
description='''Focals in mm (will be use if not 0).''',
|
description='Maximum number of strong common points between two keyframes.',
|
||||||
value=0.0,
|
value=100.0,
|
||||||
range=(0.0, 500.0, 1.0),
|
range=(1.0, 200.0, 1.0),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.FloatParam(
|
|
||||||
name='pxFocals',
|
|
||||||
label='Px Focals',
|
|
||||||
description='''Focals in px (will be use and convert in mm if not 0).''',
|
|
||||||
value=0.0,
|
|
||||||
range=(0.0, 500.0, 1.0),
|
|
||||||
uid=[0],
|
|
||||||
),
|
|
||||||
desc.ChoiceParam(
|
desc.ChoiceParam(
|
||||||
name='sharpnessPreset',
|
name='sharpnessPreset',
|
||||||
label='Sharpness Preset',
|
label='Sharpness Preset',
|
||||||
description='''Preset for sharpnessSelection : {ultra, high, normal, low, very_low, none}''',
|
description='Preset for sharpnessSelection : {ultra, high, normal, low, very_low, none}',
|
||||||
value='normal',
|
value='normal',
|
||||||
values=['ultra', 'high', 'normal', 'low', 'very_low', 'none'],
|
values=['ultra', 'high', 'normal', 'low', 'very_low', 'none'],
|
||||||
exclusive=True,
|
exclusive=True,
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='sharpSubset',
|
name='sharpSubset',
|
||||||
label='Sharp Subset',
|
label='Sharp Subset',
|
||||||
|
@ -83,7 +135,7 @@ class KeyframeSelection(desc.CommandLineNode):
|
||||||
value=4,
|
value=4,
|
||||||
range=(1, 100, 1),
|
range=(1, 100, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='minFrameStep',
|
name='minFrameStep',
|
||||||
label='Min Frame Step',
|
label='Min Frame Step',
|
||||||
|
@ -91,7 +143,7 @@ class KeyframeSelection(desc.CommandLineNode):
|
||||||
value=12,
|
value=12,
|
||||||
range=(1, 100, 1),
|
range=(1, 100, 1),
|
||||||
uid=[0],
|
uid=[0],
|
||||||
),
|
),
|
||||||
desc.IntParam(
|
desc.IntParam(
|
||||||
name='maxFrameStep',
|
name='maxFrameStep',
|
||||||
label='Max Frame Step',
|
label='Max Frame Step',
|
||||||
|
@ -99,7 +151,24 @@ class KeyframeSelection(desc.CommandLineNode):
|
||||||
value=36,
|
value=36,
|
||||||
range=(2, 1000, 1),
|
range=(2, 1000, 1),
|
||||||
uid=[0],
|
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,
|
||||||
|
uid=[],
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
|
@ -109,6 +178,6 @@ class KeyframeSelection(desc.CommandLineNode):
|
||||||
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