From 5b07f203e8a1ac9f8d340d03b03f6805b7158f2d Mon Sep 17 00:00:00 2001 From: fabien servant Date: Fri, 28 Aug 2020 11:42:08 +0200 Subject: [PATCH 1/2] add a parameter for panorama upscale choice --- meshroom/nodes/aliceVision/PanoramaWarping.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshroom/nodes/aliceVision/PanoramaWarping.py b/meshroom/nodes/aliceVision/PanoramaWarping.py index 7cba255f74..8fbe6816a3 100644 --- a/meshroom/nodes/aliceVision/PanoramaWarping.py +++ b/meshroom/nodes/aliceVision/PanoramaWarping.py @@ -34,6 +34,18 @@ class PanoramaWarping(desc.CommandLineNode): range=(0, 50000, 1000), uid=[0] ), + desc.IntParam( + name='percentUpscale', + label='Upscale ratio', + description='Upscale percent\n' + 'Only used if panorama Width is set to 0 for automatic choice\n' + 'How many percent of the pixels will be upscaled :\n' + 'Choose 0 and no pixel will be upscaled compared to its original (input) resolution\n' + 'Choose 1000 and all pixel will be upscaled compared to its original (input) resolution\n', + value=50, + range=(0, 100, 1), + uid=[0] + ), desc.ChoiceParam( name='verboseLevel', label='Verbose Level', From 7b42ed743a6765b9978587990d907873cf44de5d Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Fri, 4 Sep 2020 17:58:39 +0200 Subject: [PATCH 2/2] [nodes] PanoramaWarping: improve wording and enable/disable percentUpscale --- meshroom/nodes/aliceVision/PanoramaWarping.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meshroom/nodes/aliceVision/PanoramaWarping.py b/meshroom/nodes/aliceVision/PanoramaWarping.py index 8fbe6816a3..b53e7e1c03 100644 --- a/meshroom/nodes/aliceVision/PanoramaWarping.py +++ b/meshroom/nodes/aliceVision/PanoramaWarping.py @@ -29,7 +29,7 @@ class PanoramaWarping(desc.CommandLineNode): name='panoramaWidth', label='Panorama Width', description='Panorama Width (in pixels).\n' - 'Set 0 to let the software choose the size automatically, so that on average the input resolution is kept (to limit over/under sampling).', + 'Set 0 to let the software choose the size automatically, based on "percentUpscale" parameter.', value=10000, range=(0, 50000, 1000), uid=[0] @@ -38,12 +38,15 @@ class PanoramaWarping(desc.CommandLineNode): name='percentUpscale', label='Upscale ratio', description='Upscale percent\n' - 'Only used if panorama Width is set to 0 for automatic choice\n' - 'How many percent of the pixels will be upscaled :\n' - 'Choose 0 and no pixel will be upscaled compared to its original (input) resolution\n' - 'Choose 1000 and all pixel will be upscaled compared to its original (input) resolution\n', + 'Only used if panorama width is set to 0 for automatic estimation.\n' + '\n' + 'How many percent of the pixels will be upscaled (compared to its original resolution):\n' + ' * 0: all pixels will be downscaled\n' + ' * 50: on average the input resolution is kept (optimal to reduce over/under-sampling)\n' + ' * 100: all pixels will be upscaled\n', value=50, range=(0, 100, 1), + enabled=lambda node: (node.panoramaWidth.value == 0), uid=[0] ), desc.ChoiceParam(