From 1c1df4c97bcaf5eb88da80475cf810ca955c72f2 Mon Sep 17 00:00:00 2001 From: fabien servant Date: Wed, 9 Mar 2022 16:54:36 +0100 Subject: [PATCH 1/3] Checkerboard detection node --- .../aliceVision/checkerboardDetection.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 meshroom/nodes/aliceVision/checkerboardDetection.py diff --git a/meshroom/nodes/aliceVision/checkerboardDetection.py b/meshroom/nodes/aliceVision/checkerboardDetection.py new file mode 100644 index 0000000000..2bebe011c9 --- /dev/null +++ b/meshroom/nodes/aliceVision/checkerboardDetection.py @@ -0,0 +1,47 @@ +__version__ = "1.0" + +import json +import os + +from meshroom.core import desc + + +class CheckerboardDetection(desc.CommandLineNode): + commandLine = 'aliceVision_checkerboardDetection {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=5) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Other' + documentation = ''' +Compute the image warping for each input image in the panorama coordinate system. +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description="SfM Data File", + value='', + 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 = [ + desc.File( + name='output', + label='Output File', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + ] From b43c03a346092b4400ec822a3ce3434914af3803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Thu, 12 Jan 2023 16:01:19 +0100 Subject: [PATCH 2/3] [nodes] CheckerboardDetection: visualize debug output in 2D viewer --- .../aliceVision/CheckerboardDetection.py | 66 +++++++++++++++++++ .../aliceVision/checkerboardDetection.py | 47 ------------- 2 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 meshroom/nodes/aliceVision/CheckerboardDetection.py delete mode 100644 meshroom/nodes/aliceVision/checkerboardDetection.py diff --git a/meshroom/nodes/aliceVision/CheckerboardDetection.py b/meshroom/nodes/aliceVision/CheckerboardDetection.py new file mode 100644 index 0000000000..d7f578ac94 --- /dev/null +++ b/meshroom/nodes/aliceVision/CheckerboardDetection.py @@ -0,0 +1,66 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class CheckerboardDetection(desc.AVCommandLineNode): + commandLine = 'aliceVision_checkerboardDetection {allParams}' + size = desc.DynamicNodeSize('input') + parallelization = desc.Parallelization(blockSize=5) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Other' + documentation = ''' +This node detects checkerboard structures in a set of images. +''' + + inputs = [ + desc.File( + name='input', + label='Input', + description='SfMData File', + value='', + uid=[0], + ), + desc.BoolParam( + name='useNestedGrids', + label='Nested calibration grid', + description='Images contain nested calibration grids. These grids must be centered on image center.', + value=False, + uid=[0], + ), + desc.BoolParam( + name='doubleSize', + label='Double Size', + description='Double the image size prior to processing', + value=False, + uid=[0], + ), + desc.BoolParam( + name='exportDebugImages', + label='Export Debug Images', + description='Export Debug Images', + value=False, + uid=[0], + ), + ] + + outputs = [ + desc.File( + name='output', + label='Folder', + description='', + value=desc.Node.internalFolder, + uid=[], + ), + desc.File( + name='checkerLines', + enabled= lambda node: node.exportDebugImages.value, + label='Checker Lines', + description='Debug Images.', + semantic='image', + value=desc.Node.internalFolder + 'checker_.png', + group='', # do not export on the command line + uid=[], + ), + ] diff --git a/meshroom/nodes/aliceVision/checkerboardDetection.py b/meshroom/nodes/aliceVision/checkerboardDetection.py deleted file mode 100644 index 2bebe011c9..0000000000 --- a/meshroom/nodes/aliceVision/checkerboardDetection.py +++ /dev/null @@ -1,47 +0,0 @@ -__version__ = "1.0" - -import json -import os - -from meshroom.core import desc - - -class CheckerboardDetection(desc.CommandLineNode): - commandLine = 'aliceVision_checkerboardDetection {allParams}' - size = desc.DynamicNodeSize('input') - parallelization = desc.Parallelization(blockSize=5) - commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' - - category = 'Other' - documentation = ''' -Compute the image warping for each input image in the panorama coordinate system. -''' - - inputs = [ - desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', - 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 = [ - desc.File( - name='output', - label='Output File', - description='', - value=desc.Node.internalFolder, - uid=[], - ), - ] From 480c03b2cd79173d837166cce42da111ab9bf40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Vital?= Date: Wed, 18 Jan 2023 15:12:11 +0100 Subject: [PATCH 3/3] [nodes] CheckerboardDetection: cosmetic changes --- meshroom/nodes/aliceVision/CheckerboardDetection.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meshroom/nodes/aliceVision/CheckerboardDetection.py b/meshroom/nodes/aliceVision/CheckerboardDetection.py index d7f578ac94..0dcba781ff 100644 --- a/meshroom/nodes/aliceVision/CheckerboardDetection.py +++ b/meshroom/nodes/aliceVision/CheckerboardDetection.py @@ -11,21 +11,22 @@ class CheckerboardDetection(desc.AVCommandLineNode): category = 'Other' documentation = ''' -This node detects checkerboard structures in a set of images. +Detect checkerboard structures in a set of images. +The detection method also supports nested calibration grids. ''' inputs = [ desc.File( name='input', label='Input', - description='SfMData File', + description='SfMData File. Viewpoints must correspond to lens calibration grids.', value='', uid=[0], ), desc.BoolParam( name='useNestedGrids', label='Nested calibration grid', - description='Images contain nested calibration grids. These grids must be centered on image center.', + description='Images contain nested calibration grids. These grids must be centered on the image center.', value=False, uid=[0], ), @@ -59,7 +60,7 @@ class CheckerboardDetection(desc.AVCommandLineNode): label='Checker Lines', description='Debug Images.', semantic='image', - value=desc.Node.internalFolder + 'checker_.png', + value=desc.Node.internalFolder + '.png', group='', # do not export on the command line uid=[], ),