mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 02:12:04 +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
|
||||
from meshroom.core import desc
|
||||
|
@ -8,74 +8,126 @@ class KeyframeSelection(desc.CommandLineNode):
|
|||
commandLine = 'aliceVision_utils_keyframeSelection {allParams}'
|
||||
|
||||
inputs = [
|
||||
desc.File(
|
||||
desc.ListAttribute(
|
||||
elementDesc=desc.File(
|
||||
name="mediaPath",
|
||||
label="Media Path",
|
||||
description="Media path.",
|
||||
value="",
|
||||
uid=[0],
|
||||
),
|
||||
name='mediaPaths',
|
||||
label='Media Paths',
|
||||
description='''Input video files or image sequence directories.''',
|
||||
value='',
|
||||
uid=[0],
|
||||
description='Input video files or image sequence directories.',
|
||||
),
|
||||
desc.ListAttribute(
|
||||
elementDesc=desc.File(
|
||||
name="brand",
|
||||
label="Brand",
|
||||
description="Camera brand.",
|
||||
value="",
|
||||
uid=[0],
|
||||
),
|
||||
desc.IntParam(
|
||||
name='maxNbOutFrame',
|
||||
label='Max Nb Out Frame',
|
||||
description='''maximum number of output frames (0 = no limit)''',
|
||||
value=1000,
|
||||
range=(0, 10000, 1),
|
||||
uid=[],
|
||||
name="brands",
|
||||
label="Brands",
|
||||
description="Camera brands."
|
||||
),
|
||||
desc.ListAttribute(
|
||||
elementDesc=desc.File(
|
||||
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(
|
||||
name='sensorDbPath',
|
||||
label='Sensor Db Path',
|
||||
description='''Camera sensor width database path.''',
|
||||
value=os.environ.get('ALICEVISION_SENSOR_DB', ''),
|
||||
uid=[0],
|
||||
),
|
||||
),
|
||||
desc.File(
|
||||
name='voctreePath',
|
||||
label='Voctree Path',
|
||||
description='''Vocabulary tree path.''',
|
||||
value=os.environ.get('ALICEVISION_VOCTREE', ''),
|
||||
uid=[0],
|
||||
),
|
||||
desc.StringParam(
|
||||
name='brands',
|
||||
label='Brands',
|
||||
description='''Camera brands.''',
|
||||
value='',
|
||||
),
|
||||
desc.BoolParam(
|
||||
name='useSparseDistanceSelection',
|
||||
label='Use Sparse Distance Selection',
|
||||
description='Use sparseDistance selection in order to avoid similar keyframes.',
|
||||
value=True,
|
||||
uid=[0],
|
||||
),
|
||||
desc.StringParam(
|
||||
name='models',
|
||||
label='Models',
|
||||
description='''Camera models.''',
|
||||
value='',
|
||||
),
|
||||
desc.BoolParam(
|
||||
name='useSharpnessSelection',
|
||||
label='Use Sharpness Selection',
|
||||
description='Use frame sharpness score for keyframe selection.',
|
||||
value=True,
|
||||
uid=[0],
|
||||
),
|
||||
),
|
||||
desc.FloatParam(
|
||||
name='mmFocals',
|
||||
label='Mm Focals',
|
||||
description='''Focals in mm (will be use if not 0).''',
|
||||
value=0.0,
|
||||
range=(0.0, 500.0, 1.0),
|
||||
name='sparseDistMaxScore',
|
||||
label='Sparse Distance Max Score',
|
||||
description='Maximum number of strong common points between two keyframes.',
|
||||
value=100.0,
|
||||
range=(1.0, 200.0, 1.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(
|
||||
name='sharpnessPreset',
|
||||
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',
|
||||
values=['ultra', 'high', 'normal', 'low', 'very_low', 'none'],
|
||||
exclusive=True,
|
||||
uid=[0],
|
||||
),
|
||||
),
|
||||
desc.IntParam(
|
||||
name='sharpSubset',
|
||||
label='Sharp Subset',
|
||||
|
@ -83,7 +135,7 @@ class KeyframeSelection(desc.CommandLineNode):
|
|||
value=4,
|
||||
range=(1, 100, 1),
|
||||
uid=[0],
|
||||
),
|
||||
),
|
||||
desc.IntParam(
|
||||
name='minFrameStep',
|
||||
label='Min Frame Step',
|
||||
|
@ -91,7 +143,7 @@ class KeyframeSelection(desc.CommandLineNode):
|
|||
value=12,
|
||||
range=(1, 100, 1),
|
||||
uid=[0],
|
||||
),
|
||||
),
|
||||
desc.IntParam(
|
||||
name='maxFrameStep',
|
||||
label='Max Frame Step',
|
||||
|
@ -99,7 +151,24 @@ class KeyframeSelection(desc.CommandLineNode):
|
|||
value=36,
|
||||
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,
|
||||
uid=[],
|
||||
),
|
||||
]
|
||||
|
||||
outputs = [
|
||||
|
@ -109,6 +178,6 @@ class KeyframeSelection(desc.CommandLineNode):
|
|||
description='''Output keyframes folder for extracted frames.''',
|
||||
value=desc.Node.internalFolder,
|
||||
uid=[],
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue